Context isolation separates the information supplied to collaborating agents. Instead of sharing a conversation history, an agent receives a specific request, works in its own context, and returns its result. Its intermediate steps stay out of the caller’s context. section 9.2 section 9.4.3
In the Agent as Tool pattern, a parent agent coordinates specialists. The AgentTool adapter receives the parent’s context but does not pass it to the child. It passes a request string instead, and the child runs in a new context. If an input schema is supplied, the adapter validates the input with Pydantic and converts it to a JSON string. section 9.4.2
Delegating research
An orchestrator asks a researcher to investigate a question. The researcher may search the web several times, but only its final result returns to the orchestrator. The parent can use that result without carrying the searches and intermediate reasoning in its own context. section 9.4.3
Figure 9.8 Agent as Tool: the child agent runs in an isolated environment and returns only the final result.
The diagram shows the boundary between the orchestrator and an isolated child agent. section 9.4.3
Isolation provides abstraction and saves context-window space: the parent sees the result rather than every internal tool call and reasoning step. It also makes the child’s tool use and failures less directly visible to the parent. The trade-off is harder debugging, because inspecting the child’s execution requires a separate inspection. section 9.4.3
Choose the context boundary to suit the collaboration. A workflow can share a context or create separate contexts for its agents; sharing is useful when intermediate state must pass between steps. Agent as Tool keeps the coordinator in control and isolates specialists, while Transfer shares context when routing control to a specialist. section 9.2 section 9.4.3








