{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "thinkflowlab-system1-agents--route-support-tickets-with-s1a",
 "repo": "ThinkFlowLab/system1-agents",
 "repo_url": "https://github.com/ThinkFlowLab/system1-agents",
 "repo_slug": "thinkflowlab-system1-agents",
 "title": "Route support tickets to a queue in one call",
 "page_title": "How to route support tickets to a queue in one call with System1 Agents",
 "summary": "Send each ticket to one of five queues with a System 1 model and a probability.",
 "who": "A support lead or ops engineer who gets a steady flow of tickets that must be sorted into logistics, payment, returns, account or human queues.",
 "problem": "Sorting tickets by hand is slow, and a full chat model call per ticket costs more and takes longer than a single decision.",
 "outcome": "Each ticket gets one queue choice with a probability and confidence, returned as a JSON object in about 400 ms.",
 "steps": [
  "`git clone https://github.com/ThinkFlowLab/system1-agents && cd system1-agents`",
  "`uv sync && cp .env.example .env`, then put a Jev key in `.env` as TYPESAFE_API_KEY or OPENROUTER_API_KEY",
  "Run `uv run s1a decide --state '{\"ticket\": \"I was charged twice for order 4411 and I want the second charge refunded.\"}' --option logistics=\"delivery problems\" --option payment=\"billing and charges\" --option returns=\"return requests\" --option account=\"login and account access\" --option human=\"anything else\"` (inferred, check the README)",
  "Read the printed JSON: `choice` is the queue, and the per-option probabilities and `confidence` show how sure the model is",
  "Loop over your ticket export with the same command and send low-confidence tickets to the human queue (inferred, check the README)"
 ],
 "agent_prompt": "In the system1-agents repo, route each ticket in <ticket-file> to one of logistics, payment, returns, account or human using `s1a decide`. Return one JSON line per ticket with the chosen queue and its probability. Verify that every output has a choice that matches one of the five queue names.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The README gives the ticket router result only as a benchmark and a Claude Code example; the exact decide flags for five queues are inferred and should be checked against docs/agents.md.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "python",
 "requirements": [
  "git and uv, since the README installs with `uv sync`",
  "A Jev key: TYPESAFE_API_KEY from the TypeSafe console, or OPENROUTER_API_KEY",
  "Claude Code or Codex if you want the agent-driven path"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The Jev key goes in a local .env file, so keep that file out of version control and out of shared logs."
  }
 ],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/thinkflowlab-system1-agents/route-support-tickets-with-s1a/",
 "md": "https://dedupedai.com/use-cases/thinkflowlab-system1-agents/route-support-tickets-with-s1a/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/thinkflowlab-system1-agents--route-support-tickets-with-s1a.json",
 "api_version": "v1"
}
