A pre-compiled agent spec.
The runnable's state schema must include a 'messages' key.
This is required for the subagent to communicate results back to the main agent.
When the subagent completes, the final message in the 'messages' list will be
extracted and returned as a ToolMessage to the parent agent.
CompiledSubAgent()Unique identifier for the subagent.
What this subagent does.
A custom agent implementation.
Create a custom agent using either:
create_agent()langgraphIf you're creating a custom graph, make sure the state schema includes a 'messages' key. This is required for the subagent to communicate results back to the main agent.