Updated · May 18, 2026Tags · chat, supportStack · Agent SDK + Agent Server + Chat UI + Console
Overview
A customer support bot needs to be reliable, safe, and transparent. Cognipeer provides guardrails to keep the agent on-topic, human-in-the-loop for sensitive decisions, and full tracing for quality assurance.
This guide builds a support bot that can look up orders, answer FAQs from a knowledge base, and escalate to humans when needed.
When to reach for this recipe
If your team needs the capabilities described above and you'd rather build on proven primitives than wire one from scratch — this is the shape to start from.
Architecture
Console provides the AI gateway with guardrails, tracing, and the RAG pipeline for knowledge base access.
Agent SDK powers the agent runtime with human-in-the-loop checkpoints and safety controls.
Agent Server serves the agent as a REST API with conversation persistence.
Chat UI provides the customer-facing interface with streaming, tool cards, and file attachments.
1. Create Support Tools
Define the tools the support agent can use: order lookup, FAQ search, and human escalation.
1import{ createTool }from"@cognipeer/agent-sdk";
2import{ z }from"zod";
3
4constlookupOrder=createTool({
5name:"lookup_order",
6description:"Look up order status by order ID",
7schema: z.object({
8orderId: z.string().describe("Customer order ID"),
- Looks up order information in real time
- Searches an FAQ knowledge base using RAG
- Escalates to humans when needed with approval flows
- Guards against off-topic and unsafe content
- Traces every interaction for quality review
- Streams responses with full tool transparency