Who it is forA support engineer on a small team who needs each incoming ticket sent to billing, technical or sales, without a cloud API call.
The problemManual triage is slow, and every ticket needs a consistent team choice.
The outcomeEach ticket gets probabilities over the named teams, computed locally, and the top label can drive routing.
What you need first
- An Apple Silicon Mac running macOS 14 or later
- Python 3.11 or later
- Internet access for the first checkpoint download, after which inference is fully local
Steps
- Install the package on an Apple Silicon Mac:
pip install laya-mlx - In a Python file, import the library and load the checkpoint:
import laya_mlx as layathenagent = laya.load("aac6fef/laya-mlx") - Define a choice question with the criteria billing, technical and sales, as shown in the Quick start.
- Call
agent.predictwith the ticket text and the question dictionary. - Read
result["answers"]["department"]and pick the label with the highest probability.
Prompt for your agent
In the laya-mlx repo (github.com/mizorewww/laya-mlx), write a Python script that loads aac6fef/laya-mlx and routes the ticket text in <ticket_file> to one of the teams billing, technical or sales using a choice question. Print the answers dictionary. Verify that the printed label is one of the three criteria.
Caveat. The published latency figures come from one short question on an M3 Max, so longer tickets or other machines will take different times.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
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 [email protected] and we will look at it promptly. Full disclaimer page