LangChain、エージェント機能強化の「Deep Agents v0.7」を公開
LangChain は Deep Agents v0.7 をリリースし、コンテキストエンジニアリングの知見を反映してベースハネスを簡素化し、同等性能で入力トークンを65%削減した。
AI深層分析を開く2026年7月30日 02:43
AI深層分析
キーポイント
トークン効率の劇的向上
新バージョンでは不要なトークンを削除することで、同等のパフォーマンスを維持しつつベース入力のトーク数を65%削減した。
コンテキストエンジニアリングへの対応
OpenAI、Anthropic、Google がモデル能力向上に伴いプロンプトガイドを更新する中、ハネス側もこれに追随して進化させた。
インターフェースと重複回避の重要性
Anthropic の調査結果を踏まえ、ツールスキーマによるインターフェース提示が例示より優れ、システムプロンプトとツールの説明での指示の重複は不要であると結論付けた。
ベースシステムプロンプトの削除
効率化のため、従来のベースシステムプロンプトを削除する変更を加え、より軽量で構成可能なハネスを実現した。
基本入力の削減
ベースシステムプロンプトの削除、ツール説明の短縮、TodoListMiddleware のオプトイン化により、デフォルトエージェントのターンあたりの基本入力トークンを65%削減した。
重要な引用
This release simplifies the base harness, resulting in 65% fewer base input tokens at comparable performance.
Interfaces beat examples: good tool schemas teach usage better than the once popular few shot examples
Avoid repetition: repeating an instruction in both the system prompt and a tool's description doesn't offer meaningful reinforcement.
Together, these changes drop base input tokens on a default-agent turn by 65% (~6k → ~2k).
編集コメントを表示
編集コメント
LangChain は主要ベンダーのガイドライン変更を即座にハネス設計に反映させる柔軟性を示しており、実務におけるプロンプト管理の難易度を下げる重要な一歩である。特に「インターフェースが例示より優れる」という知見は、今後のエージェント開発のパラダイムシフトを示唆している。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。

