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

J

maclaya

jannisleifeld

Serves local Laya models on Apple Silicon through a Jev-compatible API with a dashboard and playground

0·npm package
G

is-even-a-decision

GitHub Actions

Checks whether numbers are even using a local open-weights Laya decision model

0·npm package

Miya

snowman6-git

Korean-first Minecraft agent driven by a fine-tuned Laya decision model

0·GitHub repo

layapilot

sanjeevranjaniitb

Simulates autonomous driving with Laya making real-time typed decisions

0·GitHub repo

laya-js

abhimanyupandian

Packages Laya for local inference in browsers and Node.js using ONNX Runtime

0·GitHub repo

laya-lab

BramBouma

Offers two playable local simulations featuring real Laya decisions, rules baselines, and replay

0·GitHub repo

laya-node-server

localhost-anon

A fully offline Node.js server and playground runs Laya through ONNX Runtime

0·GitHub repo

laya-http-client

angelxmoreno

Provides a typed TypeScript client for Laya's HTTP protocol, with an MLX bridge sidecar

0·GitHub repo

laya-browser-mcp

bala2006

Adds local Laya-driven browser automation tools and an Autopilot loop to Playwright MCP

0·GitHub repo

herdr-laya-router

candidosales

Routes coding tasks to AI agents using a local Laya classifier

0·GitHub repo

dsh-decision-layer

xbzbing

A structured decision plugin for DeepSeek Harness with configurable Jev-compatible backends

0·GitHub repo

neo-vs-morpheus

hakkisagdic

An Ultima Online duel bot driven by local Laya or cloud Jev decision models

0·GitHub repo

qa-intent

zjarlin

A Rust CLI that generates QA banks and compiles them into Laya/Jev decision requests

0·GitHub repo

vibecheck-jev

mgd34msu

Tracks coding-agent work in SQLite and verifies reports with a configurable judgment model

0·GitHub repo

laya-node

felipenmoura

A Node.js wrapper runs Laya as an authenticated Express classification server

0·GitHub repo

laya-server

criguex

A local Jev-compatible server runs Laya and can cascade uncertain decisions to Jev

0·GitHub repo

LayaPL

pleveneur

Runs locally converted Laya ONNX models from Node.js using ONNX Runtime

0·GitHub repo

laya-ts-example

poad

A local web playground runs Laya through a Node.js API server using ONNX Runtime

0·GitHub repo

laya-chess

Srimanvarma001

A local chess app compares Laya-suggested moves with a one-ply material check

0·GitHub repo

laya-client-example

angelxmoreno

Uses a Laya HTTP client to triage GitHub issues and compare category predictions with repository labels

0·GitHub repo

laya-node-client

felipenmoura

Provides a Node.js HTTP client for applications using a running Laya inference server

0·GitHub repo

fast-laya-compaction

kartikeyaagr

Trims stale Claude Code tool output using local Laya classification decisions

0·GitHub repo

laya-opencode-router

Wauuuuuu

A macOS OpenCode plugin routes tasks using local Laya classification and optional MLX models

0·GitHub repo

jev-vs-laya

soummyaanon

A web-based arena compares Jev and Laya classifiers on shared tasks and reports performance metrics

0·GitHub repo

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