Skip to content
estudIA

AI glossary

Subagent

An agent launched by another agent to handle one part of a task, usually with its own fresh context, and that reports back a summary.

When a task is big, a main agent (the orchestrator) can split it and hand pieces to subagents: one researches, another writes tests, another reviews. Each starts with a clean context window, so the main agent’s context does not fill up with every detail.

Cursor’s Projects, for example, uses a coordinator that delegates to many subagents. The cost is more tokens overall, and the work is only as good as the instructions each subagent receives.

Example: In Claude Code, the main agent launches a subagent to find every use of a function in a large project. The subagent reads dozens of files and returns just the list, so the main agent’s context stays clean.

In practice

  • Give each subagent a specific task and say what it should return.
  • Use them for work that can be done separately; if everything depends on everything, one agent is better.
  • Watch usage: each subagent spends its own tokens.

A coordinator with thousands of subagents: the Cursor Projects story.

Related terms

Learn more

← Back to the glossary