Skip to content

Laya for Node

Node.js and TypeScript package that runs Laya through ONNX Runtime with typed answers matching the Python and Jev API shapes.

Servicebeta

Overview

@receptron/laya runs Laya, the open Jev-compatible System One decision model from Convai Innovations, from Node.js and TypeScript using ONNX Runtime, with no PyTorch or Python at runtime. You pass a state such as a ticket and typed questions; it returns every answer with calibrated probabilities in one forward pass: a choice with per-option probabilities, a score as an expected level with its distribution, and a noul probability. The request and response shapes match Laya's Python reference and Jev's system_one API, and the README says outputs match Python to four decimal places.

Answer types follow question types, so TypeScript knows a choice answer from a noul answer without casts. The ONNX weights (about 1.7 GB, FP32) download from Hugging Face on first use and are cached locally; you can also point to a local export, choose a checkpoint variant, or pin a revision for reproducibility. It needs Node 20+ and about 2 GB of RAM.

What the decision model decides

TypeQuestionAnswers
ChoiceWhich team should handle this ticket?billing · support · sales
ScoreHow urgent is this ticket?not urgent · somewhat urgent · urgent · critical
Yes / noIs the customer likely to cancel or dispute?—

How it works

  1. npm install @receptron/laya
  2. Laya.load() downloads and caches ONNX weights
  3. Call systemOne(state, questions)
  4. Use typed answers and probabilities
  5. Close the model when done

Strengths

  • No Python runtime needed
  • Typed answers in TypeScript
  • Output parity with Python to four decimals
  • Pinnable model revisions

Caveats

  • 1.7 GB download and about 2 GB RAM
  • FP32 only per the README
  • CPU inference speed not stated in the excerpt

Getting started

npm install @receptron/laya, then const laya = await Laya.load(); await laya.systemOne(state, questions).

At a glance

Type
Service
Status
beta
Language
TypeScript
Runtime
Node.js 20+ with ONNX Runtime
Has code
yes

Use cases and integrations

How curated lists describe it

  • Run Laya, the open-source Jev-compatible System-1 decision model, from Node.js…

    wh000wh000/awesome-jev-live
  • Runs Laya, an open Jev-compatible System One model, from Node.js and TypeScript through ONNX Runtime.

    MrJev/awesome-jev

Frequently asked questions

Do I need Python?

No, it runs Laya through ONNX Runtime in Node.

Is the API compatible with Jev?

The request and response shapes match Jev's system_one API.

How big is the model?

About 1.7 GB of FP32 ONNX weights.

Related projects

  • Go harness for System One models: hosted Jev, open Kev in-process via llama.cpp, and Cloudflare Clef, with typed helpers and a CLI.

    ServicebetaGo
  • TypeScript library for one-line local decisions with open models (kev-0.6b, kev-4b, open-jev), no API keys or cloud.

    ProjectbetaTypeScript
  • Swift 6 bridge that runs System One decision models behind Apple's Foundation Models API, on device with Laya or via hosted endpoints.

    ProjectbetaSwift
  • Zero-dependency npm package that runs Laya natively or as WebAssembly in Node, Bun and browsers, drop-in for Jev's /v1/systemone.

    ProjectbetaJavaScript
  • Local-first desktop AI workbench for llama.cpp, vLLM and SGLang that includes a JEV typed-decision page and /v1/systemone gateway.

    Servicebeta
  • Runs the open LAYA decision model under Bun with native ONNX inference behind a TypeSafe-compatible API, plus an English/Persian playground.

    LibrarybetaTypeScript