Support triage agent: reply or escalate
Your first real agent: it uses tools, returns a typed decision, and knows when a person should take over.
The brief
An online store gets hundreds of messages a day. Most ask where an order is or how to return it. A few are angry, legal or unusual, and must reach a person quickly.
What you will build
- Tools to look up an order and a returns policy
- An agent that classifies each message and drafts a reply
- A typed decision: reply, escalate or ask for more detail
- A small report of how it did on a sample inbox
Requirements
| Requirement | Done when |
|---|---|
| Tools | Order lookup and policy lookup are real functions the agent calls |
| Typed | Every run returns a decision object, never loose text |
| Escalation | Legal threats and refunds above a limit always escalate |
| Measured | A table of 30 sample messages with expected and actual decisions |
What to learn it from
- OpenAI Agents SDK: the core agent loop
- OpenAI Agents SDK: instructions, context and sessions
- Or the same with Google ADK
- Pydantic AI: typed output, tools and retries
Milestones
- Write 30 sample messages and the right decision for each
- Build the two tools
- Build the agent with a typed output
- Add the escalation rules
- Run all 30 and fill in the table
- Fix the worst mistake and run again
How it is judged
The table is the result. Correct escalation of every high-risk message matters more than a high overall score.
Stretch goals
- Remember the customer across a conversation
- Add a guardrail that blocks abusive input
- Hand billing questions to a specialist agent
Before you call it done
Worth remembering
- Every risky message escalated
- The decision is typed
- The results table is honest, mistakes included
Every expert started right here.