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

RequirementDone when
ToolsOrder lookup and policy lookup are real functions the agent calls
TypedEvery run returns a decision object, never loose text
EscalationLegal threats and refunds above a limit always escalate
MeasuredA table of 30 sample messages with expected and actual decisions

What to learn it from

Milestones

  1. Write 30 sample messages and the right decision for each
  2. Build the two tools
  3. Build the agent with a typed output
  4. Add the escalation rules
  5. Run all 30 and fill in the table
  6. 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
Back toAll frameworks

Every expert started right here.