TEMPLATE

Customer Support

24/7 support agent with knowledge base, per-user memory, human escalation, and automatic follow-ups.

agent.ts
import { Agent } from "oncell";
const agent = new Agent("support", {
instructions: `You are a support agent.
Always search the knowledge base before answering.
If you can't resolve an issue, escalate to a human.`,
model: "kimi-k3",
skills: {
escalation: {
when: "Issue cannot be resolved or customer is frustrated",
guide: "Use askHuman to escalate. Acknowledge the frustration.",
model: "claude-opus",
},
},
tools: ["files", "memory"],
});
agent.chat(async ({ message, user }) => {
const docs = await agent.files.search(message);
return agent.llm(message, {
context: docs,
autoContext: true,
});
});
// Upload your knowledge base:
// oncell files push ./docs/ support
export default agent;

DEPLOY

$ npx oncell deploy support-agent
DEPLOY NOW

WHAT YOU GET

Knowledge base RAG
Per-user conversation memory
Human escalation via askHuman
Scheduled follow-ups
Chat UI included
24/7 uptime