[Docs index](/docs.md) / [Subagents](/docs/subagents/overview.md) / Delegating to a Subagent

---

# Delegating to a Subagent

Once you have one or more subagents, the main chat can hand off work to them. The delegating agent sends a task, the subagent runs it with its own tools and prompt, and the result comes back as a reply you can keep working with.

This guide covers two ways to delegate:

- Implicitly, by letting the main chat decide.
- Explicitly, by telling the chat which subagent to use.

## Before you begin

- At least one subagent must exist in your workspace.
- Its **Description** should clearly state what it does. The main chat reads the description to decide whether to delegate. Agents with vague descriptions get ignored.
- You must be in a workspace where you have access to the agent (owner, shared with you, or workspace admin).

## Implicit delegation

Open the main `/ai` chat and ask for something the subagent can handle. If the request clearly maps to one of your agents, the chat will call the agent on its own.

Example:

> "Give me the support digest for yesterday."

If you have a subagent called **Support Digest** with a description like "Produces a daily summary of support tickets grouped by severity," the main chat will notice, delegate to that agent, and return the summary.

Implicit delegation works best when:

- You have a small number of subagents with clearly non-overlapping descriptions.
- The request uses words that echo what the subagent is for.
- The agent lives in the same workspace as the chat.

## Explicit delegation

Name the agent directly:

> "Ask the **WMS Drift Monitor** to check for any new discrepancies since this morning and give me the list."

> "Use the **Weekly AR Reminder** subagent to draft the email for the three oldest invoices in the report you just pulled."

Naming is the safer choice when:

- Two subagents could plausibly handle the same request.
- The work is sensitive and you want to be sure the right guardrails apply.
- You are building a multi-step workflow that hands off to specific agents at specific steps.

## Chatting directly with a subagent

You do not have to go through the main chat at all. From the **Subagents** page, click the chat icon on an agent's card. This opens `/ai` with that agent pre-selected. Everything you send goes to that agent, with its system prompt and its tool whitelist — no routing step.

Direct chat is the right mode when you are:

- Developing and iterating on the agent (refining its prompt, adding tools).
- Doing focused work that only that agent should touch.
- Running a sensitive operation where you do not want the main chat to second-guess which agent to use.

## Chaining subagents

A subagent can delegate to another subagent. This lets you build small pipelines: a "Report Builder" agent that delegates data gathering to a "WMS Query" agent and formatting to a "Markdown Formatter" agent.

Chaining is bounded by a delegation depth limit so agents cannot recurse forever. By default, a subagent called by the main chat cannot delegate further. If you need deeper chains, ask your workspace admin to raise the limit.

## What happens during delegation

1. The main chat (or calling subagent) picks a target agent.
2. It sends a task string and, optionally, context from the current conversation.
3. The target agent runs with **its** system prompt, **its** model, and **its** tool whitelist — not the caller's.
4. The target agent returns a text result to the caller.
5. The caller continues the original conversation using that result.

The delegation is a sub-run. You see it as a tool call in the main chat, and you can expand it to read what the subagent did.

## Next steps

- [Scheduling a subagent](./scheduling-a-subagent.md) — run agents on their own.
- [Routing channels to a subagent](./routing-channels-to-a-subagent.md) — let a Slack channel drive the agent.
- [Troubleshooting](./troubleshooting.md) — when delegation does not do what you expected.

---

## Navigation

### In this section: Subagents

- [Subagents](/docs/subagents/overview.md)
- [Use Cases and Playbooks](/docs/subagents/use-cases.md)
- [Troubleshooting](/docs/subagents/troubleshooting.md)
- [Adding Tools to a Subagent](/docs/subagents/adding-tools-to-a-subagent.md)
- [Creating a Subagent](/docs/subagents/creating-a-subagent.md)
- **Delegating to a Subagent** (current)
- [Managing Subagent Access](/docs/subagents/managing-subagent-access.md)
- [Routing Channels to a Subagent](/docs/subagents/routing-channels-to-a-subagent.md)
- [Scheduling a Subagent](/docs/subagents/scheduling-a-subagent.md)

#### Playbooks

- [Playbook: Build a Shared Toolbox for Your Organization](/docs/subagents/playbook-organization-toolbox.md)
- [Playbook: Build a Tier-1 Support Triage Subagent](/docs/subagents/playbook-tier-1-support-triage.md)
- [Playbook: Build a Vendor Intake Coordinator](/docs/subagents/playbook-vendor-intake-coordinator.md)
- [Playbook: Build an Ops Channel Concierge in Slack](/docs/subagents/playbook-ops-channel-concierge.md)
- [Playbook: Build an Overnight Reconciliation Agent](/docs/subagents/playbook-overnight-reconciliation-agent.md)

### Other sections

- [MCP Servers](/docs/mcp-servers/overview.md)
- [Tool Creation](/docs/tool-creation/overview.md)
- [Agent Filesystem](/docs/agent-filesystem/overview.md)
- [Chat Sharing](/docs/chat-sharing/overview.md)
- [Scheduled Triggers](/docs/scheduled-triggers/overview.md)
- [Agent Skills](/docs/agent-skills/overview.md)
- [Sandcastles](/docs/sandcastles/overview.md)
- [Workspace Permissions](/docs/workspace-permissions/overview.md)

[Back to docs index](/docs.md)
