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
jev-pipeline-analysis
bogdancstrike
Enrich text locally with configurable GLiNER and Laya analysis engines
bouncer
Faycall1l
Moderate live chat with programmable rules and typed decisions in a single model pass
ai-os-decision-layer
amariwan
Runs deterministic-first local decisions with optional Laya and other advisory model backends
system-one-harness
mev0lent
Compares Laya and other decision models as gates for HTTP response triage
triage-cascade
teddywinglee
Routes support tickets through a Laya classifier and escalates uncertain cases to a local LLM
dsh-system1
GitHub Actions
Provides typed System One decisions for DeepSeek Harness plugins with Jev, Laya and Clef providers
laya-api
mehrdadjalili
Serves multilingual Laya inference through a FastAPI endpoint with language-based model routing
zionladder
dogebi
Measures proxy-node performance and uses a local Laya verdict to select a connection
you-decide
kkang132
Demonstrates local Laya-based customer complaint routing and lets users grade its decisions
laya-triage
Gargeesharmaa
Routes real-time alerts through local Laya decisions and escalates unresolved cases to Groq
Trying_Laya_model
harshagale1355
ERP chatbot that routes questions to Text-to-SQL or RAG with a fine-tuned Laya router
llm-router
juandsep
Routes prompts to model tiers according to difficulty decisions from a fine-tuned Laya model
decision_api_benchmark
guming3d
Benchmarks decision engines, including Laya, on model routing accuracy, latency and cost
laya-multi-model-router
Mukunthan-A-R
Uses Laya to classify query complexity and route requests to LLMs through LiteLLM
layahost
Demo
Hosted Laya API, Jev-compatible, with Cloudflare Clef on the same endpoint
laya-swedish-preference-gate
joenaess
Uses fine-tuned Laya to judge Swedish response preferences and route uncertain comparisons
rlcd-tool-selection
VectorSophie
Compares Laya and Jev tool selection with native and decomposed LLM tool-calling approaches
roteador-modelos-ia
SBMurilo
Routes requests to Claude models by difficulty and compares rules, Claude, and Laya classifiers
laya-skill-router
bappisinsane
Routes Hermes Agent requests to skills using Laya’s typed decisions and calibrated probabilities
orphusbot
kelvincushman
Provides self-hosted task bots that use Laya for routing and checking risky actions
davinci-laya-zcode
Ydjin1984
Integrates a local Laya decision engine into ZCode with risk gates, context ranking, and MCP tools
laya-hub
surtr85
Routes MCP servers and agent skills using Laya System-1
laya-ai-local-llm
RohaizadMaznan
Routes chat requests with Laya before a local Ollama model generates replies
laya-dealership-lead-triage
Rafash-Wiz
Classifies dealership leads with Laya and routes them to sales actions
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