Tagged articles

SubAgentMiddleware

1 articles · Page 1 of 1
Code Archaeology
Code Archaeology
Mar 16, 2026 · Artificial Intelligence

How Deep Agents Implements Sub-Agent Delegation: Task Tool, State Isolation & System Prompt Injection

This article dissects Deep Agents' SubAgentMiddleware implementation, revealing how the task tool dynamically delegates complex work to isolated sub-agents with separate context windows, detailing dynamic tool construction, state isolation via excluded keys, system prompt injection for delegation guidance, and a Deep Research case study showing research-agent delegation in action.

AI engineeringAgent DelegationDeep Agents
0 likes · 22 min read
How Deep Agents Implements Sub-Agent Delegation: Task Tool, State Isolation & System Prompt Injection