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.

329 projects

laya

receptron

Runs Laya typed-decision models from Node.js and TypeScript through ONNX Runtime

450·GitHub repo

mu

qybaihe

Provides a coding agent with a judgment kernel that can use Laya as its local judge

179·GitHub repo

chat-seek-vscode

fstandhartinger

A VS Code extension searches chat archives and uses Laya to rerank matches

66·GitHub repo

laya-server

1Panel-dev

Self-hosts Laya decision models through an API and web interface compatible with Jev

54·GitHub repo

laya-pilot

anthonyli

Generates and replays Excel browser tests using Playwright and local Laya decisions

45·GitHub repo

laya-vs-jev-arena

PromptEngineer48

Pits locally run Laya against Jev in Snake and fighting games

29·GitHub repo
M

laya-onnx

Mattepiu

Exports a fine-tuned Laya decision model to ONNX for Python and Node.js inference

15·HF model

laya-drift

pythongiant

Monitors opencode sessions for semantic drift using Laya typed-decision probes

15·GitHub repo

jevcache

kushals256

Caches OpenAI-compatible chat responses using same-intent adjudication with Jev, Laya, or local compatible servers

12·GitHub repo

open-jev-laya

killkli

Runs Laya multilingual ONNX inference in browser-based decision demos

11·GitHub repo

fast-jev-compaction-laya

kaiyes

Compacts OpenCode context using decisions from a locally served Laya model

8·GitHub repo

gg-friggin-ez

ItisShikhar

Screens Node.js text for profanity and toxicity using Jev and Laya System 1 models

7·GitHub repo

dsh-laya

PerryLink

A Cordis plugin exposes Laya typed decisions as tools for DeepSeek Harness

6·GitHub repo

layaForWorkflows

vishalmysore

Runs browser-based Laya decisions to automate branching workflows

6·GitHub repo
R

laya-onnx

receptron

Exports Laya to ONNX for use with Node.js or ONNX Runtime

5·HF model

laya-decision-brain

kevinbadi

Provides a web lab for Laya decisions on survey data and a Snake game

5·GitHub repo
O

laya-multilingual-ONNX

onnx-community

Provides an ONNX conversion of Laya multilingual for use with Transformers.js

468·HF model

Ollaya-Web-UI

samarkandiy

Provides a browser interface for deciding questions and managing models on an Ollaya server

4·GitHub repo

kevin

gauravsaini

Runs a browser automation agent that uses Laya-ONNX to rank candidate actions

3·GitHub repo

laya-web

r4ai

Runs Laya typed-decision models in browsers and Node.js using ONNX Runtime Web

3·GitHub repo

auto-mode-for-paseo

obetomuniz

Routes Paseo messages to personas using TypeSafe Jev or a local Laya model

3·GitHub repo

shed

IAmUnbounded

Provides remote access to desktop coding-agent sessions with local Laya-based routing

3·GitHub repo

laya-router

marcreichel

Routes Claude Code sessions to a model based on a locally classified first prompt

3·GitHub repo
K

open-jev-laya-multilingual-onnx

killkli

A browser-ready ONNX export of Laya multilingual for typed decisions

358·HF model

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