An AI support agent that answers on Web, Gmail, and WhatsApp — honestly
A 24/7 AI employee for first-line support: it identifies the customer, opens a ticket, reads the mood, searches the knowledge base by meaning, and writes a reply using only the facts it found — escalating to a human the moment refunds, legal questions, or angry customers appear. Everything lands in PostgreSQL, which doubles as the CRM.
- Type
- Agentic support system · open source
- Stack
- Python · FastAPI · pgvector · Redis · Next.js
- Agent
- OpenAI Agents SDK · GPT-4o · 11 function tools
- Tests
- 258 passing (pytest + Vitest) · Docker + K8s

The problem
Growing companies answer the same support questions over and over — password resets, invoices, adding teammates. A first-line rep costs around $75,000 a year, customers write in from different channels and get treated like strangers on each one, keyword chatbots miss differently-worded questions, and naive AI bots make answers up.
The goal was a system that is cheap, consistent, always on — and honest enough to know when to hand off to a human.
One agent, eleven tools
The agent itself is small: a strict system-prompt rulebook plus 11 function tools that are the only actions it can take — find-or-create customer (with cross-channel identity linking, so an email and a WhatsApp number resolve to the same person), open a ticket and its conversation in a single transaction, score sentiment, search the knowledge base, save messages, send the channel-appropriate reply, escalate, and log metrics.
Small invariants carry the reliability: ticket status transitions are forward-only (you can't un-resolve a ticket), sentiment scores are clamped to their valid range, metric logging is best-effort so it can never break a customer's reply, and replies are truncated to each channel's length limits.
Async by default, graceful when things fail
Agent runs take seconds, so the API returns 202 Accepted with a job ID immediately and the frontend polls until the answer is ready — no frozen pages. A synchronous mode exists for simple integrations, and if Redis disappears, the API detects it and falls back to synchronous processing automatically: the product never hard-fails because the cache is down.
Grounded answers, deliberate escalation
Questions are embedded and matched against help articles with pgvector cosine search, and the agent is forced to answer from those articles only — no match means escalation, not improvisation. Refunds, legal topics, and upset customers route straight to a human with the reason recorded on the ticket.
One honest note that matters in production conversations: the web channel is fully round-tripped end to end, while Gmail and WhatsApp arrive through webhooks and are fully processed by the same agent — wiring their outbound replies to the live Gmail and Twilio APIs is the documented next step.
Production posture
258 automated tests run on fakes (fakeredis, fake DB, fake OpenAI) so they're fast, free, and deterministic. The whole stack ships with one-command Docker Compose for local work and Kubernetes manifests with health probes and autoscaling for production.