
Today we're shipping deep agents v0.7. This release simplifies the base harness, resulting in 65% fewer base input tokens at comparable performance.
Building effective agents comes down to context engineering: a model is only as powerful as the context you give it, and that context comes down to what's in the prompt. Assembling that prompt well is the harness's job. But the guidance on how to do it changes constantly: OpenAI, Anthropic, and Google all publish their own prompting guides, and all three have rewritten them as models got more capable. Harnesses need to keep pace, or they end up carrying prompting the model has outgrown.
Anthropic just published an updated guide on context engineering for modern models, alongside a report that they cut over 80% of Claude Code's system prompt for models like Opus 5 and Fable 5, with no measurable drop in coding evals. A couple of their findings mirror what we saw building v0.7:
- Interfaces beat examples: good tool schemas teach usage better than the once popular few shot examples, which can narrow how the model explores.
- Avoid repetition: repeating an instruction in both the system prompt and a tool's description doesn't offer meaningful reinforcement.
Deep Agents v0.7 offers a leaner, more configurable base harness that's more token and cost-efficient.
Leaner base harness
Our hypothesis: trimming unnecessary tokens from the base input prompt would boost token and cost efficiency while holding performance steady. We made three changes to test this:
- Removed base system prompt: We cut the system prompt that Deep Agents used under the hood, which included general guidelines and tool-usage prose (#4859).
- Trimmed tool descriptions: We trimmed builtin tool descriptions by 43% (#5009).
- Opt-in todos:
create_deep_agentno longer includesTodoListMiddlewareby default. Our evals showed the planning prompt andwrite_todostool did not significantly improve performance (#4929).
Together, these changes drop base input tokens* on a default-agent turn by 65% (~6k → ~2k).
*base input tokens: tokens associated with the builtin prompt, tools, and middleware
How we validated these changes
We validated that performance didn't drop using a new eval suite built around three categories of benchmarks. Each targets a different kind of agent work:
- Autonomous: end-to-end tasks like coding and data analysis
- Conversational: multi-turn conversation with a simulated user
- Long-context: tasks that require retrieval and reasoning over long-context
We ran the new v0.7 harness against the old baseline (v0.6.12) through a matrix of all three eval categories across four models: gpt-5.6-luna, gemini-3.6-flash, claude-sonnet-4-6, and claude-opus-4-8.
Reward held steady overall, and tokens/cost generally dropped*. Most notably gpt-5.6-luna was down 34% on tokens and 15% on cost with reward up 4%. claude-sonnet-4-6 was the exception; analyzing the LangSmith traces showed that a significant cost increase was largely from two challenging autonomous tasks.
*Reward confidence intervals span zero for every model. Luna and Opus show statistically clear token reductions, and Luna also shows a statistically clear cost reduction. Our full report can be found here.
For more information, see our recent blog on how we run evals for Deep Agents.
A note on todo lists
TodoListMiddleware is now opt-in. Our evals across three categories and three models showed slightly better rewards and lower cost with todos disabled, so we removed the write_todos tool from the base harness. The changes and full experiment results can be found here.
That said, it still earns its keep in a few cases:
- Long, multi-step tasks, where an agent benefits from an explicit plan to stay on track across many turns.
- Less capable models, which need more scaffolding to avoid dropping steps or losing the thread.
- UI-facing use cases, where a visible plan and progress matter as much as the underlying execution.
If your use case is one of the three above, turning it back on is one line: middleware=[TodoListMiddleware()].
More configurability
Configurability was the top ask from Deep Agents users over the last six months, including requests to override FilesystemMiddleware, customize SummarizationMiddleware thresholds, and override the base prompt globally. They all hit the same wall: there was no supported way to change what the default harness stack does. v0.7 fixes that in two ways.
Full control over your prompts. Removing hidden prompting has a side effect: your own custom prompting gets more effective, since there’s not prompting under the hood that might cause bloating at best and conflicts at worst.
Full control over the middleware stack. v0.7 makes overriding built-in middleware first-class: pass a middleware= instance whose .name matches a default, and it replaces that default in place instead of erroring on a duplicate. (#4251)
As one power user shared:
"We [used to do] some hacky stuff to remove some of the default middleware. Overriding middleware is a very welcome addition."
SummarizationMiddleware is a good example. By default it kicks in once a conversation crosses 85% of the context window, using a generic summarization prompt. Different applications call for different prompting, and developers want to trigger summarization at different thresholds too, to stay ahead of context rot and the "dumb zone". You can now drop in a summarization middleware with your own settings:
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",
# summarize at 50% of the context window instead of the default
trigger=("fraction", 0.5),
summary_prompt="Summarize the conversation so far, keeping any file paths and decisions verbatim...",
),
],
)The same pattern works for any other builtin default you want to retune, like prompt-caching TTLs.
Filesystem performance
The filesystem is Deep Agents' core context management layer: the environment agents read, write, and navigate state through. This release makes some optimizations driven by the same eval suite plus trajectory optimizations identified from real dcode usage, with open and closed models.
write_file now overwrites an existing file instead of erroring (#4109), paginated read_file reports total and remaining lines plus the next offset (#4540), and grep/glob return partial results with a truncated flag instead of hanging on large trees, with grep also gaining a 1,000-match cap, streamed output, and optional context lines (#4063, #4570, #4706).
Breaking changes
This release removes some compatibility shims and changes a few default behaviors:
TodoListMiddlewareis no longer on by default (#4929), though it's opt-in withTodoListMiddleware().- Support for backend factories, deprecated in v0.5, is removed in favor of concrete
BackendProtocolinstances (#4541). Other file format / backend protocol deprecations from v0.5 are also removed. - The
deletetool was added to the default filesystem tool list.FilesystemMiddlewareaccepts a tool allowlist so you can opt out of this if desired (#4325, #4698).
Full details, including migration notes and an “upgrade” prompt for coding agents, are in the changelog.
Try it
deepagents v0.7 is out now on PyPI:
uv pip install -U deepagentsand on npm:
npm install deepagents@latestGive the latest deepagents a try, and let us know what you think via GitHub issues, the forum, or on X / LinkedIn.
References
- Release notes:
deepagentsv0.7.0 - Docs: customizing and overriding built-in middleware
- Docs: filesystem tools and virtual filesystem access
- Docs: opt in todos
- Eval suite blog: how we benchmark Deep Agents





.png)