> ## Documentation Index
> Fetch the complete documentation index at: https://docs.budecosystem.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sub-agents and external agents

> Let an agent call other agents on the platform or external A2A agents.

A sub-agent is another agent your agent can call as if it were a tool. Each connected agent becomes one tool, named after the agent. The calling agent decides when to use it, passes it a message, and gets its answer back.

* **An agent on the platform:** in the builder click **Agents**. **Connected Agents** lists the ones already attached; **Available Agents** lists the rest. Open one and click **Connect** (**Disconnect** removes it). Each agent shows a health indicator. The agent needs a model selected before you can connect anything.
* **An external A2A agent:** **Agents → + Agent → External Agent**, then **Add New External Agent**.

| Field | What to enter | Rules and defaults |
| - | - | - |
| **Agent Name** | The name your agents and callers use. | Required. Must be unique among the agent's tools, and must not match a native tool's name. |
| **Tags** | Keywords. | Optional. |
| **Description** | What the agent does. The calling model reads it to decide when to use the agent. | Optional, but worth writing well. |
| **Base URL** | The address of the agent's A2A card. | Required. The card is fetched when the agent is called. |
| **Authentication** | **None**, **Bearer Token** or **API Key**. | Enter the credential the remote agent expects. |

Click **Register Agent**. It then appears under **Available Agents** and is connected like any other.

### How a sub-agent is called

* For an agent on the platform, its latest configuration is read at the moment of the call, so edits to its default version take effect without reconnecting.
* For an external agent, its card is fetched over HTTP and the call goes through the Bud gateway.
* Calls between agents are tracked: governance can read `bud.recursion_depth` to limit how deep a chain of agents may go ([Governing and supervising agents](https://docs.budecosystem.com/prompts-agents/governance.md)).

> [!TIP]
>
> Give each sub-agent a narrow job and a clear description. A calling agent with many vague sub-agents chooses badly.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.