explainx.ainewsletter3.5k
TrendingNewsPathwaysSkills
Pricing
explainx.ai

Upskill in AI — 16 free pathways, live workshops & bootcamps, and 50+ courses from practitioners. Plus the skills, tools, and MCP servers to practice on.

follow us

custom AI agents

[email protected]

get started

Find your pathTake Free Evaluation

learn

pathways — start freeworkshopsbootcampscoursescertificationsmock testsexplainx universitycorporate traininglearn skills & mcp

discover

skillsmcp serversexplainx mcptoolsagentsllmsdesignsagi trackerranks

company

aboutvisionmissionteaminstructorscommunityhackathonscareers

content

daily AI newsstate of AI — live resultsblogreleasespromptsgeneratorsresource librarydemofor LLMs

solutions

all solutionsdeveloper upskillingmarketing upskillingproduct manager upskillingleadership upskilling

More from us

InfloqInfluencer marketingBgBlurPrivacy-first blurOlly SocialSocial AI copilotCeptoryVideo intelligenceBgRemoverBackground removal

newsletter · weekly

Get AI news, tools, and insights in your inbox.

supportprivacytermsdata rightssubmission guidelines

© 2026 AISOLO Technologies Pvt Ltd

On this page

  • TL;DR
  • Why Trim the Harness Now
  • The Three Changes Behind the 65% Cut
  • How LangChain Validated the Change
  • When to Turn Todos Back On
  • Full Control Over Middleware
  • Filesystem Performance
  • Breaking Changes
  • What This Means If You're Building on Deep Agents
  • Related Reading
← Back to blog

explainx / blog

LangChain Deep Agents v0.7: 65% Fewer Base Tokens, No Default Prompt

LangChain shipped Deep Agents v0.7 on July 29, 2026 — cutting base input tokens ~65% by removing the default system prompt, trimming tool descriptions 43%, and making TodoListMiddleware opt-in. Full breakdown.

Jul 31, 2026·7 min read·Yash Thakker
LangChainDeep AgentsAgent harnessContext engineeringAI Agents
go deep
LangChain Deep Agents v0.7: 65% Fewer Base Tokens, No Default Prompt

Every agent turn pays a tax before the model sees your actual task: a base system prompt, tool schemas, and default middleware baked into the harness. On July 29, 2026, LangChain cut that tax by roughly two-thirds.

Deep Agents v0.7 removes the framework's hidden base system prompt entirely, trims builtin tool descriptions by 43%, and turns off TodoListMiddleware by default. Combined, base input tokens on a default agent turn drop from ~6,000 to ~2,000 — a 65% reduction — with reward holding steady across LangChain's eval suite.

This follows the same trajectory as LangChain's earlier Deep Agents harness-engineering results on Terminal-Bench 2.0, where scaffolding changes — not model swaps — drove the benchmark gains. v0.7 applies that same "the harness is the product" thinking to trimming the harness itself.

Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.


TL;DR

QuestionAnswer
What changed?Base system prompt removed, tool descriptions trimmed 43%, TodoListMiddleware now opt-in
How much smaller?Base input tokens ~6K → ~2K per default turn (65% fewer)
Does it hurt performance?No measurable drop in reward across autonomous, conversational, and long-context evals
Is this backwards compatible?No — see breaking changes below
Can I still use todos?Yes, one line: middleware=[TodoListMiddleware()]
Can I override defaults?Yes — pass middleware whose .name matches a default to replace it in place
Filesystem changes?write_file now overwrites instead of erroring; paginated read_file; capped, streamed grep/glob
Installuv pip install -U deepagents (Python) or npm install deepagents@latest (JS/TS)

Why Trim the Harness Now

LangChain's framing is context engineering: a model is only as capable as the context it's given, and prompting guidance keeps shifting under harness builders' feet. Anthropic recently published its own updated context-engineering guide alongside a report that it cut over 80% of Claude Code's system prompt for newer models like Opus 5 and Fable 5, with no measurable coding-eval regression.

LangChain says two of Anthropic's findings mirrored what they saw building v0.7:

  • Interfaces beat examples — well-designed tool schemas teach usage better than few-shot examples, which can narrow how a model explores its options.
  • Avoid repetition — repeating an instruction in both the system prompt and a tool's description doesn't meaningfully reinforce it; it just burns tokens.

