Routing with Laya
A router runs before every request, so its own latency and cost land on the critical path. Laya answers a routing question in one forward pass with no generated tokens, which makes it a natural fit for choosing an LLM tier, a support queue or a tool.
342 projects
omarchy-agent
pranav6266
Runs an offline Linux voice assistant that uses Laya to route user requests
pi-laya-skill-router
ericmjl
Routes pi coding-agent requests to relevant skills using a local Laya model
layaMOE
vishalmysore
Routes Laya requests to domain-specific expert heads, with a browser demo using ONNX Runtime Web
general-decision-with-laya
chenking2020
Provides a multilingual decision platform using locally loaded Laya weights for typed answers and confidence gating
Civic-Signal-Laya
satiricalguru
Routes multilingual public-service requests with Laya and presents decisions for human review
laya-router
vuongvm812
Sets up local Laya classification and Jev Router proxies for coding clients
laya-router
Gjusev
Routes prompts between inexpensive and frontier models through an OpenAI-compatible proxy using Laya
laya-triage
Gjusev
Uses Laya for multilingual support-ticket routing, risk signals, and confidence-based escalation
hoja-de-ruta
fcori47
A Python web app orders YouTube videos into learning roadmaps using Jev or Laya
Claude-laya
HardikCoder45
A Claude Code plugin uses Laya to select models, skills, agents, and plugins for each prompt
hermes-laya
agusbyna
A Hermes Agent plugin uses Laya for local triage, classification, routing, and risk flags
google-adk-laya-router
derrickqin
A Google ADK example routes requests among Gemini tiers using Laya and evaluates routing results
ComfyUI-SystemOne
dante01yoon
Adds ComfyUI nodes that route workflows using local Laya or hosted Jev judgments
LayaResolve
jasgigli
Routes and triages problems with the Laya decision model family
DSH-Laya-Tool-Router
residenthiago2011
Uses Laya typed decisions to reveal relevant DSH tools on demand
evolve-router
holny
Routes LLM requests through a local gateway using Jev and a multilingual heuristic
neo4j-laya-exploration
Satyaprakash27
Routes LangGraph agents using Laya decisions informed by Neo4j episodic memory
OpsOne
prannesshkva
Automates cloud operations and cost remediation using LangGraph, FastAPI, and Laya decisions
system-one-aiops-demo
blacksoxx
Demonstrates Laya-based Kubernetes alert triage with typed decisions and calibrated probabilities
laya-api
saleejkuruniyan
Provides a hosted and self-hosted API for Laya decision and routing inference
pi-laya-server
sklearnin
Serves Laya prompt classifications to a pi extension for routing prompts by effort and security level
pi-laya-model-router
izolight
Routes Pi sessions to mapped models using task classifications from a local Laya server
laya-homelab-decisions
daviestechlabs
A synthetic dataset supports training and calibration for a Laya homelab routing experiment
Delveta-LayaChoice-v1-data
eric-ml-nlp
Chinese and English capability-selection dataset used to fine-tune and test a Laya model
Built-in router preset
The core package ships a question set for small-versus-frontier model routing:
import laya
agent = laya.load("convaiinnovations/laya")
routing = agent.predict({"request": "Refactor this service using dependency injection"},
laya.router_questions())
For LangGraph there is a conditional-edge router with a confidence fallback:
from laya.integrations.langchain import LayaRouter
router = LayaRouter(
criteria={"billing": "invoices, charges", "tech": "bugs, outages"},
confidence_threshold=0.80,
fallback="human_agent",
)
workflow.add_conditional_edges("triage", router)
Note that laya.Router is a different thing: it picks which Laya checkpoint answers, based on script and language.
Measured: Laya vs a reasoning model
laya_router put Laya and GPT-5 nano behind one endpoint and tested 180 labelled requests. Both scored 0.600 route accuracy, at 184 ms p50 for Laya and 6,415 ms for GPT-5 nano. The README also found that rewording the tier descriptions moved accuracy by 21 points.
git clone https://github.com/glukicov/laya_router && cd laya_router
uv sync --all-extras
uv run laya-router serve --backend laya
Projects
- system-one-router: an OpenAI- and Anthropic-compatible Go gateway where Laya or Jev answers topic, complexity, risk and private-data questions, then picks the cheapest adequate model.
- pi-pignon: a pi coding-agent extension that picks a model tier per prompt from a local
laya-serve(about 75 ms on Apple Silicon, per its README) or Jev. - laya-mcp (NVentimiglia): a
route_taskMCP tool for light vs frontier routing.
Caveats
In laya_router, Laya got 97% of small requests right but only 7 of 56 medium ones, so check each tier separately, not just overall accuracy. Write tier descriptions with concrete examples, and send low-confidence answers to a fallback.
Hosted option
layahost runs Laya behind the Jev-compatible /v1/systemone, plus /v1/decide templates for routing, support_intent and priority. Its decision flows chain questions in a visual editor (spam check, then intent, then team) and run the whole flow in one request, asking and billing only the questions on the path taken. Low-confidence answers can take their own branch to a person. layahost is run by the makers of laya.tools.
More ways to use Laya