InferenceIndex

Blog

Decision Models vs Compiled Agent Models: Which Cuts Agent Run Costs?

Decision models for AI agents make the small typed calls inside a step. A Compiled Agent Model reuses a whole solved task on repeat runs.

Decision models and a Compiled Agent Model cut different parts of an agent run. Decision models for AI agents answer the small typed questions inside a step: which tool to call, how a case scores, and whether a call should proceed. A Compiled Agent Model learns a whole task once, reuses it when that task comes back with new values, and sends anything new to a frontier model. They are complementary, and you can use them together.

What is a decision model for AI agents?

A decision model takes the state you already have, plus the questions you define, and returns a structured answer for each question. The answer is a choice, a score, or a yes-or-no, with a probability your code can branch on. It does not write the reply.

Jev is TypeSafe's hosted model. A call sends a state and typed questions through TypeSafe's API and gets one structured answer per question. The quick start documents questions that choose an option from a list, score a state on a rubric, or check whether a statement is true. Intent routing uses that classification to send a request to ordinary code, a specialist model, or a person. The guardrails cookbook screens a message on the way in and on the way out, so your code can pass it, send it for review, block it, or route it.

Laya is an open-source decision model from Convai Innovations. You can self-host it, or call it through Laya Studio, a hosted service that is not affiliated with Convai Innovations or TypeSafe. A request is a state plus typed questions: pick one option, rate on a scale, or answer yes or no. It returns a probability and does not write the reply. The agent tool routing page uses those questions to pick a tool, a model tier, or a handoff, and says the reasoning model still does the work and fills in the tool arguments. Laya Guard checks a tool call before it runs and returns allow, ask, or block.

That is the grain of AI agent decision making these models cover: a typed question your code can use, not the whole task.

Where does AI agent decision making spend the run?

AI agent decision making is the sequence of judgments inside a run, not the final sentence a person sees. Before a step proceeds, something decides which tool to call, how serious the case is, and whether the call should happen at all.

A decision model is built for that layer. You write the question and the options, it returns a structured answer, and your code acts on it. It does not remember that an earlier invoice or ticket already had a plan. Taking that typed call off the frontier bill does not, by itself, retire the rest of a repeat task.

What is agent tool routing?

Agent tool routing is the choice of which tool, handler, or model tier a step should use.

On Jev, intent routing classifies the request and sends it to ordinary code, a specialist model, or a person. The decision model makes the classification. The handler does the work that follows.

On Laya, agent tool routing asks which tool to call, how hard the step looks, and whether the step needs a tool at all. That page is explicit about the split: the decision model makes the selection, and the reasoning model still does the work and fills in the tool arguments. Laya Guard sits beside that choice. Before the tool runs, it returns allow, ask, or block.

The saving is the typed call: the options are already known, so a frontier model does not have to invent the label. If the task itself is a repeat, the plan around those calls is still rebuilt unless you reuse it.

How does a Compiled Agent Model cut a different cost?

A Compiled Agent Model learns a task once, reuses that solved task when the same task returns with different values, and sends anything new to a frontier model.

The repeat is the whole job: read the invoice, match it, flag what does not match, and write the result. The vendor, the amount, and the date change. The plan does not. Reusing it means the run does not pay a frontier model to work that plan out again.

Here is one measured case. Invoice reconciliation, one run per model: 1.5s and $0.00023 vs Opus 5.5 at 24.8s and $0.105, roughly 450x.

Read that label as one run of this task for each model, not as a claim about every workflow.

A decision model does not do that job. Ask it a typed question about this invoice and it will answer. It will not carry the solved task from the last invoice to this one. A Compiled Agent Model does not replace the typed call inside a new step. It reuses the task it has learned, and it sends a task it has not learned to a frontier model.

The two costs are easy to mix up. One is the small question inside a step. The other is the plan of the whole task, bought again because the task came back.

Can you use a decision model and a Compiled Agent Model together?

Yes. They sit on different parts of the run, so they can be used together.

On a task a Compiled Agent Model has learned, the repeat reuses the plan. If a step inside that work still needs a fresh typed judgment, a decision model can make it: agent tool routing, a score, or a check before a tool runs. The typed call stays small. The solved task stays reused.

On a task that is new, a Compiled Agent Model sends it to a frontier model. A decision model can still route that request, score it, or check a tool call before it runs. The frontier model does the open-ended part. The decision model answers the questions you defined.

Neither one is a substitute for the other. Decision models for AI agents make the small typed calls inside a step. A Compiled Agent Model stops a repeat of a whole task from paying to rediscover its plan. Use the one that matches the cost you are trying to cut, or use both.

FAQ

What are decision models for AI agents? They answer typed questions about a state: which option to pick, how a case scores, or whether a statement is true. Jev is TypeSafe's hosted model. Laya is an open-source model you can self-host or call through Laya Studio.

What is agent tool routing? It is the choice of which tool, handler, or model tier a step should use. A decision model can make that choice. The handler or a frontier model still does the work that follows, including filling in tool arguments.

How is a Compiled Agent Model different from a decision model? A Compiled Agent Model reuses a whole solved task on repeat runs and sends anything new to a frontier model. A decision model answers the small typed calls inside a step.

Can you use a decision model and a Compiled Agent Model together? Yes. Reuse the learned task when the work repeats, and use a decision model when a step still needs a typed choice, a score, or a check before a tool runs.

Where should I read next?

The longer account of a Compiled Agent Model is Don't forget what worked. For the decision models named here, start with TypeSafe's docs for Jev and what Laya is.