When to reach for it
- Specialists must be encapsulated.
- The main agent must retain absolute control.
- Security boundaries must be strictly separated.
/pattern/agents-as-tools/
One orchestrating agent calls other agents exactly like tools, hiding their internal logic and coordination behind a standard tool interface.
When to reach for it
When it backfires
The tradeoff
Excellent encapsulation is achieved against limited independence for the sub-agents.
A caller agent invokes a tool-agent through a standard tool interface. The embedded-agent semantics are hidden behind the call.
The caller treats the tool-agent as instant, but it runs a full internal loop. Timeouts fire before the tool-agent finishes.
Fix · Expose expected latency in the tool schema. Use async callbacks or streaming for long-running tool-agents.
The tool-agent throws an internal exception, but the caller only sees 'Tool execution failed.' Debugging requires tool-agent logs.
Fix · Return structured error payloads with a trace_id. Route the caller to a diagnostic node that can fetch and display the full trace.
Search patterns, frameworks, and pages.