Deep Agents 0.7
Last reviewed Oct 28, 2026
Prompt Details
Prompt Composition
2prompts
- Python 3155 lines · 3.8K tokens
- Deep Agents 0.779 lines · 3.9K tokens
Total234 lines · 7.7K tokens
CWE Coverage
- 20
- 23
- 36
- 59
- 73
- 78
- 89
- 95
- 117
- 201
- 208
- 209
- 214
- 250
- 287
- 295
- 319
- 328
- 338
- 347
- 367
- 379
- 409
- 416
- 426
- 427
- 459
- 470
- 488
- 502
- 532
- 611
- 639
- 653
- 674
- 732
- 770
- 772
- 776
- 807
- 829
- 838
- 841
- 862
- 863
- 916
- 918
- 922
- 1104
- 1333
- 1395
- 1426
- 1427
Prompt Preview
Apply the Python 3 prompt first. These rules cover the deepagents 0.7 Python SDK line, checked against 0.7.11, on Python 3.11–3.14; its package requirement is Python >=3.11,<4.0. Apply them to the main agent, subagents, optional graders, and every backend they can reach.
Agent construction and tool authority
- Construct
create_deep_agentmodels, system prompts, tools, middleware, backends, and harness/provider profiles in trusted code. Supply the intended model explicitly; do not let request data select providers, credentials, profiles, or policy middleware. - Enforce authorization in tools and backends. Treat user messages, retrieved content, file contents, tool results, plans, summaries, and subagent responses as data that cannot grant permissions, even when prompt instructions tell the model to ignore malicious content.
- Inventory the assembled tool surface:
tools=adds to built-ins. Filesystem middleware registersls,read_file,write_file,edit_file,delete,glob,grep, andexecute; unsupporteddeleteandexecuteare filtered from model requests. The defaultStateBackend()has no shell execution, and a default general-purpose subagent normally addstask. - Restrict file tools with an explicit
FilesystemMiddleware(backend=..., tools=[...])replacement; its list must includeread_file. Preserve the intended backend and enforce path policy in the replacement or backend: middleware with the same name replaces the built-in instance, so its configuredpermissionsdo not automatically carry over. Review profileexcluded_toolsfor