top of page

Hands-On With LangChain Deep Agents v0.6: Code Interpreter, Streaming v3, and Delta Channels

  • 7 days ago
  • 3 min read

LangChain shipped Deep Agents v0.6 on May 13, 2026, and the release is interesting because it does not focus on a single shiny new feature. It is a performance pass across the whole stack: the model layer, the agent layer, the storage layer, and the runtime that connects them. This is a code-along walk through the four pieces builders are most likely to actually wire into a project: install, code interpreter, streaming v3, and the ContextHub backend.


Every snippet below is taken from the official LangChain release post and the deepagents repository on GitHub. The sources are listed at the bottom.


1. Install

The repository recommends uv for installation, though pip works too.

uv add deepagents

Or, with pip and a model adapter:

pip install -qU deepagents langchain-anthropic

2. A Minimal Deep Agent

The core entry point is create_deep_agent. It takes a model identifier, an optional list of tools, and an optional system prompt, and returns a ready-to-invoke agent built on LangGraph.

from deepagents import create_deep_agent

agent = create_deep_agent(
    model="openai:gpt-5.5",
    tools=[my_custom_tool],
    system_prompt="You are a research assistant.",
)

result = agent.invoke({"messages": "Research LangGraph and write a summary"})

That single object is opinionated for long-horizon, multi-step work. Under the hood you are getting sub-agents with isolated context windows, a pluggable filesystem, context summarization, shell access (when configured), persistent memory, and human-in-the-loop hooks, all without writing your own LangGraph state machine.


3. New in v0.6: Code Interpreter Middleware

The headline feature of v0.6 is a Code Interpreter that gives the agent a programmable workspace inside the harness itself. The agent writes JavaScript, the harness executes it in an in-memory QuickJS runtime, and only the result lands back in the model context. That keeps long tool outputs and intermediate data out of the prompt window.

from deepagents import create_deep_agent
from langchain_quickjs import REPLMiddleware

agent = create_deep_agent(
    model="baseten:zai-org/GLM-5",
    middleware=[REPLMiddleware()],
)

Note that this is not a full container sandbox. It is intentionally lightweight: state, transformation, and tool composition for the agent, not a place to run arbitrary user code.


4. Streaming v3: Typed Projections

Streaming v3 ships an event stream that frontend code can subscribe to without parsing raw model output. Each event is a typed projection: messages, reasoning blocks, tool calls, state updates, subagents, and custom channels.

stream = agent.stream_events(
    {"messages": [{"role": "user", "content": "Research..."}]},
    version="v3",
)

Alongside the Python primitive, the release ships v1 framework integrations for React, Vue, Svelte, and Angular, so the same event stream can drive a UI without an intermediate translation layer.


5. ContextHubBackend: Versioned Agent Memory

ContextHubBackend stores the agent's prompts, skills, and memories in LangSmith Context Hub. It is versioned, taggable per environment, and shared across runs, so a skill learned in one run can be reused on the next without recompiling the agent.

from deepagents.backends import ContextHubBackend

agent = create_deep_agent(
    model="google_genai:gemini-3.1-pro-preview",
    backend=ContextHubBackend("my-agent"),
)

6. Delta Channels, Quietly Important

Delta Channels are the unglamorous v0.6 feature with the biggest scale impact. Instead of writing a full snapshot at every checkpoint, the runtime now writes a diff. LangChain published a benchmark of a long-running agent whose checkpoint storage dropped from 5.27 GB to 129 MB on the same trace, a roughly 40x reduction. There is no API change for most teams: enabling delta channels is a configuration flip in the LangGraph checkpointer.


Why This Release Matters

Deep Agents v0.6 is the first release where the framework is explicitly competitive with closed-frontier agent stacks on cost rather than on capability. Harness Profiles tune the loop for open-weight models like Kimi K2.6, Qwen, and DeepSeek V4, which LangChain claims gets you frontier-level agent behavior at a fraction of API cost. Combined with delta-channel checkpointing and the in-process code interpreter, the practical effect is that a self-hosted open-model agent loop is now feasible to run at production scale without an exotic infrastructure team.


A reasonable next step for an existing Deep Agents user: upgrade in a branch, run your existing agent through the v3 event stream, and benchmark checkpoint size on a representative long trace. If the numbers track LangChain's example, you can keep your current API surface and pick up the storage and streaming wins by changing two imports.


Sources

 
 
bottom of page