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

P

@mokei/mcp-system-one

paul_lecam

MCP server exposing a System One predict tool, backed by local laya-serve or the hosted API

0·npm package
P

@mokei/system-one-client

paul_lecam

TypeScript System One client that works with a local laya-serve backend

0·npm package
J

@johnhenry/aimatey-native-laya

johnhenry

Runs ConvAI's Laya typed-decision model on-device through a TypeScript ONNX Runtime port

0·npm package
D

cortico-world-simple-trpg-check

dtmosken

A TRPG skill-check tool scores skill success with Laya or Jev and resolves d100 rolls

0·npm package
E

@ejstembler/pi-classifier-router

ejstembler

Routes Pi and Oh My Pi prompts to models using typed decisions from Jev or Laya

0·npm package
G

@gabedsam01/decision-maker

gabedsam01

Provides typed decisions for AI agents through a Pi adapter and local Laya or hosted Jev

0·npm package
G

@plumbus/ai-decision-laya

GitHub Actions

Provides a self-hosted Laya typed-decision adapter and Python reference service for Plumbus

0·npm package
E

jev-arena

eliot5566

Lets users create text-driven fighting bots piloted by Jev, Laya, or other models

0·npm package
Z

@zatsepin/jigor

zatsepin

Offers a CLI and HTTP gateway for local ONNX Laya and von models and remote Jev decisions

0·npm package
S

laya-demo

siloh12

Runs a browser demo that calls a Gradio Space to make typed decisions with Laya

0·HF Space

Laya

rkvishwa

Provides a local playground for composing queries and calling a self-hosted Laya server

0·GitHub repo

layatest

krish154

Combines Laya, Qwen, and MCP tools in a modular local AI agent

0·GitHub repo

laya-demo

Majczana

Demonstrates Laya decision scoring for emoji selection with choice and yes/no experiments

0·GitHub repo

ask-laya

v3moreno

Routes agent decisions through a local Laya daemon for classification, relevance filtering, and yes/no scoring

0·GitHub repo

pixelkit-laya

PixelKit-Labs

Provides local typed-decision APIs and ONNX inference adapters for TypeScript and React Native

0·GitHub repo

laya-lead-scoring

reislucaz

Scores CRM leads against ideal-customer criteria using calibrated Laya probabilities

0·GitHub repo

laya-browser-use-skill

xnetsc

A portable decision skill bundles a local Laya model with a WebGPU runtime and browser adapter

0·GitHub repo

morning-agent

shauryajain07

A macOS morning briefing CLI uses local Laya-MLX for typed decisions

0·GitHub repo

n8n-nodes-layahost

Negmus

n8n community node for layahost: Laya and Clef decisions, flows and moderation in n8n workflows

0·GitHub repo

local-ai-tetris

jaredjlg2

Runs local Tetris games with Laya and other AI models making inspectable decisions

0·GitHub repo

jev-mcp

nik1tsyganov

MCP stdio servers expose TypeSafe Jev and a separate local Laya decision model

0·GitHub repo

decision-model-eval

relevan-dev

An evaluation compares Laya, Jev, and Claude on search-index configuration decisions

0·GitHub repo
P

glove-classifier

porkytheblack

Provides typed-decision adapters, cascades, and tools for Glove agents, including Laya and Jev backends

0·npm package
J

mahabodi

jollypk

Combines topology memory and ONNX Runtime-based Laya decisions in a System-1 engine for AI agents

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