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

openpave-jev

cnrai

Provides typed-decision commands for PAVE and Claude with local Laya and hosted Jev providers

2·GitHub repo

design-os-generative-ui

jangtrinh

Builds a generative UI engine using local Laya-MLX decisions and a TypeSafe JEV cascade router

2·GitHub repo

Routapse

pooyaphoenix

Routes prompts to models or specialist agents using Laya or Jev classification

2·GitHub repo

Cascade_Router

EllroyOfficial

Routes requests through a three-stage cascade using Laya decisions, RAG checks, and output safeguards

2·GitHub repo

systemone-lab

baldellimtt

Demonstrates typed System One decisions with local Laya, a playground, routing examples, and evaluation tests

2·GitHub repo
A

laya-modernbert-decision-90pct

ameerhmz5

Fine-tunes Laya into a ModernBERT decision model and offers deployment formats

473·HF model
F

laya-v796

Falconsai

A ModernBERT-based Laya checkpoint for multilingual typed decisions and calibrated classification

151·HF model
E

relay-laya

eltonssouza

Provides a trained Laya classifier that routes coding requests by task, risk, and capability

86·HF model
T

laya-tr

TurkishCodeMan

Fine-tunes Laya for fast Turkish decision-making, candidate selection, and routing

40·HF model
B

laya-multilingual-calculator-router

Borcherding

A multilingual Laya model routes agent steps by predicting whether they need calculation

18·HF model
T

laya-for-clara

TheWiderLensInitiative

A Laya fine-tune routes assistant messages and selects the level of agent effort

8·HF model
E

laya-triage-en

elnachto

A Laya fine-tune that classifies GitHub issues for automated triage

1·HF model
E

laya-triage-multilingual

elnachto

A multilingual Laya fine-tune for classifying GitHub issues

1·HF model
I

laya-voice-router

IAMCB

Gated Laya fine-tune for voice-agent tool routing, tagged multilingual and Hinglish

1·HF model
R

sunday-laya-router

rithulkamesh

Fine-tunes Laya for Sunday agent intent routing and distributes the model as an ONNX export

1·HF model
I

laya-soc-bounded-triage

infosecn1nja

Publishes configuration and aggregate evaluations for a bounded Laya-based SOC triage layer

1·HF model

hermes-skill-router

cdepuy

Routes tasks to relevant Hermes skills using a local Laya model or SemIf

1·GitHub repo

pi-laya-router

AdelysAlberto

Routes Pi coding-agent prompts using local Laya classification on Apple Silicon

1·GitHub repo

decide

gopaljigaur

Provides a Python client that chains Laya with hosted and other decision-model backends

1·GitHub repo

laya-omni-agent

yashrastogi069-dev

An autonomous agent combines local Laya or Jev routing with cloud reasoning and browser, OS, and data tools

1·GitHub repo

Tern

AmRitJain0442

A model router uses local Laya-MLX inference to select between configurable provider tiers

1·GitHub repo

moex-wall-trader

antonBy77

Researches MOEX order-book signals with a Laya- or Jev-compatible AI trading gate

1·GitHub repo

god-llm-decisions

surajvs2710-stack

A decision engine fuses Laya and Jev predictions with confidence weighting and auditable logs

1·GitHub repo

laya-studio-node

ajayjha1

Provides a Node.js and TypeScript toolkit for Laya classification, routing, CLI, and MCP use

1·GitHub repo

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_task MCP 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