Run Laya in the browser
Laya is small enough to run in a browser tab with no server and no API key. The input never leaves the page. The trade-off is a download of several hundred megabytes on the first visit and much slower inference than a native runtime.
361 projects
laya-ludo
mnk786
A browser-based four-player Ludo game uses Laya and Jev to choose legal moves
laya_pong
luceinrock
A Pong game uses Laya to refine server-side AI paddle moves
laya-jev-homeautomation
CoryHawkless
A home-automation command router and benchmark harness exercises Laya
laya-browser-mcp
bala2006
Adds local Laya-driven browser automation tools and an Autopilot loop to Playwright MCP
Laya-Android-Coin
yvyvyvbing
Packages Laya as an offline Android decision app using quantized ONNX and a WebAssembly runtime
decision-making-model-testing-laya
APouzi
Provides a Svelte interface and Go backend for experimenting with Laya decision models
power-bi-visual-doctor
riishabhz
A local triage tool that finds broken Power BI visuals and explains their likely causes
neo-vs-morpheus
hakkisagdic
An Ultima Online duel bot driven by local Laya or cloud Jev decision models
@wexare/laya-web
sarozarena
Runs the Laya typed-decision model in browsers using ONNX Runtime Web
laya-systemone-static
afelin
Hosts a static placeholder for a planned Laya system-one API while awaiting compute access
laya-ai
iSabbir
Combines the Laya decision engine with support-triage tools and AI-guided browser games
laya-ts-example
poad
A local web playground runs Laya through a Node.js API server using ONNX Runtime
Laya-Playground
Emil-Wilson1
Provides a FastAPI playground for making typed decisions with Laya
laya_studio
Saksham1515
Provides a static learning path and reference guide for the Laya decision model
jev-vs-laya
soummyaanon
A web-based arena compares Jev and Laya classifiers on shared tasks and reports performance metrics
jev-laya-cube-arena
189-sketch
Compares Jev and local Laya on Rubik’s cube next-move decisions
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
CodeAgentLab
YeChenglin8888
A lightweight Python coding-agent system that integrates Jev and Laya for browser and application tasks
laya-multilingual-webapp
realizer-1966
Runs the multilingual Laya decision engine as a browser PWA using ONNX Runtime Web
LayaGamer
psurge1
Provides harnesses and a web dashboard for playing games with Laya decision agents
layaUI-HK
whksoup
Runs a local Laya playground, games, benchmark, and agent skill
jev-spaceshooter-demo-laya
jstdlee
Steers a retro space shooter with Laya decision models through a local API
laya-lab
InfiniteXyy
A playground demonstrates Laya-powered routing, browser tests, and semantic log filtering
laya-decision-lab
clearflow-automation
Presents recorded Laya Snake decision runs and research findings in a static browser replay
Libraries
kevala is a zero-dependency Rust engine compiled to WebAssembly, with WebGPU kernels. It works from any page:
<script type="module">
import { Kevala } from "https://cdn.jsdelivr.net/npm/kevala@latest/js/src/index.js";
const kevala = await Kevala.load({ model: "laya", onProgress: console.log });
</script>
or pnpm add kevala. According to its README, the Laya int8 pack is 479 MB and is kept in browser storage after the first visit.
@r4ai/laya-web runs ONNX Runtime Web with WebGPU and a WebAssembly SIMD fallback, and is designed to run in a Web Worker:
npm install @r4ai/laya-web onnxruntime-web
Demos you can open
- layaForWeb: the English checkpoint as quantized ONNX (default build about 440 MB), with a live demo.
- open-jev-laya: multilingual Laya on Transformers.js (fp16 ONNX about 647 MB) with Gomoku, Big Two and a 3D maze.
- layaAsRagJudge: checks RAG claims against retrieved evidence entirely in the tab.
Speed and support
The layaForWeb README reports that a three-question call on the default WASM backend took about 2 to 5 seconds on a 2-core machine. In that project, WebGPU works only with the int4 build, because ONNX Runtime's WebGPU MatMulNBits kernel supports 2- and 4-bit weights. open-jev-laya tries WebGPU and falls back to WebAssembly.
Caveats
Quantized browser builds do not match PyTorch exactly. layaForWeb reports 97.9% top-answer agreement for all three of its quantized builds, with the largest probability gaps in int4. For a real-time loop, laya-pong keeps the model native. Its README gives the reason: the checkpoint wants about 2.4 GB resident in f32, and wasm32 has a 4 GB address space and no Metal.
More ways to use Laya