Tutorial: Customer Support Bot
A full code walkthrough for this tutorial is still being written. In the meantime this page describes the shape of the system and links to the framework pieces you'd compose to build it. If you start the implementation and hit something missing, open a discussion — concrete questions accelerate the write-up.
Goal
A support agent that:
- Answers product questions from a knowledge base via RAG.
- Creates tickets through a webhook when it can't find a confident answer.
- Escalates to a human reviewer when the user is frustrated.
Architecture
User message ──▶ SupportRole
│
├──▶ @Retrieval(knowledge="support_kb") ◀── KnowledgeBase (RAG)
│
├──▶ @Tool create_ticket(...) ◀── HTTP webhook
│
└──▶ @Tool escalate(...) ◀── HumanReviewSink
(sentiment-aware)Building blocks you'd compose
- Knowledge base — ingest your support docs as a
KnowledgeBaseand consume it from the role with@KnowledgeSource+@Retrieval. See RAG guide. - Tools — define
create_ticketandescalateas@Tool-annotated methods on a POJO; register viaAgentBuilder.toolPojos(...). See Tools guide. - Sentiment-aware escalation — wrap the inbound message in a guardrail (
@InputGuardrail) or pre-step that runs a sentiment classifier and short-circuits toescalatewhen frustration is detected. - Observability — enable tracing with
@Tracedon action methods so each ticket / escalation lands in your trace exporter.
Related
Tutorial: Research Agent
Build an agent that takes a research question, searches the web, reads PDF sources, and produces a cited summary.
Tutorial: Multi-Agent Research Team
A full code walkthrough is still being written. In the meantime this page describes the topology and points at the framework pieces you can wire up today. Open a discussion if you start the implementation and hit something missing.