LangChain Demonstrates Building Production Agents with TypeSafe’s Jev and LangGraph
Key point
LangChain details how to use TypeSafe’s Jev decision model with LangGraph to create faster, cheaper agent workflows by reserving LLMs for complex reasoning.
Details
LangChain has published guidance on integrating Jev, a new decision model from TypeSafe AI, into its LangGraph framework. Jev is designed as a system one model that makes narrow, structured decisions rather than generating text, allowing code to own the workflow while AI handles specific judgment calls. According to TypeSafe benchmarks, Jev runs up to 200x faster and 400x cheaper than leading LLMs on tasks like routing and classification.
Jev as a Decision Primitive
Jev functions as a primitive for judgment, returning typed answers with probabilities instead of prose. This approach, described by TypeSafe as building "prod, not god," separates semantic judgment from general-purpose generation. Key properties of Jev include:
- Structured Output: Returns typed answers with probabilities, enabling predictable code branching.
- Parallelism: Allows multiple questions to be asked about the same state simultaneously.
- Consistency: Designed to return stable answers for the same input, unlike the non-deterministic nature of LLMs.
- Speed: Decisions are cheap enough to be made frequently within a single run.
In early experiments, Jev’s scores remained stable across 100 repeated runs, significantly outperforming LLM judges in consistency.
LangGraph for Orchestration
LangGraph serves as the orchestration layer, managing context and ensuring reliability when combining Jev’s fast decisions with other components. It addresses two main challenges in model-driven systems: managing context for each step and maintaining reliability through failures. LangGraph uses:
- Nodes: Units of work such as code, model calls, or subgraphs.
- State: Information that nodes read and update, serving as context for subsequent steps.
- Edges: Logic that determines the next node, either fixed or dynamic based on state.
The runtime provides durable execution via checkpointing, allowing failed runs to resume from the last successful step rather than restarting from scratch. It also supports human-in-the-loop interrupts for steps requiring review and integrates with LangSmith for observability.
Real-World Application and Performance
A practical example is document review for legal discovery, where Jev classifies pages for responsiveness, PII, and privilege. In this workflow, Jev handles the classification, while an LLM is used only for redaction if PII is detected, and a human attorney reviews potential privileged documents. When compared to using Sonnet as the judge, Jev was 5–6x faster on the classification step.
Another example is browser automation, where Browserbase rebuilt Stagehand’s act() function to use Jev for selecting actions. This reduced median latency from 1.97 seconds to 0.46 seconds (about 4.3x faster) by having Jev pick actions from a finite list of interactive elements, falling back to an LLM only when confidence is below 0.7.
The Great Unbundling of Intelligence
This integration represents a shift from "frontier by default" to "cheap by default, frontier on exception." Jaya Gupta calls this trend "the Great Unbundling of Intelligence," where capabilities are pulled apart and routed to the cheapest model that can handle them. By unbundling intelligence, developers can route bounded decisions to fast, cheap models like Jev and reserve expensive LLMs for open-ended reasoning. LangChain provides tools to help developers adopt this pattern, including a LangGraph decision models skill to swap LLM calls for Jev in existing agents.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.