feat(deepagents): simplify prompting (#703)
## Summary The SDK currently ships authored base prose plus middleware guidance that largely duplicates the tool schemas. This change adopts a more lean default: no authored base prompt, no duplicate built-in usage prose, and concise tool descriptions. Skills, memory, custom system prompts, custom tool descriptions, and required filesystem routing context remain intact. The legacy base-prompt surface is removed rather than preserved as a default path. ## Changes ### Default prompt - Remove the authored default base prompt and its obsolete public surface. - Suppress LangChain's default todo middleware prompt while leaving deepagents-owned middleware prompt-free by default. - Remove unused filesystem, subagent, async-subagent, and execution prompt constants and exports. ### Durable tool guidance - Keep large-result recovery guidance in `read_file` and `grep` descriptions. - Keep async task status freshness guidance in `check_async_task` and `list_async_tasks` descriptions. - Trim filesystem and task descriptions to their purpose and load-bearing constraints. - Build grep and execute descriptions from the configured filesystem tool set so they do not recommend unavailable tools. ### Token impact Offline (`o200k_base`, default-agent tool schemas): | Tool | Before | After | Delta | | --- | ---: | ---: | ---: | | `task` | 1,664 | 389 | -77% | | `read_file` | 728 | 494 | -32% | | `grep` | 688 | 555 | -19% | | `edit_file` | 273 | 257 | -6% | | `glob` | 217 | 172 | -21% | | `write_file` | 177 | 177 | — | | `delete` | 146 | 146 | — | | `ls` | 111 | 111 | — | | **Total** | **4,005** | **2,302** | **-43%** | For a default-agent `hello` turn, input tokens drop from 5,395 to 1,895 (-65%). ### Evaluation results The lean prompt matched the baseline on correctness (0.81) and solve rate (0.635 vs. 0.634). Unified evaluation macro and micro scores improved from 0.413 to 0.437 and from 0.371 to 0.394, respectively. (see more detailed results in https://github.com/langchain-ai/deepagents/pull/5009 and https://github.com/langchain-ai/deepagents/pull/4859)
H
Hunter Lovell committed
d25097f78d0e66741da34e1d74551f3c19991126
Parent: 5833cec
Committed by GitHub <noreply@github.com>
on 7/24/2026, 4:06:12 AM