DeepAgents 0.7 Cut Its Own Prompt by 65 Percent - Why Less Scaffolding Made Agents Better

By AI Agent Engineering | 2026-07-30 | tool

In deepagents 0.7.0, released July 24, the authored base prompt starts empty.

That is a framework whose entire value proposition was scaffolding — prompts, middleware, structured guidance wrapped around a model — publicly concluding that most of its own scaffolding was overhead. The numbers LangChain published to justify the deletion are the interesting part.

Input tokens on default-agent turns dropped from 5,395 to 1,895 — a 65% reduction. Tool-description tokens fell from 4,005 to 2,302, down 43% [1].

Nearly three quarters of what a default deepagents turn was sending to the model turned out to be removable. And the agents did not get worse.

The prose was saying what the schema already said

The explanation LangChain gives is one sentence, and it identifies a mistake that is probably in your system prompt right now: "The authored base prompt starts empty and tool-usage prose that duplicated tool schemas has been trimmed" [1].

Look at the second number again. Tool descriptions went from 4,005 tokens to 2,302. That is not compression or clever phrasing — it is deduplication. The framework was describing each tool twice: once structurally, in the schema the model receives as a tool definition, and once in English, in prose explaining how to use it.

Both descriptions arrive in the same request. Both are billed. And the model already parses tool schemas as a first-class input — that is what they exist for. The prose was a translation layer for a reader who did not need it.

This pattern is everywhere in hand-written agent prompts. A tool named search_documents with a typed query parameter and a description field, followed by a paragraph in the system prompt explaining that when the user asks about documents, the agent should call search_documents with a query. The paragraph feels like diligence. It is a second copy.

Two frameworks, one month apart, same conclusion

The reason to read this as a shift rather than a release note is that Pydantic reached the same conclusion by a completely different route, a month earlier.

Pydantic AI v2, published June 23, split the framework in half [2]. The core now holds only the event loop, providers, and the capability and hooks APIs. Optional providers — bedrock, groq, mistral — became opt-in instead of shipping by default. Everything substantial moved into a separate first-party Harness: memory, guardrails, context management, filesystem access, code mode [2].

The unifying primitive is what they call a capability, which "bundles an agent's instructions, tools, lifecycle hooks, and model settings into a single, composable unit" [2]. One concept reaches every layer, rather than four concepts that each need their own explanatory prose.

LangChain shrank what the framework sends. Pydantic shrank what the framework is. Both were reacting to the same accumulated weight: agent frameworks spent two years adding helpful layers, and the layers started costing more than they returned.

Two independent teams, four weeks apart, both deciding the framework should carry less. That is a direction, not a coincidence.

What else landed in 0.7.0

The token diet is the headline, but the release is substantial elsewhere [1]:

Middleware you can actually override. You can now pass a custom middleware instance whose .name matches a built-in and have it replace the default without an error [1]. Previously, overriding a built-in meant fighting the framework.

That change belongs in the same story as the token cuts. A framework that ships opinionated defaults and makes them hard to replace forces you to work around them — usually by adding your own layer on top of the one you wanted to remove. The result is exactly the duplication the token numbers exposed: two systems doing one job, both of them billed. Name-based override is the mechanism that lets you delete a default instead of burying it.

Filesystem tools grew up. A new delete operation, write_file now overwrites rather than failing, FilesystemMiddleware accepts tool allowlists, and pagination and truncation improved for open models [1]. The allowlist matters most — it is the difference between "the agent has filesystem access" and "the agent has these four filesystem operations."

Note the pairing in that list, because it is a security decision disguised as a feature list. The release added delete and made write_file overwrite — both of which expand what an agent can destroy — and in the same release added the allowlist that lets you withhold them. Granting destructive capability and granting the means to scope it belong together; shipping the first without the second is how agents end up with more filesystem authority than anyone chose to give them.

Prompt caching reached more providers. Bedrock support plus automatic Fireworks session affinity. Caching is where the remaining token cost in a long-running agent actually lives, and session affinity is the unglamorous plumbing that makes it hit.

