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

# Agents, Sub-agents & Tools

> The difference between an Agent, a Sub-agent, and a Tool — and how to wire them together.

Three building blocks let an LLM do more than answer a single prompt: **Agents**, **Sub-agents**, and **Tools**. They sound similar but play different roles. This page explains each and shows how they connect.

## At a glance

|                      | Agent                                              | Sub-agent                                       | Tool                                                             |
| -------------------- | -------------------------------------------------- | ----------------------------------------------- | ---------------------------------------------------------------- |
| **Node type**        | [LLM](/workflow/nodes/llm) (Agent mode)            | [LLM](/workflow/nodes/llm) (Sub-agent mode)     | [Tool](/workflow/nodes/tool)                                     |
| **Runs on its own?** | Yes — always part of the flow                      | No — only when an agent calls it                | Agent tool mode: no. Standalone mode: yes.                       |
| **What it is**       | A standard LLM step                                | A specialist LLM the main agent calls on demand | A built-in capability (web search, etc.) the agent can invoke    |
| **How it's used**    | Receives a prompt, runs the model, produces output | The main agent decides if the task needs it     | Bundled into an agent's toolset, or run directly as a fixed step |

## Agent

An **Agent** is the everyday LLM step. You give it a prompt and a model; it runs as part of the workflow and produces an output the next node consumes. Pick this when the node should **always run** as part of the flow.

Create one with an [LLM node](/workflow/nodes/llm) set to **Agent** mode (the default).

## Sub-agent

A **Sub-agent** is a specialized helper that other agents can call on demand — like a junior expert sitting on the bench. It does **not** run on its own. A main agent reads its **tool description** and decides whether the current task needs it.

Use sub-agents to split a big problem into focused roles — a researcher, a writer, a validator — that the main agent orchestrates. Each sub-agent is an [LLM node](/workflow/nodes/llm) set to **Sub-agent** mode, which adds two settings:

* **Tool name** — a short identifier the parent agent uses to call it (e.g. `research_assistant`).
* **Tool description** — tells the parent agent *when* to call it. Be specific about the task it handles.

## Tool

A **Tool** is a ready-made capability — like web search or consulting another model — that an agent can invoke while it works. You add tools to an agent with a [Tool node](/workflow/nodes/tool) in **Agent tool** mode: pick the tools you want, and the node exposes a single `tool-list` output you wire into the agent.

A Tool node can also run in **Standalone** mode, where a single tool runs directly as its own step instead of being handed to an agent.

## Wiring it together

Both Tool nodes and Sub-agents feed an Agent through the same place: the Agent's **Tools** input handle (type `tool-list`, which accepts **multiple** connections).

<Steps>
  <Step title="Build the main Agent">
    Add an [LLM node](/workflow/nodes/llm) in **Agent** mode. It has a **Tools** input handle on its left.
  </Step>

  <Step title="Add tools">
    Add a [Tool node](/workflow/nodes/tool) in **Agent tool** mode, select your tools, and connect its `tool-list` output to the Agent's **Tools** input.
  </Step>

  <Step title="Add sub-agents">
    For each specialist, add an [LLM node](/workflow/nodes/llm) in **Sub-agent** mode and connect its **Tool out** handle into the same **Tools** input. The main agent now sees each sub-agent as one of its tools.
  </Step>
</Steps>

<Note>
  Because the Tools input accepts multiple connections, one Agent can combine several Tool nodes and several sub-agents at once.
</Note>

## Limits

<Warning>
  Sub-agents can call other sub-agents, but the chain is capped at a **depth of 5**. Tool names must be **unique** within a single parent agent, and sub-agent call chains can't form a **cycle**.
</Warning>

## Next steps

<CardGroup cols={2}>
  <Card title="LLM node" icon="brain" href="/workflow/nodes/llm">
    Agent and Sub-agent modes in detail.
  </Card>

  <Card title="Tool node" icon="wrench" href="/workflow/nodes/tool">
    Agent-tool bundles and standalone tools.
  </Card>
</CardGroup>
