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

decision-lite

cckyros

Provides a Jev-compatible MCP decision server with pluggable local and hosted model backends

0·GitHub repo
G

@tanstack/ai-ollaya

GitHub Actions

Connects TanStack AI to local Ollaya or Laya servers for typed decision evaluation

0·npm package
K

@fllstck/mlayax

kay-is

Runs the Laya typed-decision model in Node and Bun on Apple Silicon using MLX

0·npm package
R

@reasoning-router/classifiers

robertn702

Provides reasoning-effort classifiers for Jev, Clef, and Laya through HTTP

0·npm package

laya-compaction

bussolabs

A Claude Code plugin that uses Laya decisions to compact context by dropping or truncating tool history

0·GitHub repo

laya-router

bussolabs

A Claude Code and Codex plugin that routes each turn to a model tier using Laya decisions

0·GitHub repo

22-minds

Satya141

Runs a football simulation where each player uses Laya to choose actions during play

0·GitHub repo

outfit-decider

bo-830

Ranks outfit photos with quick structured scores and optional multimodal analysis

0·GitHub repo

laya

junaidariie

Classifies and routes support tickets with Laya before generating responses

0·GitHub repo

playwright-laya-healer

sahil9256

Uses a local Laya/Jev decision model to repair and verify broken Playwright locators

0·GitHub repo

Jev-Laya

SilverRuler

Runs Laya locally behind a Jev-compatible API and browser playground

0·GitHub repo

LLMAutoRouter_Laya

nitesw

Routes Claude Code prompts to model tiers using a fine-tuned Laya decision model

0·GitHub repo

laya

jetmiyoung

Provides a multilingual typed-decision engine with Python and integrations for serving and agent frameworks

0·GitHub repo

jev-pipeline-analysis

bogdancstrike

Enrich text locally with configurable GLiNER and Laya analysis engines

0·GitHub repo

system-one-harness

mev0lent

Compares Laya and other decision models as gates for HTTP response triage

0·GitHub repo

triage-cascade

teddywinglee

Routes support tickets through a Laya classifier and escalates uncertain cases to a local LLM

0·GitHub repo
G

dsh-system1

GitHub Actions

Provides typed System One decisions for DeepSeek Harness plugins with Jev, Laya and Clef providers

0·npm package

jev-creator-decoder

sujalkanere

Labels YouTube Shorts and evaluates hooks using local Laya or the optional Jev model

0·GitHub repo

decision-model-arena

dante01yoon

Compares four decision models, including local Laya, across games and image-based decisions

0·GitHub repo

laya-heart

r5x8ksva-del

A local desktop copilot uses Laya to interpret couple chats and Gemma to draft reply suggestions

0·GitHub repo

Laya

areeb26

Provides a multilingual typed-decision model with Python, server, MCP, and framework integrations

0·GitHub repo

ducktape-laya

adrian729

Embeds local Laya GGUF inference through C++, Rust, Node.js and experimental browser bindings

0·GitHub repo
G

@marg-adk/verdict

GitHub Actions

Provides typed decision cascades with Laya support, calibration, an MCP server, and an HTTP server

0·npm package

laya-mcp

Hypokoto

Runs the Laya ONNX decision model locally and exposes policy and code-analysis tools through MCP

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