Who it is forA support lead whose tickets arrive unsorted and who needs each one assigned to billing, technical, shipping or another queue without invented team names.
The problemModel answers can name teams that do not exist, which sends tickets to queues nobody watches.
The outcomeEach ticket gets exactly one queue value from the list you define, so the routing step only sees valid teams.
What you need first
- Python with pip installed
- A TypeLLM API key from typellm.ai (includes $5 free credit), or a GPU server running SGLang with a compatible model such as Qwen3.8-27B
- Documents or text to process, and a list of the fields you want back
Steps
- Run
pip install -U typellm - Run
export TYPELLM_API_KEY="tl-sk-..."or start your SGLang server and pass its URL to TypeLLMClient - Define a queue question with type string and a choices list where each item has a value and a description
- Call generate() with the ticket text as context for each ticket
- Send each ticket to the queue named in response.result
Prompt for your agent
In the TypeLLM/TypeLLM repo, call TypeLLMClient.generate() on each ticket in <tickets_file> with a queue field whose choices are billing, technical, shipping and other, each with a description. Return a list of ticket IDs with their queue. Verify that every queue value is one of the four choices.
Caveat. The README says choices take optional descriptions and that enum allows 2 to 26 values, so keep your team list inside that range.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for TypeLLM/TypeLLM and "Route support tickets to the right team with fixed choices"
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