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-decision-studio

Hetgandhi25

Runs local Laya decision models for incident triage with an Ollama fallback

0·GitHub repo

laya-triage

CodeCave0000

Adds local Laya-based message triage to the OpenClaw agent plugin

0·GitHub repo

Laya-Workflow-Retrieval

sanjanabhat846

Uses Laya to select verification checklists for engineering code reviews

0·GitHub repo

hermes-laya-tools

andrei-tolstov

Routes Hermes Agent tool calls and categorizes tools using Laya decision inference

0·GitHub repo

llm-model-router

dmoonat

Routes Google ADK requests between models using Laya typed decisions

0·GitHub repo

trustreflex

Maverick7

A calibrated local assistant learns from Ollama or Laya and routes trusted answers to a fast student

0·GitHub repo

dsh-laya-mcp-skill-router

royalallen

Routes tools and agent skills using Laya decisions and local embedding-based recall

0·GitHub repo

Sparrow-Voice-Control

SparrowO7

Routes Windows voice commands using speech recognition and an optional LAYA classifier

0·GitHub repo

decision-models-vs-small-llms

pournasserian

Compares Laya and other decision models with small LLMs across six agent decision tasks

0·GitHub repo

aitomaton

sirmmo

Analyzes infrastructure errors and dispatches coding agents based on rules, Laya, Jev, or other LLMs

0·GitHub repo

DecisionOps

ellisgeeker

Certifies and monitors decision-model confidence thresholds to route uncertain predictions for review

0·GitHub repo

laya-vs-local-llm

vyshakhgnair

Compares Laya with a local language model on tool routing and document classification

0·GitHub repo

LAYA-NPU

hellonearthis

Serves Laya-based intent classification and decision routing with Intel NPU acceleration

0·GitHub repo

home-router

cloudeeo

Routes home-assistant requests locally using Laya before running commands, search, or chat

0·GitHub repo

dispatch-system1-router

rafi-seniang

Compares Jev, Laya, and other decision methods in a configurable text-triage router

0·GitHub repo

question-triage-laya

Thaw-Zin-Myo-Aung

Classifies student questions with Laya and routes them to the appropriate learning-assistant workflow

0·GitHub repo

pennywise

1sakshm

Trains a Laya decision model with reinforcement learning to route requests across LLM tiers

0·GitHub repo

laya-gpt

stevenke1981

Uses a local Laya model to select reasoning effort for GPT and resume prematurely ended turns

0·GitHub repo

s1kit

Eliot5566

Tests, calibrates, and routes System One decision models, including Laya, on custom data

0·GitHub repo

laya-toolselect

surajmhaske02

Selects relevant tools for LLM agents with an optional Laya judge

0·GitHub repo

agentic-rag-laya

qaq1902

Tests Laya decision models as optional components in an agentic RAG workflow

0·GitHub repo

hermes-laya-router

axelBrei

Routes home automation requests using Laya decisions and executes supported actions through Home Assistant

0·GitHub repo

Router-LM-Studio

BouchezMarc

Routes prompts to locally hosted LM Studio models based on intent classified by Laya

0·GitHub repo

laya-documentation

P0dp1vass

Documents Laya in Russian with production examples for routing, moderation, prioritization, and HTTP serving

0·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