Documentation Index
Fetch the complete documentation index at: https://docs.zavu.dev/llms.txt
Use this file to discover all available pages before exploring further.
Customer support agent
An agent that handles tier-1 support: answers FAQs from a knowledge base, creates support tickets when it can’t, and escalates urgent cases to a human.Architecture
Setup
index.ts:
Knowledge base implementation
Several options forsearchKnowledgeBase:
Option A: Zavu’s built-in agent knowledge base
If you already use AI Agents knowledge bases, you can search them from your function:Option B: Your own vector store (Pinecone, Qdrant, pgvector)
Option C: Static FAQ (good for small KBs)
For < 50 FAQs, embedded text search is fine:Deploy
Sample conversation
Improvements you can layer
Sentiment-driven escalation
Sentiment-driven escalation
Detect frustration from message text without relying on the LLM’s judgment:Then
zavu fn triggers add --events message.inbound. This runs IN
ADDITION to the agent — observer pattern.Business hours awareness
Business hours awareness
Customer language detection
Customer language detection
Don’t hard-code Spanish. Tell the agent:Tool descriptions can stay in English — the LLM translates the natural
responses. Tool return values (like ticket summaries) can be templates
you i18n yourself.
Daily metrics summary
Daily metrics summary
Add a scheduled trigger (when we support cron in Functions) or rely on a
nightly external cron that calls a function-only HTTP path:
Tuning
| Symptom | Fix |
|---|---|
| Agent creates tickets for things it could answer | Beef up the KB. Add the missing FAQ. Test with zavu fn invoke. |
| Agent answers from “memory” / hallucinates | Reinforce the prompt: “ONLY use information returned by search_kb”. |
| Tickets are too verbose / wrong priority | Add examples in the prompt: Priority guide:\n- urgent: customer mentions money lost\n- high: account locked\n- normal: question about a feature\n- low: general info. |
| Customers ping pong between tools without resolution | Add a max_turns heuristic in the prompt: “If after 3 tool calls you don’t have an answer, escalate_to_human”. |
Next
Ecommerce example
Order tracking, recommendations, cart recovery.
Define agents in depth
Provider selection, prompts, advanced config.
