What do you want to do?
4 use cases
-
Route support tickets to teams with probabilities
Send each ticket to a team, an urgency level and a churn-risk flag in one model call.
- Laya
- Work and operations
- Intermediate
View prompt
In the receptron/laya repo, write a Node.js script that loads Laya with Laya.load() and calls systemOne on the ticket in <ticket-json-file>, asking which team should handle it with choice options billing, support and sales, plus an urgency score and a churn_risk noul question. Expected output: a printed JSON object with the chosen team, its probability, the urgency score and the churn P(true). Verify that the department probabilities sum to about 1.
-
Auto-act on confident answers and queue the rest
Gate automated actions on answer_confidence so uncertain items go to a human reviewer.
- Laya
- Work and operations
- Intermediate
View prompt
In the receptron/laya repo, add a function that calls Laya systemOne on <record-file> with a choice question over the actions in <action-list>, and applies the top action only when answer_confidence is at least 0.9, otherwise returning it for review. Expected output: an object with the action, its answer_confidence and a review flag. Verify that a record with a near-even probability split is marked for review.
-
Bake Laya weights into a container image at build time
Fetch the 1.7 GB ONNX bundle during the image build so containers start without a download.
- Laya
- Work and operations
- Advanced
View prompt
In the receptron/laya repo, write a Dockerfile for a Node.js 20 service at <service-dir> that installs @receptron/laya and runs ensureBundle() during the build. Expected output: an image where the first Laya.load() in the container finishes without a network download. Verify by running the container with networking disabled and confirming that the model loads.
-
Export a fresh ONNX bundle from a newer Laya checkpoint
Rebuild the ONNX bundle from the Hugging Face checkpoint and check it against PyTorch.
- Laya
- Work and operations
- Advanced
View prompt
In the receptron/laya repo, follow the export section of the README to build an ONNX bundle from convaiinnovations/laya into ../onnx. Expected output: the export script prints a max logit difference against PyTorch that is about 1e-5 and the five bundle files exist. Verify by running `LAYA_MODEL_DIR=./onnx yarn example` and confirming it completes.
How to use Laya
- Check you have what it needs: Node.js 20 or newer; About 2 GB of RAM for the loaded model, plus a few hundred MB per batch of questions; About 1.7 GB of free disk space for the ONNX weights cached under ~/.cache/receptron-laya.
- Open receptron/laya on GitHub and read the README and license.
- Run
npm install @receptron/layain your Node.js project. - Run
node -e 'import("@receptron/laya").then((m) => m.ensureBundle())'to fetch the weights before the first ticket arrives. - Call
Laya.load(), then pass the ticket subject and body as the state with your department, urgency and churn_risk questions tosystemOne. - Read
result.answers.department.choice,result.answers.urgency.scoreandresult.answers.churn_risk.nouland write them to your ticket record.
These steps come from our top use case, Route support tickets to teams with probabilities, which also has a copy-paste agent prompt.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeAbout this repo
- Who it is forWritten for backend and support-tooling engineers who need fast, probability-scored classification or decisions inside a Node.js or TypeScript service.
- Why it is hot
- LanguageTypeScript
- Sourcegithub.com/receptron/laya · Back to Hot repos
Requirements
- Node.js 20 or newer
- About 2 GB of RAM for the loaded model, plus a few hundred MB per batch of questions
- About 1.7 GB of free disk space for the ONNX weights cached under ~/.cache/receptron-laya
- Network access to Hugging Face for the first download
Maintain Laya? Add the Featured on Deduped badge
Paste this into your README:
[](https://dedupedai.com/use-cases/receptron-laya/?ref=badge)
Questions about Laya
What is Laya?
Laya is an open-source System 1 decision model that a Node.js or TypeScript program can run locally through ONNX Runtime to answer typed questions about a state with calibrated probabilities, without generating text. It is an open-source project on GitHub: https://github.com/receptron/laya.
Who is Laya for?
Written for backend and support-tooling engineers who need fast, probability-scored classification or decisions inside a Node.js or TypeScript service.
What can I do with Laya?
4 use cases so far, for example: Route support tickets to teams with probabilities; Auto-act on confident answers and queue the rest; Bake Laya weights into a container image at build time. Each has steps and a copy-paste agent prompt.
What do I need to run Laya?
Node.js 20 or newer; About 2 GB of RAM for the loaded model, plus a few hundred MB per batch of questions; About 1.7 GB of free disk space for the ONNX weights cached under ~/.cache/receptron-laya; Network access to Hugging Face for the first download.
What are alternatives to Laya?
Other hot AI repos in Work and operations: AI Job Search, Solidcraft, Fastbrowse, Awesome AI Agent Platforms, Nautilo.
Is Laya safe to run?
Deduped does not own, audit or vouch for it. Read the README and license, run it on your own systems first and review every command before you run it.