Customer Support Bot Edge Function — Customer Support
Customer SupportDeflect support tickets with AI-powered answers, confidence scoring, and escalation signals. Returns should_escalate: true when confidence is low so you can route to a human agent.
Edge function Customer Support Bot Deflect support tickets with AI-powered answers, confidence scoring, and escalation signals. Returns should_escalate: true when confidence is low so you can route to a human agent.. Deployed on Cloudflare Workers — zero cold starts, globally distributed. Mount it via your Aerostack workspace to call it from any AI agent.
npx aerostack add aerostack/customer-support-bot Use with AI Assistants
MCPConnect Claude, Cursor, or any MCP-compatible client — then call this function by slug
① Add MCP Server
Add this once — access all Aerostack functions from your AI tool.
{
"mcpServers": {
"aerostack": {
"url": "https://mcp.aerostack.dev",
"type": "http"
}
}
} ② Call this function
Ask your AI to use the call_function tool with this slug:
call_function({
slug: "customer-support-bot",
args: {}
}) Customer Support Bot
Upload your KB articles and FAQs. The bot answers customer questions and signals when to escalate to a human agent.
Endpoints
| Method | Path | Description |
|---|---|---|
| POST | /ingest | Upload KB article or FAQ |
| POST | /chat | Answer + confidence + escalation signal |
| GET | /docs | List KB articles |
| DELETE | /docs/:docId | Remove outdated article |
| GET | /health | Status check |
Chat response shape
{
"answer": "To cancel, go to Account → Billing → Cancel Plan...",
"confidence": 0.82,
"should_escalate": false,
"sources": [{"filename": "billing-faq.md", "excerpt": "..."}]
}
When should_escalate is true (confidence < 0.5), route the customer to a human agent.
Metadata
Tags
Build and publish your own functions
Write a TypeScript function, deploy it to the edge, and share it with thousands of developers — in minutes.
Frequently asked questions
What does the Customer Support Bot function do? +
Customer Support Bot is a serverless edge function for customer-support automation written in cloudflare-worker. Deploy it to Cloudflare Workers via your Aerostack workspace.
How do I deploy the Customer Support Bot function? +
Install the Aerostack CLI and run: ```bash aerostack deploy function @aerostack/customer-support-bot ``` It will be live on Cloudflare Workers in seconds.
What runtime does Customer Support Bot use? +
Customer Support Bot runs on cloudflare-worker on the Cloudflare Workers edge runtime — zero cold starts, globally distributed.
Can I customise the Customer Support Bot function? +
Yes. Fork the function from your Aerostack dashboard, modify the source, and redeploy. All changes are version-controlled.