NVIDIA Nemotron 3 Ultra ships as a built-in harness profile. Per-model harness profiles are an admission that one prompt shape does not fit every model — the same insight that produced the pagination and truncation work for open models.

Harness profiles are the quiet correction

The Nemotron profile deserves more than a bullet, because it undercuts an assumption most agent code is built on.

The default posture in agent frameworks has been model-agnosticism: write the agent once, swap the model behind it, and the abstraction holds. Harness profiles say that abstraction leaks. A prompt tuned for one model's instruction-following is not optimal for another's, and the pagination and truncation improvements shipped specifically for open models in this release are the same admission from a different angle [1] — open-weight models needed different handling of large tool outputs than the frontier models the defaults were tuned against.

This has a practical consequence if you run more than one model. The prompt you carefully tuned against your primary model is not neutral scaffolding that travels with you; it is a fitted artifact. When you switch models to save cost, you are also silently switching to a worse-fitted prompt, and the resulting quality drop gets attributed to the model rather than to the mismatch.

Caching is where the remaining cost lives

The prompt-caching additions read as plumbing and are closer to the actual economics.

The release added Bedrock support and automatic Fireworks session affinity [1]. Session affinity is the unglamorous half: prompt caching only pays off when repeated requests land on infrastructure that still holds the cached prefix. Without affinity, a cache-friendly prompt gets routed to a cold instance and you pay full price while believing you are paying cached rates.

Put the two halves of this release together and the shape of the cost model becomes clear. First delete the tokens that were pure duplication — that is the 65%. Then make sure the tokens you genuinely need are cached and actually hitting the cache. Those are different optimizations, and most teams have done neither because both are invisible until someone reads a bill line by line.

The obvious pushback

Three caveats, and they are real.

These are the vendor's own numbers, on the vendor's own default configuration. No independent benchmark verified the 65%. LangChain measured its own before-and-after, which is the correct thing for a maintainer to publish and is not the same as a third party reproducing it.

The reduction is measured on default-agent turns. If you have already replaced the base prompt with your own, written your own tool descriptions, and stripped the middleware, you are not sitting on 3,500 tokens of removable overhead. The teams who gain most from this release are the ones who accepted the defaults — which, to be fair, is most teams.

The migration will break things quietly. Two changes deserve flagging. TodoListMiddleware is no longer included by default, so any agent whose behavior depended on an implicit to-do list will now behave differently without erroring. And tool output formats changed — empty results return "No files found" instead of [] [1]. Code that checked for an empty list will now receive a non-empty string and treat it as a result. The backend compatibility shims BackendFactory and BACKEND_TYPES are also gone, which at least fails loudly.

A string where a list used to be is the kind of change that passes tests and corrupts behavior. Read the changelog before the bump, not after.

What to do with this

Measure your own prompt. That is the whole actionable takeaway, and almost nobody does it.

Take one representative turn from your agent in production and count what you are actually sending: system prompt, tool schemas, tool-usage prose, examples, formatting instructions. Then ask, for each block, whether the model is receiving that information anywhere else in the same request. Tool-usage prose is the highest-probability duplicate, because it is the block that feels most like helpful engineering and maps most directly onto a structured input the model already gets.

Then ask the harder question: does removing it change behavior? LangChain's answer, on its own defaults, was no — 3,500 tokens per turn were buying nothing. That is a testable claim about your own stack, and it is cheap to test.

The framework era of agent development ran on the assumption that more scaffolding meant more reliability. Two of the most-used frameworks in the ecosystem just published evidence against it, one month apart. If the tools you build on are getting lighter, the prompts you write on top of them probably should too.


References

[1] LangChain — LangChain Python releases changelog: deepagents v0.7.0 — (2026-07-24). Documentation

[2] Douwe Maan, Pydantic — Pydantic AI v2: capabilities, a leaner core, and the Harness — (2026-06-23). Blog