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

jev-laya-cube-arena

189-sketch

Compares Jev and local Laya on Rubik’s cube next-move decisions

0·GitHub repo

TALK---A-Decision-Making-Model-Leveraging-Laya-and-Jev-

navzar81-dev

Provides a voice-first decision app combining Laya with cloud LLM research and document grounding

0·GitHub repo

canvastty-plugin-assistant

BIackFIame

Adds a CanvasTTY assistant for command review, task triage, and orchestration advice

0·GitHub repo

pi-context-gc

Lausi-h2ai

Archives old tool outputs for Pi coding agents and evaluates retention policies with local judges

0·GitHub repo

system-one-playground

goodboybeau

A macOS playground comparing Laya, Decider, Kev and Jev on accuracy, calibration and performance

0·GitHub repo

s1cap

Jaffe2718

Uses System-1 decision models to manage agent context recall and rank candidate plans

0·GitHub repo

classificacao-msg-streams

Joao-V-A-Braga

Classifies new YouTube live-chat and Instagram post messages with Laya in a real-time dashboard

0·GitHub repo

laya-multilingual-webapp

realizer-1966

Runs the multilingual Laya decision engine as a browser PWA using ONNX Runtime Web

0·GitHub repo

laya-gui

f95f

Provides a local chat interface for making decisions with the Laya model

0·GitHub repo

laya-router

suradisworkspace

Routes Claude Code turns between model tiers using a local Laya classifier

0·GitHub repo

laya-lab

InfiniteXyy

A playground demonstrates Laya-powered routing, browser tests, and semantic log filtering

0·GitHub repo

Laya-model-router

MikkelCardon

Routes prompts to Claude models by task type using Laya classification

0·GitHub repo

laya-first-try

diemrt

Finds and ranks local files with Laya, with CPU and OpenVINO inference options

0·GitHub repo

laya-repo-radar

kks007-dev

Classifies local Git repositories by lifecycle stage using the Laya decision model

0·GitHub repo

laya-local-serve

yyong-brs

Runs Laya locally with Python, TypeScript, and integrations for serving and decision workflows

0·GitHub repo

laya-on-aws-lambda

gunnargrosch

Deploys Laya as a Jev-compatible decision API on AWS Lambda using TypeScript or Python

0·GitHub repo

jev-laya-form-builder

slamer59

Builds forms by letting hosted Jev or local Laya choose suitable input components

0·GitHub repo

testing_arena_jev_vs_laya

Shadowsweep

Compares Jev and Laya in an automated security attack-detection and defense system

0·GitHub repo

elevator-decision-arena

CircleCI-Research

Benchmarks Jev, Laya, and classic algorithms for simulated elevator dispatch decisions

0·GitHub repo

jev-labs

valdepeace

A TypeScript harness compares Jev, Kev and Laya typed-decision engines and publishes experiment results

0·GitHub repo

decide.js

asertyui1

Provides a typed SDK and CLI for routing decisions across Jev, Laya, local models, and offline heuristics

0·GitHub repo

laya-studio

ewrogers

Provides a local web workspace and Jev-compatible API for trying Laya decisions

0·GitHub repo

laya-project

wjesus374

A local Laya decision service with a FastAPI backend, SQLite storage and React dashboard

0·GitHub repo
V

@molecule/api-ai-decisions-laya

vialoh

Connects molecule.dev to a self-hosted Laya model for typed choice, score and yes/no decisions

0·npm package

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