Laya for Node
Node.js and TypeScript package that runs Laya through ONNX Runtime with typed answers matching the Python and Jev API shapes.
Overview
@receptron/laya runs Laya, the open Jev-compatible System One decision model from Convai Innovations, from Node.js and TypeScript using ONNX Runtime, with no PyTorch or Python at runtime. You pass a state such as a ticket and typed questions; it returns every answer with calibrated probabilities in one forward pass: a choice with per-option probabilities, a score as an expected level with its distribution, and a noul probability. The request and response shapes match Laya's Python reference and Jev's system_one API, and the README says outputs match Python to four decimal places.
Answer types follow question types, so TypeScript knows a choice answer from a noul answer without casts. The ONNX weights (about 1.7 GB, FP32) download from Hugging Face on first use and are cached locally; you can also point to a local export, choose a checkpoint variant, or pin a revision for reproducibility. It needs Node 20+ and about 2 GB of RAM.
What the decision model decides
| Type | Question | Answers |
|---|---|---|
| Choice | Which team should handle this ticket? | billing · support · sales |
| Score | How urgent is this ticket? | not urgent · somewhat urgent · urgent · critical |
| Yes / no | Is the customer likely to cancel or dispute? | — |
How it works
- npm install @receptron/laya
- Laya.load() downloads and caches ONNX weights
- Call systemOne(state, questions)
- Use typed answers and probabilities
- Close the model when done
Strengths
- No Python runtime needed
- Typed answers in TypeScript
- Output parity with Python to four decimals
- Pinnable model revisions
Caveats
- 1.7 GB download and about 2 GB RAM
- FP32 only per the README
- CPU inference speed not stated in the excerpt
Getting started
npm install @receptron/laya, then const laya = await Laya.load(); await laya.systemOne(state, questions).At a glance
- Type
- Service
- Status
- beta
- Language
- TypeScript
- Runtime
- Node.js 20+ with ONNX Runtime
- Has code
- yes
Use cases and integrations
How curated lists describe it
Run Laya, the open-source Jev-compatible System-1 decision model, from Node.js…
wh000wh000/awesome-jev-liveRuns Laya, an open Jev-compatible System One model, from Node.js and TypeScript through ONNX Runtime.
MrJev/awesome-jev
Frequently asked questions
Do I need Python?
No, it runs Laya through ONNX Runtime in Node.
Is the API compatible with Jev?
The request and response shapes match Jev's system_one API.
How big is the model?
About 1.7 GB of FP32 ONNX weights.
Related projects
Go harness for System One models: hosted Jev, open Kev in-process via llama.cpp, and Cloudflare Clef, with typed helpers and a CLI.
ServicebetaGoTypeScript library for one-line local decisions with open models (kev-0.6b, kev-4b, open-jev), no API keys or cloud.
ProjectbetaTypeScriptSwift 6 bridge that runs System One decision models behind Apple's Foundation Models API, on device with Laya or via hosted endpoints.
ProjectbetaSwiftZero-dependency npm package that runs Laya natively or as WebAssembly in Node, Bun and browsers, drop-in for Jev's /v1/systemone.
ProjectbetaJavaScriptLocal-first desktop AI workbench for llama.cpp, vLLM and SGLang that includes a JEV typed-decision page and /v1/systemone gateway.
ServicebetaRuns the open LAYA decision model under Bun with native ONNX inference behind a TypeSafe-compatible API, plus an English/Persian playground.
LibrarybetaTypeScript