Use Laya from Node.js
You can run Laya inside a Node.js process with ONNX Runtime, or keep the model in a separate server and call it over HTTP. Both routes use the same state-plus-typed-questions request shape as the Python package and the Jev API.
378 projects
laya-studio-node
ajayjha1
Provides a Node.js and TypeScript toolkit for Laya classification, routing, CLI, and MCP use
laya-decision-api
bmw8080
An HTTP service wraps local Laya with OpenAPI documentation and Java, TypeScript, and Python SDKs
adecider
Agents365-ai
Provides typed decision tools for coding agents with pluggable local Laya, Jev, and OpenAI-compatible backends
pi-laya-skill-router
ericmjl
Routes pi coding-agent requests to relevant skills using a local Laya model
system1-jev-laya-agent
harshavarma02
Runs a speedcubing agent that uses Laya and Jev to assess cube states and choose moves
order-risk-management-laya
Shariful-Islam-Sourav
Analyzes e-commerce orders for fraud risk using Laya’s typed-decision engine
laya-router
vuongvm812
Sets up local Laya classification and Jev Router proxies for coding clients
laya-skill
StevenLi-phoenix
A Claude Code skill runs, fine-tunes, evaluates, and exports Laya typed-decision models
laya-blueprint-es
CamiloBernal
A Spanish-language guide teaches Laya installation, evaluation, integration, and production use
mesh-decisions-playground
michaelneale
Provides a local web interface for making Laya decisions through Mesh LLM
Claude-laya
HardikCoder45
A Claude Code plugin uses Laya to select models, skills, agents, and plugins for each prompt
laya-jev-benchmark
eugeneproai
Compares local Laya and hosted Jev across decision scenarios with benchmark telemetry
SafeSphere.ai
akshayvibe
Detects harassment and stalking locally in social and email services using Laya via ONNX
laya-mlx-http
noahwaldner
Serves laya-mlx decisions over HTTP and provides a Vercel AI SDK adapter
browser-laya
wexare-ai
Runs the Laya decision model in browsers using WebGPU or ONNX Runtime Web
pi-laya-bridge
DrGekoz
Adds a local Laya-backed typed-decision tool to the Pi agent
dsh-router-laya-deploy
kaijin1448
Deploys and patches a local Laya decision service and its OpenCode integration on Windows
DSH-Laya-Tool-Router
residenthiago2011
Uses Laya typed decisions to reveal relevant DSH tools on demand
business-classifier-benchmark
EduardoMoraga
Benchmarks classical classifiers against Jev and Laya for employee attrition prediction
replacing-ReAct-Hardcoded-Agent
tharunreddym-ai-dev
A Telegram assistant uses Laya decision gates to manage memory, web search, and retries
leanest
baronunread
A TypeScript test selector uses semantic judgments from classifier.dev, Jev, or Laya
@ursuciprian/reflex
ursuciprian
Gates coding-agent commands and scans content for prompt injection using local rules, Jev, or Laya
decisionlint-mcp
nolindnaidoo
Provides MCP tools to lint and repair questions sent to Jev or Luna decision models
@system-one-ai/model-laya
GitHub Actions
Adds optional Laya model plugins to System One browser and Node runtimes
In-process: @receptron/laya
@receptron/laya runs the model with ONNX Runtime, so neither Python nor PyTorch is needed at runtime. It requires Node.js 20 or newer.
npm install @receptron/laya
import { Laya } from "@receptron/laya";
const laya = await Laya.load();
const result = await laya.systemOne(
{ subject: "Refund not received", body: "I cancelled two weeks ago and still have no refund..." },
{
department: {
type: "choice",
instructions: "Which team should handle this ticket?",
criteria: { billing: "payments, refunds, invoices", support: "product help and bugs", sales: "new purchases" },
},
churn_risk: { type: "noul", instructions: "Is the customer likely to cancel or dispute?" },
},
);
result.answers.department.choice; // "billing"
await laya.close();
Per its README, the fp32 ONNX weights are about 1.7 GB and download on first use. Budget roughly 2 GB of RAM. A three-question call takes about 140 ms on an Apple Silicon CPU once warm, and the output matches the Python implementation to four decimal places. The package is MIT-licensed; the weights are Apache 2.0.
Over HTTP: laya-studio
laya-studio is a zero-dependency TypeScript client for a running Laya server (Node.js 18.17+):
npm install laya-studio
pip install "laya[serve]"
laya-serve # binds 0.0.0.0:8000
Other JavaScript projects
- @r4ai/laya-web: ONNX Runtime Web runtime for browsers and Node.js.
- kevala: a Rust engine compiled to WebAssembly with WebGPU kernels, installable from npm.
- gg-friggin-ez: a profanity and toxicity screener that defaults to Jev and can point at a local Laya endpoint.
Caveats
The English checkpoint's options must fit a 192-token budget and the state is cut at 512 tokens. The receptron README recommends fewer than about 20 options per choice question.
More ways to use Laya