This is the same pattern explainx.ai covered in the loop engineering guide: as base models get better at following structured tool interfaces, hand-holding prose in the system prompt becomes dead weight the harness carries for no benefit.


The Three Changes Behind the 65% Cut

1. Removed base system prompt

Deep Agents used to ship a default system prompt with general guidelines and tool-usage prose baked into every agent by default. v0.7 removes it outright (#4859). Your own system prompt is no longer competing with — or getting diluted by — hidden framework prose underneath it.

2. Trimmed tool descriptions by 43%

Builtin tool descriptions were cut by 43% (#5009). Less prose per tool schema, repeated across every builtin tool, adds up fast across a multi-tool agent — this is where a meaningful chunk of the token savings comes from.

3. Opt-in todos

create_deep_agent no longer includes TodoListMiddleware by default (#4929). LangChain's evals showed the planning prompt and write_todos tool didn't significantly improve performance in most cases — so the default agent turn no longer pays for a tool call it usually doesn't need.

Together: ~6K → ~2K base input tokens, a 65% drop, on a default agent turn.


How LangChain Validated the Change

LangChain built a new eval suite around three categories, each targeting different agent work:

CategoryWhat it tests
AutonomousEnd-to-end tasks — coding, data analysis
ConversationalMulti-turn conversation with a simulated user
Long-contextRetrieval and reasoning over long context

They ran v0.7 against the v0.6.12 baseline across all three categories on four models: gpt-5.6-luna, gemini-3.6-flash, claude-sonnet-4-6, and claude-opus-4-8.

Results: Reward held steady overall, tokens and cost generally dropped. gpt-5.6-luna saw the clearest win — tokens down 34%, cost down 15%, reward up 4%. claude-sonnet-4-6 was the exception, with a cost increase traced to two difficult autonomous tasks in LangSmith traces.

One caveat worth stating plainly: reward confidence intervals span zero for every model in LangChain's own report. Only Luna and Opus show statistically clear token reductions, and only Luna shows a statistically clear cost reduction. The honest read is "no measurable regression," not "proven uplift" — still a good trade if you're paying per token on every agent turn.


When to Turn Todos Back On

TodoListMiddleware still earns its keep in three cases, per LangChain:

  1. Long, multi-step tasks — an explicit plan helps an agent stay on track across many turns.
  2. Less capable models — need more scaffolding to avoid losing the thread.
  3. UI-facing use cases — where a visible plan and progress matter as much as execution.

If you're in one of those buckets, re-enabling it is one line:

python
from deepagents import create_deep_agent
from deepagents.middleware import TodoListMiddleware

agent = create_deep_agent(
    model="anthropic:claude-sonnet-5",
    middleware=[TodoListMiddleware()],
)

Full Control Over Middleware

Configurability was the top user request over the last six months — overriding FilesystemMiddleware, customizing SummarizationMiddleware thresholds, or replacing the base prompt globally all hit the same wall: no supported way to change what the default harness stack does.

v0.7 fixes this with a simple rule: pass a middleware= instance whose .name matches a default, and it replaces that default in place instead of erroring on a duplicate (#4251).

python
from deepagents import create_deep_agent
from deepagents.middleware import SummarizationMiddleware

agent = create_deep_agent(
    model="anthropic:claude-sonnet-5",
    middleware=[
        SummarizationMiddleware(
            model="fireworks:accounts/fireworks/models/kimi-k3",
            trigger=("fraction", 0.5),  # summarize at 50% instead of 85%
            summary_prompt="Summarize the conversation so far, keeping any file paths and decisions verbatim...",
        ),
    ],
)

By default, SummarizationMiddleware triggers once a conversation crosses 85% of the context window using a generic summarization prompt. Different applications need different triggers and prompting — this same override pattern works for any other builtin default, including prompt-caching TTLs.

One power user quoted in LangChain's release notes summed up the prior pain: "We [used to do] some hacky stuff to remove some of the default middleware. Overriding middleware is a very welcome addition."


Filesystem Performance

The filesystem is Deep Agents' core context-management layer — the environment agents read, write, and navigate state through. v0.7 tunes it based on the same eval suite plus real agent trajectories across open and closed models:

ChangeBehavior
write_fileNow overwrites an existing file instead of erroring (#4109)
read_filePaginated — reports total/remaining lines plus the next offset (#4540)
grep / globReturn partial results with a truncated flag instead of hanging on large trees (#4063, #4570, #4706)
grepAlso gains a 1,000-match cap, streamed output, and optional context lines

For any agent doing repo-scale exploration — the same class of work covered in explainx.ai's coding-agent evals on real repos — a grep that hangs on a large monorepo instead of truncating gracefully is a real production failure mode. v0.7 closes that gap.


Breaking Changes

v0.7 removes some compatibility shims and changes default behaviors — don't upgrade blind:

  • TodoListMiddleware is no longer on by default (#4929) — opt-in via TodoListMiddleware().
  • Backend factories removed — deprecated since v0.5, now fully replaced by concrete BackendProtocol instances (#4541). Other v0.5 file-format/backend-protocol deprecations are also removed.
  • delete tool added to the default filesystem tool list — FilesystemMiddleware accepts a tool allowlist if you want to opt out (#4325, #4698).

LangChain's changelog includes full migration notes and an "upgrade" prompt written specifically for coding agents to run against your codebase.


What This Means If You're Building on Deep Agents

If you're running Deep Agents in production, the practical checklist is short:

  1. Audit your custom system prompt — it no longer competes with hidden framework prose, so trim anything that was compensating for the old defaults.
  2. Decide on todos per use case — leave off for short autonomous tasks, turn on for long multi-step work or UI-facing plans.
  3. Retune SummarizationMiddleware if you were hitting context limits before the default 85% trigger — this is now a one-line override instead of a fork.
  4. Re-test grep/glob-heavy agents against the new truncation and match-cap behavior if you depended on exhaustive results.

This is part of a broader 2026 pattern explainx.ai has tracked across agent harness engineering: as base models get more capable at following structured interfaces without hand-holding, the harnesses that win are the ones willing to delete code, not just add features.


Related Reading

  • Agent Harness Engineering: When the Model Stays Fixed and the Scaffolding Wins
  • What Is an Agent Harness? Complete Guide
  • Context, Prompt, Loop: The Harness Engineering Stack
  • Loop Engineering: Coding Agent Loops Guide
  • Context Engineering: Clean Prompts Generator
  • ByteDance DeerFlow 2: Super Agent Harness on LangGraph
  • Multi-Agent Orchestration Patterns Guide
Weekly digest3.5k readers

Catch up on AI

Curated AI updates on agents, skills, and MCP — delivered to your inbox. Unsubscribe anytime.

Sources: LangChain blog — "Deep Agents v0.7" by Sydney Runkle, July 29, 2026; deepagents v0.7.0 release notes. Stats and version details accurate as of July 29, 2026.

Yash Thakker

Written by

Yash Thakker

Yash is an AI expert with over 300K learners. Join his workshops →

Related posts

Jun 27, 2026

ReAct Prompting: The Reasoning + Acting Pattern Behind Modern AI Agents

ReAct is not a framework feature — it is a prompting pattern. Once you understand the Thought/Action/Observation loop you will see it everywhere: in LangChain agents, Claude Code, and every serious agentic system built in 2024 and beyond.

Jun 26, 2026

Langflow Guide: Build Visual RAG Pipelines and Multi-Agent Workflows

Langflow turns LangChain's abstractions into a drag-and-drop canvas — flows, components, vector stores, and agents you can test in a playground and ship as REST APIs or MCP servers. Here is how to build RAG and multi-agent systems that survive contact with production.

May 7, 2026

ByteDance DeerFlow 2.0: Open-source super agent harness with skills, sub-agents, and sandboxes

ByteDance's DeerFlow evolved from a deep research framework to a full super agent harness. Version 2.0 ships with skills, sub-agents, sandboxed execution, persistent memory, Claude Code integration, and support for Telegram, Slack, Feishu, WeChat, WeCom, and DingTalk channels.