Create a tool that can handoff control to the requested agent.
create_handoff_tool(
*,
agent_name: str,
name: str | None = None,
description: str | None = None,
add_handoff_messages: bool = True
) -> BaseTool| Name | Type | Description |
|---|---|---|
agent_name* | str | The name of the agent to handoff control to, i.e. the name of the agent node in the multi-agent graph. Agent names should be simple, clear and unique, preferably in snake_case,
although you are only limited to the names accepted by LangGraph
nodes as well as the tool names accepted by LLM providers
(the tool name will look like this: |
name | str | None | Default: NoneOptional name of the tool to use for the handoff. If not provided, the tool name will be |
description | str | None | Default: NoneOptional description for the handoff tool. If not provided, the description will be |
add_handoff_messages | bool | Default: TrueWhether to add handoff messages to the message history. If |