Credentials. The Jev key goes in a local .env file, so keep that file out of version control and out of shared logs.
Who it is forA support lead or ops engineer who gets a steady flow of tickets that must be sorted into logistics, payment, returns, account or human queues.
The problemSorting tickets by hand is slow, and a full chat model call per ticket costs more and takes longer than a single decision.
The outcomeEach ticket gets one queue choice with a probability and confidence, returned as a JSON object in about 400 ms.
What you need first
- 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
Steps
git clone https://github.com/ThinkFlowLab/system1-agents && cd system1-agentsuv sync && cp .env.example .env, then put a Jev key in.envas 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:
choiceis the queue, and the per-option probabilities andconfidenceshow 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)
Prompt for your agent
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.
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for ThinkFlowLab/system1-agents and "Route support tickets to a queue in one call"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer