AI Agents
The Orchestrator
Every customer message enters here. A real tool-calling agent loop, not a rules-based router.
Webhook- LangGraph.js
- GPT-5-mini
- Supabase
- pgvector
- Deno
- Direct tools
- 5
- Specialists
- 4
Read the steps as a list
- trigger Customer DM arrives · Telegram / WhatsApp / IG
- action Load business snapshot · Supabase
Subscription tier, feature toggles, business profile, open order and usage — one read per turn.
- condition Gates pass?
Kill-switch, subscription state and message limit are checked BEFORE any LLM call, so a blocked business never costs a model invocation.
- ai Orchestrator loop · GPT-5-mini
Decides: answer directly, call a one-shot tool, or delegate.
- integration search_knowledge_base · pgvector
RAG over the business's own documents, filtered by business ID at the SQL level.
- action Direct tools
capture_lead, get_order_status, get_active_promotions, escalate_to_human.
- ai Delegate to specialist
ask_sales_agent, ask_booking_agent, ask_complaint_agent — each a real nested agent run.
- output Reply sent
Full trace with token and cost accounting written for every turn.
- output Canned reply
Over limit or suspended — answered without an LLM call.
The problem
A single monolithic prompt trying to sell, book, handle complaints and take payment does all four badly, and there is no way to license the capabilities separately.
How it works
One agent loop sits in front of everything. It answers FAQs itself from the business's own documents, calls a handful of one-shot tools directly, or delegates to a specialist sub-agent — a genuinely separate agent invocation with its own prompt and tools, not a persona swap on the same call.
The outcome
Routing is a real reasoning step. Which tools even exist is recomputed per request, per business — so a capability a business has not paid for is structurally absent from what the model can call, not merely discouraged.