embedding

An agent should not ask a language model every time it needs to decide.

We are building the decision layer underneath agents: typed answers, calibrated confidence, and the right to stop and ask a person. One forward pass, no text generated.

From the creator of laya, the first open source System 1 decision model.

Trained with the first open source reinforcement learning for calibrated decisions.

Running laya inside their products

claude — acme-payments
❯ install embedding-studio-cli and add the guard
$ npm install -g embedding-studio-cli
✓ added 1 package
$ studio guard install
✓ .claude/hooks/studio-gate.js
✓ .claude/settings.json Bash|Write|Edit
$ export STUDIO_API_KEY=esk_demo_7Qd4vK2mNp8RtXwZ
$ claude
hooks load at session start, so this one is gated
❯ tidy up the repo for me
Bash rm -rf src/ build/
❯ where is the retry logic?
Grep pattern="retry", path="src/"
Hook PreToolUse:Bash requires confirmation:
ask_a_human at 0.72 (band 0.90)
❯ 1. Yes
  2. No
run_now at 0.63 (band 0.90)
src/http.py:118 retry_after = backoff(attempt)
src/queue.py:44 retry = True
every Bash, Write and Edit judged before it runs· about a second· fails closed to a person

Two lines to install. npm i -g embedding-studio-cli && studio guard install

New: describe your company

Two lines about the company. A trained policy in ten minutes.

Studio researches the company and its competitors, writes one set of questions for the whole business, drafts labelled examples, has a second model relabel them blind, and trains on what survived. Every answer is automatic only when it can stand alone: a message it cannot pin to one answer, or one unlike anything it learned, goes to a person. Then make it yours: add your own examples, new questions and new options, and train again on everything without forgetting what it already knew. Run it in the cloud, or on your own machines with laya.

34,811

GitHub stars on laya

3,112

forks on laya

77,863

downloads on the Hub

6,452

Hugging Face likes

1,363

points on Hacker News

33 ms

median per decision

51

languages measured

Start here

Three decisions every agent makes, and none of them needs a sentence back.

If you are deciding what to put in front of an agent first, it is one of these three. All three ship today, each is one command, and each number below was measured on records nothing was fitted on.

  1. 01

    The guard rail

    shipped

    Every tool call an agent proposes is judged before it runs.

    60.9% cold, 95.7% fittedon records never fitted on

    46 held-out proposals, 26 of them risky. Fitted, 19 of 20 harmless calls run unattended and nothing destructive does. On a separate set of 67 file operations it held all 19 deletions written not to look like a deletion, and all 5 that write a script first and run it after.

    Layer 01: install the guard, paste a key, watch it stop a delete.
  2. 02

    Model routing

    shipped

    Each request goes to the cheapest model that can actually answer it.

    96.2% route, 100% stakeson records never fitted on

    26 held-out requests. An earlier fit scored higher on paper because every training row carried a context clause the eval kept too; with the clause gone it answered the stakes question wrong on seven. This one is measured without it.

    Layer 02: a request in, a tier out, and the stakes question beside it.
  3. 03

    The orchestrator's choice

    shipped

    The decision replaces the language model that picks which agent or tool runs.

    80% next agent, 0 wrong and confidenton records never fitted on

    The question sheet is generated from the MCP tool list, so a new tool is routed the run after it is registered. 25 held-out states. A frontier judge picks the agent more accurately than this does, up to 100%, and never stops to ask: Haiku is confidently wrong on two of the 25 and Sonnet and Opus on one each, where this is confidently wrong on none and hands 14 back.

    Layer 03: nine MCP tools, three agents, and the call it refuses to make.

Each one is the same call with a different question sheet. Fit it on your own cases, or run it cold and let it abstain until you have any.

Everything else

Fourteen question sheets, sorted by where the decision sits.

The three above are where to start. These are the rest of what ships, in the four places a decision goes in an agent's call path. Pick one and it is a project in a minute, or write your own sheet and ignore the lot.

What arrives

the record before anything acts on it

  • Prompt-injection guard

    A typed check in front of a model that reads untrusted text.

    prompt-injection-guard

  • Content moderation

    Clear the obvious posts and rank the rest for a human.

    content-moderation

  • Order screening

    Wave the ordinary orders through, hold the ones that look like fraud.

    order-screening

What it wants to do

the action, before it happens

  • Agent action gate

    A typed check on what an agent is about to do, before it does it.

    agent-gate

  • Tool calling

    Pick the tool to reach for, and whether the call is ready to make.

    tool-calling

What goes out

the answer, before anybody reads it

  • AI as judge

    Judge a response against the task it was given, before it goes out.

    ai-judge

  • Answer checking

    Accept a drafted answer when its source supports it, escalate when not.

    answer-check

Who takes it

the queue, the model, the person

  • Model routing

    Send each request to the cheapest model that can actually answer it.

    model-routing

  • Support ticket routing

    Send each ticket to the right queue, spot the ones about to escalate.

    support-routing

  • Email triage

    Sort an inbox into what needs you, what can wait, and what never did.

    email-triage

  • Document sorting

    Put each document in the right pile, flag the ones needing a reply.

    document-sorting

  • Lead qualification

    Sort inbound enquiries by how close they are to buying.

    lead-qualification

  • Outreach reply sorting

    Find the replies that want a meeting in the pile that does not.

    reply-sorting

  • Product review triage

    Find the reviews that are really bug reports, and how badly they went.

    review-triage

Starting points, not a catalogue. Every one is the same endpoint with a different question sheet, and a sheet you write yourself gets the same calibration, the same prediction set and the same right to abstain. Where each one sits.

Integrated, ported, benchmarked and studied across the ecosystem

Every name links to the public integration, port, benchmark or write up it stands for. Drag, scroll, or use the arrows.

Why not just ask a model

Asked to judge 46 proposed tool calls, the frontier models declined the risky ones.

judging 46 tool callsansweredaccuracy
This, fitted46 of 4695.7%
Haiku 5.546 of 4691.3%
Sonnet 5.541 of 46100%
Opus 541 of 4697.6%
Fable 525 of 4696.0%

Their safety classifiers fire on the very proposals a guard exists to judge, so the accuracy is scored on what is left. A refusal is not a verdict: the harness is left deciding whether it meant allow or deny, which is the question it asked.

Where a small model does answer, it is accurate and cheap. What it does not return is a number you can route on, so every answer gets acted on or none does. Ours answers all 46 and sorts them: 19 of the 20 harmless calls run unattended and nothing destructive does. That is the difference. Not accuracy, but knowing which answers to trust.

One endpoint, any input

A decision does not care what the record was.

  • text

    a ticket, a document, a proposed tool call

  • image

    a scan, a screenshot, a photographed form

  • audio

    a call recording, a voice note

  • video

    a clip, frame by frame

The reader sniffs the bytes, so there is no type flag to get wrong, and the same question sheet works across all four.

Measured

Numbers from held-out rows, not from a fit's own split.

0.160 to 0.069
calibration error, uncalibrated to calibrated, across six corpora
60 / 20 / 20
fit, calibrate, held back and never fitted on
0.816
what twelve correct out of twelve certifies, not 1.0
$0.0020
a decision, with $10 of credit to start

The engine is open source. The hosted API is how you use it without running a GPU, and the calibration file is yours to download and serve yourself.

What the internet said

More coverage, dated and sourced, on the news page.

Founder

Nandakishor M

Nandakishor M

Builds small models that make decisions instead of writing essays about them. Founder of Convai Innovations, author of laya and vega, writing at nandakishorm.com.

GitHubLinkedInXInstagramThe story