agentao

Blueprint C · Ticket Automation

A webhook-style triage agent: reads a support ticket, looks up customer context, searches a KB, and either auto-sends a reply (confidence ≥ 0.9) or drafts one for a human reviewer.

Corresponds to Part 7.3 of the developer guide.

What it demonstrates

How to run

cp .env.example .env                     # add OPENAI_API_KEY
uv sync
uv run python -m src.triage \
  --email alice@acme.io \
  --ticket-id T-1001 \
  "Hi, I forgot my password. Can you help?"

Expected: the agent looks up alice’s profile, searches the KB, replies with confidence ≥ 0.9, and OUTBOX: shows one "kind": "sent" entry.

Try these variants to exercise the gate:

# Enterprise customer — skill forces draft_reply regardless of confidence
uv run python -m src.triage --email carol@bigco.com \
  "What's the status of my shipment?"

# Ambiguous — model should self-rate low confidence and draft
uv run python -m src.triage --email bob@startup.dev \
  "I want to cancel and never use this again."

File map

Path Role
src/triage.py Entry point, mock CRM/KB, 4 tools, ConfidenceGatedEngine
.agentao/skills/support-triage/SKILL.md Tone + escalation policy + confidence guidance
.env.example Credentials template
runs/<ticket-id>/ Per-ticket working dir, created at runtime

Not included