privacy. Customer emails go to whichever model backend you connect, so use a local model if the messages are sensitive.
Who it is forA support or ops engineer automating triage.
The problemFree-form emails need a priority, category and escalation flag before routing.
The outcomeA validated ticket object you can send to a manager alert or a queue.
What you need first
- Python with pip; install with `pip install outlines`
- A model backend, such as a Hugging Face transformers model, as in the README quickstart
- Pydantic for typed schemas
Steps
- Install the library with
pip install outlines - Connect a model with Outlines.from_transformers as in the README, using microsoft/Phi-3-mini-4k-instruct
- Define a ServiceTicket Pydantic model with priority, category, requires_manager, summary and action_items
- Call the model with the prompt and ServiceTicket, parse with ServiceTicket.model_validate_json, and alert a manager when priority is urgent
Prompt for your agent
Using dottxt-ai/outlines, install it with `pip install outlines` and build the ServiceTicket triage example for emails in <my inbox export>, printing the parsed tickets.
Caveat. The README example runs a transformers model with device_map set to auto, so a GPU helps.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for dottxt-ai/outlines and "Turn support emails into structured tickets"
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