Laya for Python
The reference implementation of Laya is the `laya` package on PyPI, maintained by Convai Innovations under Apache 2.0. It ships three checkpoints, a Router that picks one per request by script and language, a CLI, an HTTP server and an optional MCP server.
696 projects
laya-mac-serve
chrisns
Serves Laya from a macOS menu bar app through an OpenAI-compatible HTTP endpoint
localjev-mlx
rimusz
A self-hosted System One judgment service for Apple Silicon using laya-mlx
rimworld-autopilot
Georgy-hook
A local RimWorld colony autopilot uses Laya to choose and issue in-game orders
chinese-workflow-decision-bench
Adkid-Zephyr
Benchmarks Jev and Laya on synthetic Feishu message classification scenarios
decide
gopaljigaur
Provides a Python client that chains Laya with hosted and other decision-model backends
system-one
asynq-io
Offers a provider-neutral SDK for typed decisions through hosted and local backends
doom-war
rythmn1111
Compares local MLX Laya and hosted Jev as decision-makers in a Doom deathmatch
laya
ganeshdipdumbare
Serves Laya typed-decision predictions over HTTP in a self-hosted Docker deployment
laya
DilwoarH
Wraps the Laya Router agent in a Flask API for typed-decision predictions
LayaStudio
biplovgautam
Fine-tunes Laya decision models locally on Mac and evaluates results before deployment
SmartMom
clydechen0228
Uses Laya for edge classification and training within a smart-factory operations platform
laya_dashboard
ghozifadilah
A REST API and web studio serve Laya decisions and manage workflows
laya-cn
yangshun2005
Provides a Chinese translation of Laya documentation for its multilingual typed-decision engine
laya-micro
osamabinIaggin
Prunes and quantizes Laya for low-memory single-board computer deployment
laya-invaders
inhabitants
Uses Laya to choose targets in a Space Invaders game and compares it with a rule baseline
jev-laya-benchmark
EnesDemir143
Benchmarks TypeSafe Jev and Laya-MLX on structured issue classification
laya-learning-demo
Daryl9441
A runnable tutorial teaches Laya decision primitives, routing, fine-tuning, and comparison with Jev
laya-omni-agent
yashrastogi069-dev
An autonomous agent combines local Laya or Jev routing with cloud reasoning and browser, OS, and data tools
tetris_for_laya
fchange
Provides a terminal Tetris environment where a local Laya model chooses each action
laya-mcp-mimo-desktop
miniongk
Bridges Laya typed decisions into MiMo Desktop through a local stdio MCP server
laya-mlx-per-turn-classifier
M37Labs
Demonstrates per-turn customer message classification with Laya on Apple Silicon
decision-infra
hufaei
Routes typed-decision requests to hosted Jev or local Reflex, SemIf, and Laya models
macos-use
ArdaOzd
Controls native macOS apps and Chrome using spoken or typed commands with local Laya or hosted Jev decisions
system-one-playground
minkhant1996
Provides a local web playground for Laya and other System One decision models
Install
Python 3.10 or newer, per the core README:
python -m pip install laya
Optional extras: laya[serve] (HTTP server), laya[mcp] (MCP server), laya[langchain], laya[onnx] (ONNX Runtime) and laya[fast] (TileLang GPU fast path).
First decision
from laya import Router
router = Router() # downloads a checkpoint on first use
state = "Hi, we were billed twice for March. Please refund the duplicate today or we will cancel our plan."
questions = {
"department": {"type": "choice", "instructions": "Which department should handle this?",
"criteria": {"billing": "invoices, payments, refunds",
"technical": "bugs, outages, system errors",
"other": "everything else"}},
"urgency": {"type": "score", "instructions": "How urgent is this?",
"criteria": ["not urgent", "soon", "blocking"]},
"churn_risk": {"type": "noul", "instructions": "Does the user threaten to cancel or leave?"},
}
result = router.predict(state, questions)
print(result["answers"]["department"]["choice"]) # billing
print(result["routing"]["model"]) # english
The package also installs a laya command, for example laya "My payment failed twice" --preset triage.
Checkpoints
| checkpoint | encoder | params | context |
|---|---|---|---|
laya |
ModernBERT-large | 421M | 512 |
laya-multilingual |
mmBERT-base | 322M | 1024 (up to 8,192) |
laya-typed-decisions |
ModernBERT-large | 421M | 1024 |
The README reports 32.8 ms for one question with laya-multilingual on a Tesla T4, and 193 to 464 ms per request on CPU with checkpoints preloaded.
Other Python projects
laya-mlx and laya-coreml for Apple Silicon, laya-openvino for Intel CPUs, edgejev for INT8 ONNX on CPU, and laya-mcp for agent tools.
Caveats
The README is direct about limits: the base checkpoints score near chance on its typed-decisions benchmark (0.362 and 0.352), and the 0.766 figure comes from the fine-tuned checkpoint. Temperatures should be refit on your own data before you trust the probabilities. The English checkpoint collapses on non-Latin scripts, which is why the Router exists.
More ways to use Laya