Design an agent-as-tool system using LangGraph's Subagents pattern, where you wrap a child agent as a tool that the main agent can call, enabling hierarchical composition, parallel execution, and clear separation of responsibilities.
LangGraph's Subagents pattern allows you to wrap a complete agent (with its own tools and logic) as a tool that the supervisor agent can invoke[citation:1][citation:7]. This enables hierarchical multi-agent systems where specialized sub-agents handle specific domains (e.g., stock agent, weather agent), and the main supervisor decides which sub-agent to invoke based on the user's request. Subagents can execute in parallel using Send for fan-out operations, and results are combined in the supervisor's state.