Message flow
This page traces a single visitor message from the widget or API through Chatevo’s three-brain pipeline to a streamed reply.
End-to-end path
Section titled “End-to-end path”Visitor message (widget or API) → Auth + rate limits + deployment lookup → Intent Analyzer → Query Strategist (RAG / tools / hybrid / direct) → Response Synthesizer → Stream reply (+ citations, rich cards)Step 1 — Ingress
Section titled “Step 1 — Ingress”- The embeddable widget (
widget.chatevo.ai/chat.js) or your Direct API client sends the message toapi.chatevo.ai. - Chatevo validates the deployment, domain allowlist (widget), and plan quotas.
- Conversation history loads from PostgreSQL for multi-turn context.
See Widget messages API and Deployments overview.
Step 2 — Intent Analyzer
Section titled “Step 2 — Intent Analyzer”The Intent Analyzer reads the latest message plus recent history and assigns intent — for example knowledge lookup, tool action, greeting, or handoff. On Starter+ plans, smart query understanding runs here. Free plans skip routing and always attempt RAG when knowledge bases are attached.
See Smart query understanding.
Step 3 — Query Strategist
Section titled “Step 3 — Query Strategist”Based on intent, the Query Strategist picks an execution path:
| Path | When used |
|---|---|
| RAG | Answer should come from attached knowledge bases |
| Tools | Live data from API Request or MCP tools |
| Hybrid | Combine retrieved docs with a tool call (Standard+ full routing) |
| Direct | Small talk or questions answerable without retrieval |
For RAG, the strategist may rewrite the query (full tier on Standard+) before hybrid search runs in Qdrant. For tools, it selects the tool and fills parameters from the conversation.
See Document retrieval architecture and Tools overview.
Step 4 — Response Synthesizer
Section titled “Step 4 — Response Synthesizer”The synthesizer receives:
- Your assistant master prompt
- Top retrieved chunks (with citation metadata)
- Tool JSON responses (if any)
- Model and RAG settings
It drafts the answer, cites sources where applicable, and attaches rich content only from verified tool payloads — never invented product data.
Step 5 — Stream to client
Section titled “Step 5 — Stream to client”With stream: true, the widget receives SSE events as the pipeline progresses:
| Event | Meaning |
|---|---|
step_message | Progress text (“Searching knowledge base…”) |
tool_call / tool_result | Tool execution lifecycle |
done | Final message with optional rich_content |
error | Failure details |
See Widget SSE events.
Failure and fallback
Section titled “Failure and fallback”If retrieval returns no chunks above the similarity threshold, or a tool call fails, the synthesizer follows your master prompt — typically acknowledging the gap and offering escalation rather than guessing.