Multi-Agent Customer Support Platform
A Bedrock supervisor agent routes to specialist agents, calls tools, and retrieves from a knowledge base — with guardrails and human escalation built in from the start.
The problem & requirements
- User submits a query via chat → system routes to the right specialist agent (order status, refunds, FAQ) and returns a coherent answer
- Agents call tools/APIs and retrieve from a knowledge base (RAG) for policy/FAQ questions
- Low-confidence or sensitive requests escalate to a human agent
- Latency: p95 under ~3s for a single-agent turn, up to ~8s for multi-hop tool use
- Reliability: tool calls must be idempotent — a retried refund shouldn't double-refund
- Safety: guardrails against prompt injection, PII leakage, off-policy responses
- Observability: full trace of which agent handled a request and why
- Cost control: token spend needs a model-tiering strategy, not one large model for everything
Scale & constraints
Assume 500 concurrent conversations, each turn averaging 1,500 input tokens and 300 output tokens.
API design
Data model
| Entity | Key fields |
|---|---|
| Session (DynamoDB) | session_id, user_id, conversation_history, active_agent, last_updated |
| Agent trace | trace_id, session_id, agent_invoked, tools_called[], latency_ms, confidence_score |
| Knowledge base doc | doc_id, source_url, chunk_text, embedding_vector, last_indexed |
| Tool call log | call_id, tool_name, params, idempotency_key, result, status |
idempotency_key on tool calls is what separates a working design from a naive one — without it, a retried Lambda invocation could double-process a refund.
Architecture
Client hits API Gateway, which authenticates and routes to a Bedrock orchestrator agent. The orchestrator hands off to specialist agents — order status and knowledge/FAQ — which call action-group Lambdas and the knowledge base directly.
Fig. 2 — Orchestrator routes to specialist agents, which call tools and the knowledge base in parallel.
Key decisions & trade-offs
idempotency_key since agent retries could otherwise trigger the same side effect twice.