Blog / Comparisons / FIG. 105
Decision Models vs Agent Frameworks: Different Layers, Same Stack
Agent framework vs model is a layer mix-up. Where a decision model like Jev plugs into LangChain, Pydantic AI and Composio, with receipts.
"Should we use LangChain or Jev?" shows up in builder channels weekly, and it has the same shape as "should we use Express or Postgres?" The agent framework vs model question is a layer confusion. A framework is orchestration: loops, tools, memory, retries, state. A model is the thing that makes a call at a decision point inside that orchestration. Jev, TypeSafe AI's decision model, is the second kind, and the builds that work treat it that way.
Scope note: what browser agents specifically gain from a fast decision layer is covered in Jev for browser agents. This page owns the layering question for agents in general.
What each layer actually does
An agent framework (LangChain, Pydantic AI, Mastra, Composio, Browser Use, Stagehand and friends) owns the plumbing: how steps are sequenced, how tools are registered and invoked, how state and memory persist, how errors retry, how outputs get typed. It is mostly code, and it is model-agnostic by design.
A model owns the judgment at each step. A frontier chat model plans, writes, and reasons open-endedly. A decision model answers constrained questions: which tool, which element, is this done, is this safe. Per ecosystem documentation, Jev returns a probability per choice rather than prose, which is exactly the shape a framework's routing and gating hooks want to consume.
The confusion comes from marketing, not engineering. Frameworks ship "agents" as a product noun, models ship "agentic" as an adjective, and the result is people comparing a steering wheel to an engine.
LangChain and Jev: how the integrations actually look
The directory's framework entries show the pattern plainly: nobody replaced their framework with Jev. They added Jev at the framework's decision seams.
- LangChain exposes a TypeSafeClassifier Runnable with batched typed questions, plus model-routing and risky-tool middleware, per the entry. The framework still runs the chain; Jev rules on classification, routing, and whether a tool call looks risky.
- Pydantic AI gets a TypeSafe model provider that derives Jev questions from Pydantic output types and supports typed routing and fallback workflows. Your types become the choice set.
- Composio uses Jev to shortlist tools, select one from a bounded set, map closed-set arguments, and expose confidence and destructive-action gates.
Notice the common verbs: select, route, gate, map. Those are decisions. The things frameworks keep doing themselves, calling APIs, holding state, streaming output, are plumbing.
The receipt: seven seconds, and who did what
The cleanest example of the split is Gregor Zunic's Browser Use flight search: about seven seconds and about $0.004 for the run, as reported. His own description of the setup lists a new action space every step, the DOM as state, and a small LLM fallback to type. That's three layers in one sentence: the framework builds the action space, Jev picks the action, and a generative model steps in for the one job that needs words.
Kyle Jeong's Stagehand build says the quiet part out loud: about $0.001 per task as reported, with Jev later placed behind Stagehand's Act, Extract and Observe primitives. Our entry describes that placement as "a decision layer rather than an autonomous agent," which is this whole page in nine words.
Where the layers get mixed up, and what breaks
Asking the decision model to plan. Multi-step planning, decomposition, and writing arguments in free text are generation. Jev doesn't generate. Keep a frontier model (or honestly, the developer) on planning and let Jev handle the fifty small rulings that planning produces.
Asking the framework to decide. Hard-coded routing rules and regex tool selection inside the framework are decisions wearing code. They are brittle for the same reason keyword triage was brittle. That's the seam where a decision model earns its place.
Letting speed replace safety. A faster decision layer makes an agent quicker, not wiser. Irreversible actions (payments, deletes, sends, merges) need a verification step or a human checkpoint regardless of how confident the step verdict was. Composio's destructive-action gate and similar hooks exist for exactly this; use them.
Routing everything through one model. The strongest agent stacks are cascades: cheap decider at every step, expensive thinker only when the decider is unsure or the task needs prose. The mechanics of that cascade live in LLM routing.
A layering checklist for your agent
Walk your agent's loop and label each step. Is the output a choice from a known set, a yes/no, or a score? That step is a decision-model candidate. Is it free text, code, or a plan? That stays with a generative model. Is it a side effect? That's framework code, with a gate in front if it's irreversible. Most teams find the decision-shaped steps outnumber the generative ones by a wide margin, which is where the reported cost and latency gains come from.
Frequently asked questions
Is Jev an agent framework?
No. Jev is a decision model that answers constrained questions; frameworks like LangChain or Pydantic AI orchestrate the loop and call models at each step. The two are used together.
Can I use Jev inside LangChain?
The directory catalogs a LangChain integration with a classifier Runnable and routing and risky-tool middleware, per its entry. Check docs.typesafe.ai for official support details.
Do I still need a frontier model if I add Jev to my agent?
Usually yes, for planning and anything that must produce text or code. Jev takes over the many small per-step decisions; the flight-search build still used a small LLM fallback for typing.
Which agent steps should go to a decision model?
Any step whose output is a label, a choice, a score, or a yes/no: tool selection, next-action choice, done-checks, and safety gates. The browser-agent breakdown shows those steps in a real loop.
Numbers throughout are as reported by the build authors, not verified by shipwithjev. Code-shaped examples are pseudocode; the official docs live at docs.typesafe.ai.