本日、Deep Agents v0.7 をリリースしました。今回のアップデートでは基盤となるハーン(harness)を簡素化し、同等の性能を維持しながらベース入力のトークン数を 65% 削減することに成功しています。
効果的なエージェント構築の鍵は「コンテキストエンジニアリング」にあります。モデルの能力は、与えるコンテキストの質によって決まります。つまり、重要なのはプロンプトに何を含めるかです。このプロンプトをどう組み立てるかはハーンの役割ですが、その指針は常に変化しています。
OpenAI、Anthropic、Google はそれぞれ独自のプレンディングガイドを発表しており、モデルの能力が向上するたびに内容を刷新しています。ハーンもこれに追いついていなければ、モデルがすでに必要としなくなったプロンプトをそのまま引きずることになります。
最近、Anthropic は現代のモデル向けにコンテキストエンジニアリングの更新版ガイドを公開しました。また、Opus 5 や Fable 5 などのモデルにおいて、Claude Code のシステムプロンプトから 80% 以上を削減してもコード評価の結果に悪影響がないという報告も発表しています。
彼らの発見には、v0.7 を構築する過程で私たちが得た知見と共通する点があります。
インターフェースの設計は、例示よりも重要です。優れたツールスキーマは、かつて流行した「数ショット(few-shot)」な例示よりも、モデルがどのようにツールを使用するかを効果的に伝えます。数ショット例に頼りすぎると、モデルの探索範囲が狭まってしまう恐れがあります。
また、指示の重複も避けましょう。システムプロンプトとツールの説明書の両方に同じ指示を入れるのは、意味のある強化にはつながりません。
Deep Agents v0.7 では、より軽量で設定可能な基盤ハーンネスを提供し、トークン数とコストの効率を大幅に向上させました。
より軽量な基盤ハーンネス
私たちの仮説は、ベース入力プロンプトから不要なトークンを削ぎ落とすことで、パフォーマンスを維持しつつ、トークン使用量とコストの効率を高められるというものです。この仮説を検証するために、3 つの変更を行いました。
- ベースシステムプロンプトの削除:Deep Agents が内部で利用していた、一般的なガイドラインやツール使用方法に関する記述を含むシステムプロンプトを削除しました(#4859)。
- ツール説明の簡素化:組み込みツールの説明を 43% 削減しました(#5009)。
- Todo リスト機能のオプトイン:
create_deep_agentのデフォルト設定からTodoListMiddlewareを外しました。評価結果によると、プランニング用プロンプトやwrite_todosツールは、パフォーマンスに大きな改善をもたらさないことが示されました(#4929)。
これらの変更により、デフォルトのエージェントの 1 トーンあたりの「ベース入力トークン」が 65% 削減され(約 6,000 トークン→約 2,000 トークン)、大幅な効率化を実現しました。
ベース入力トークン:組み込みプロンプト、ツール、およびミドルウェアに関連するトークンの総称です。
これらの変更を検証した方法
パフォーマンスが低下していないことを確認するため、3 つのカテゴリのベンチマークを軸に構築された 新しい評価スイート を用いて検証を行いました。各カテゴリは、エージェントが担う異なる種類の作業を対象としています。
Deep Agents v0.7 では、コード作成やデータ分析といったエンドツーエンドのタスクを完遂する「自律型」、シミュレーションされたユーザーとの多段階対話を行う「会話型」、そして長い文脈からの情報検索と推論が必要な「長文コンテキスト対応」の 3 つのカテゴリが強化されました。
新しい v0.7 ハーネスを、gpt-5.6-luna、gemini-3.6-flash、claude-sonnet-4-6、claude-opus-4-8 の 4 つのモデルに対して、これら 3 つの評価カテゴリすべてで比較検証しました。その結果、全体的な報酬(Reward)は横ばいを維持しつつ、トークン使用量とコストは概ね低下しました。
特に目立つのは gpt-5.6-luna で、トークン使用量が 34%、コストが 15% 減少した一方で、報酬は 4% 向上しています。例外は claude-sonnet-4-6 で、LangSmith のトレースを分析したところ、このモデルのコスト増大の大部分は、2 つの難易度の高い自律型タスクに起因することが明らかになりました。
※すべてのモデルにおいて報酬の信頼区間はゼロを含んでいます。Luna と Opus は統計的に明確なトークン削減を示しており、Luna はコストの削減も統計的に有意です。詳細なレポートは こちら で確認できます。
Deep Agents の評価手法に関する詳細は、最新のブログ記事「Deep Agents のベンチマーク方法について」をご覧ください。
TODO リストに関する注記
TodoListMiddleware は現在、オプトイン(任意選択)となっています。3 つのカテゴリと 3 つのモデルでの評価結果から、TODO を無効にした方が報酬がわずかに向上しコストも低下することが判明したため、ベースラインハーネスから write_tools ツールを削除しました。変更点と実験の詳細結果は こちら でご覧いただけます。
ただし、以下のケースでは依然として価値を発揮します。
- 長期にわたる多段階タスク。エージェントが多数のターンにわたり軌道に乗って進めるよう、明示的な計画が必要となる場合です。
- 能力が限られたモデル。ステップを飛ばしたり、文脈を見失ったりしないよう、より多くの支援構造(スケフォールディング)が必要です。
- UI を介した利用ケース。背後で実行される処理そのものと同様に、可視化された計画と進捗状況が重要となる場合です。
もしあなたのユースケースが上記のいずれかに該当するなら、有効化はたった 1 行で済みます:middleware=[TodoListMiddleware()]
より高い設定柔軟性
過去半年間、Deep Agents ユーザーから最も多かった要望は「設定の柔軟性」でした。具体的には、FilesystemMiddleware の上書きや SummarizationMiddleware の閾値のカスタマイズ、ベースプロンプトのグローバルな変更などが求められていました。しかし、これらすべてが同じ壁にぶつかっていました。デフォルトのハッチ(harness)スタックの動作を変更する公式な方法が存在しなかったのです。
v0.7 では、この課題を 2 つの方法で解決しました。
プロンプトに対する完全なコントロール。
隠れたプロンプトを排除した結果、ユーザー自身が作成したカスタムプロンプトの効果が高まります。内部で動作するプロンプトが不要になったため、単にコードが肥大化するだけでなく、最悪の場合は競合を引き起こすリスクもなくなりました。
ミドルウェアスタックを完全に制御可能に。 v0.7 では、組み込みミドルウェアのオーバーライドが正式にサポートされました。デフォルトの名前と一致する middleware= インスタンスを渡すだけで、エラーになることなくそのデフォルトを即座に置き換えることができます。
あるパワーユーザーはこう語っています。
「以前はデフォルトのミドルウェアの一部を削除するために、少し強引なハックを行っていました。ミドルウェアのオーバーライド機能は非常に歓迎すべき追加です」
要約ミドルウェア(SummarizationMiddleware)はその好例です。デフォルトでは、会話のコンテキストウィンドウ使用率が 85% に達すると、汎用的なプロンプトを用いて要約処理が開始されます。しかし、アプリケーションごとに最適なプロンプトは異なり、文脈劣化や「ダムゾーン」を回避するためにも、要約トリガーの閾値をカスタマイズしたいという開発者の要望があります。
これからは、独自の設定を持つ要約ミドルウェアを簡単に差し込むことが可能です。
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...",
),
],
)
このパターンは、プロンプトキャッシュの TTL(有効時間)など、他の組み込みデフォルト設定を再調整する場合にも適用できます。
ファイルシステムのパフォーマンス
ファイルシステムは Deep Agents の中核となるコンテキスト管理レイヤーです。エージェントが状態を読み書きし、移動する環境を提供します。今回のリリースでは、評価スイートに基づく最適化と、実際の dcode 利用から特定された軌道(トランジェクト)の改善を反映しています。これらはオープンモデルおよびクローズドモデルの両方で検証されています。
write_file の挙動が変更され、既存ファイルが存在する場合でもエラーを返さず上書きするようになりました(#4109)。また、ページネーション付きの read_file では、総行数と残りの行数、そして次のオフセットが報告されるようになり、grep/glob は大規模なディレクトリツリーで止まらずに部分的な結果を返すようになりました。この際、切り捨てフラグが付与され、grep には最大 1,000 件のマッチ制限、ストリーミング出力、オプションのコンテキスト行表示が追加されています(#4063、#4570、#4706)。
破壊的変更
今回のリリースでは、互換性用の shim が削除され、いくつかのデフォルト動作が変更されています:
- TodoListMiddleware は既定で有効ではなくなりました(#4929)。ただし、
TodoListMiddleware()を明示的に指定することで利用可能です。 - v0.5 で非推奨となっていたバックエンドファクトリへのサポートを削除し、代わりに具体的な
BackendProtocolインスタンスを使用するようになりました(#4541)。v0.5 で非推奨となった他のファイル形式やバックエンドプロトコルに関するサポートもすべて削除されています。 - デフォルトのファイルシステムツールリストに「削除」ツールが追加されました。
FilesystemMiddlewareではツールのホワイトリストを指定できるため、必要に応じてこの機能を無効化できます(#4325、#4698)。
移行時の注意点やコーディングエージェント向けのアップグレードプロンプトを含む詳細は、changelog をご確認ください。
試してみる
deepagents v0.7 は現在 PyPI で利用可能です:
uv pip install -U deepagents
また、npm でも入手できます:
npm install deepagents@latest
最新の Deep Agents をぜひお試しください。ご意見は、GitHub の issues、フォーラム、または X / LinkedIn でお聞かせください。
リファレンス
- リリースノート:deepagents v0.7.0
- ドキュメント:ビルトインミドルウェアのカスタマイズと上書き
- ドキュメント:ファイルシステムツールと仮想ファイルシステムへのアクセス
- ドキュメント:オプトイン型タスク(todos)
- 評価スイートブログ:Deep Agents のベンチマーク手法について
関連コンテンツ

エージェントアーキテクチャ
LangChain のエージェントファーストデータスタックの構築方法

Emily Hawkins
2026 年 7 月 27 日
14 分

オープンソース
観測性と評価
Deep Agents のベンチマーク手法について


N. Hollon,
H. Chase
2026 年 7 月 23 日
4 分
image.png)
オープンソース
LangGraph
エージェントアーキテクチャ
LangGraph で 3 年間取り組んできたグラフエンジニアリング


S. Runkle,
H. Chase
2026 年 7 月 22 日
7 分
エージェントの実際の動作を確認する
エージェントエンジニアリングプラットフォーム「LangSmith」を使えば、開発者はすべてのエージェントの判断をデバッグしたり、変更の評価を行ったり、ワンクリックでデプロイしたりできます。
原文を表示

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_agent no longer includes TodoListMiddleware by default. Our evals showed the planning prompt and write_todos tool 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:
- TodoListMiddleware is no longer on by default (#4929), though it's opt-in with TodoListMiddleware().
- Support for backend factories, deprecated in v0.5, is removed in favor of concrete BackendProtocol instances (#4541). Other file format / backend protocol deprecations from v0.5 are also removed.
- The delete tool was added to the default filesystem tool list. FilesystemMiddleware accepts 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 deepagents
and on npm:
npm install deepagents@latest
Give the latest deepagents a try, and let us know what you think via GitHub issues, the forum, or on X / LinkedIn.
References
- Release notes: deepagents v0.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
Related content

Agent Architecture
How we built LangChain’s agent-first data stack

Emily Hawkins
July 27, 2026
14
min

Open Source
Observability & Evals
How We Benchmark Deep Agents


N. Hollon,
H. Chase
July 23, 2026
4
min
.png)
Open Source
LangGraph
Agent Architecture
3 Years of Graph Engineering with LangGraph


S. Runkle,
H. Chase
July 22, 2026
7
min
See what your agent is really doing
LangSmith, our agent engineering platform, helps developers debug every agent decision, eval changes, and deploy in one click.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み