What is an agent as tool?
An agent-as-tool lets a supervisor agent delegate subtasks to other agents. Instead of handing over control, the supervisor invokes a sub-agent as a callable tool, receives the result, and integrates it into a unified response. This enables composable, multi-agent systems where each agent focuses on a specific capability. Use agent-as-tool when a task spans multiple intents or requires synthesis across specialized skills—for example, a research assistant that calls one sub-agent to fetch data and another to evaluate its relevance, then merges the results.How it works
Attach the tools to a supervisor agent – The supervisor uses the agent-as-tool like any other tool.
Sub-agents and their agent-as-tool wrappers must be created before the supervisor agent that uses them.
Create an agent as tool
First, create the sub-agent you want to expose as a tool. Then wrap it:Parameters
| Parameter | Description |
|---|---|
| name (required) | The name of the tool. Appears in spans and traces. |
| type (required) | Must be agent_as_tool. |
| description (required) | Helps the supervisor agent decide when to invoke this tool. Included in the planner’s system prompt. |
| config.agent_id (required) | The ID of the sub-agent to run when this tool is invoked. |
Update an agent as tool
You can update the tool’s name and description. The underlying sub-agent cannot be changed. To use a different sub-agent, create a new agent-as-tool for that sub-agent.Delete an agent as tool
Deleting an agent-as-tool removes the tool only. The underlying sub-agent is not affected.An agent-as-tool cannot be deleted if it is still linked to a supervisor agent. Unlink it from the supervisor first.
Attach to a supervisor agent
Pass agent-as-tool IDs in thetool_ids parameter when creating or updating a supervisor agent. The syntax is the same as for any other tool type.
Deployment behavior
When a supervisor agent is promoted, SeekrFlow automatically promotes any linked sub-agents that are not already active. The supervisor remains inPending state until all sub-agents are ready.
When a supervisor is demoted, its sub-agents are not automatically demoted. You must demote each sub-agent individually if needed.
Constraints
- No cycles — The agent graph must be a tree. Agent A cannot be a tool for Agent B if Agent B is already a tool for Agent A, directly or indirectly.
- One tool per agent — Each agent can only have one agent-as-tool wrapper. Duplicating an agent-as-tool is not supported.
- Sub-agent deletion — A sub-agent cannot be deleted while it is still linked to a supervisor. Unlink the agent-as-tool from the supervisor and delete the tool first.
- Sub-agent demotion — A sub-agent cannot be demoted while its supervisor is active. Either demote the supervisor first, or unlink the sub-agent.