GAIA Logo
PricingDocs
GAIA Logo
Home/Glossary/Subagent

Subagent

A subagent is an AI agent that another agent starts to handle one part of a bigger task. The parent agent (often called the supervisor or orchestrator) gives it a written task, a focused set of tools and a fresh context of its own; the subagent works on that piece independently and returns only its result. Splitting work this way lets several subagents run in parallel and keeps the main agent's context clean.

Understanding Subagent

Subagents are the workers in a supervisor-worker multi-agent system. Each subagent is optimized for a specific domain or task type: one might specialize in email operations, another in calendar management, another in database queries, and another in external API calls.

Subagents can operate in parallel when their tasks are independent, enabling significant speed improvements over sequential processing. A request to 'prepare for my Monday meetings' could dispatch subagents simultaneously to: pull meeting attendee details from the calendar, retrieve recent emails from those attendees, check their open tasks in the project tool, and gather relevant documents from Notion, completing in seconds what would take minutes sequentially.

Subagents also enable specialization that improves quality. An email subagent can have email-specific prompts, tools, and context that make it more effective at email tasks than a general-purpose agent. This specialization is analogous to how expert consultants outperform generalists in their domain.

In LangGraph (GAIA's agent framework), subagents are represented as nodes in the graph. The graph structure defines when each node runs, what inputs it receives, and how its outputs flow to other nodes.

What a subagent receives and what it returns: typically a system prompt for its specialty, the task the parent wrote, a subset of tools and limits such as a maximum number of steps. It does not see the parent's full conversation unless the parent passes that along. When it finishes, it returns a summary or a structured result rather than its whole transcript, and that is the main point: a subagent can read twenty files or run ten searches and hand back one paragraph.

Domain agents vs task subagents: some systems keep long-lived domain agents (an email agent, a database agent) that the supervisor routes requests to. Others spawn short-lived subagents on demand for a single job, such as researching a topic or reviewing a document, and discard them afterwards. Coding assistants such as Claude Code use the second style: the main agent spawns subagents to explore a codebase or run a review in parallel, each in its own context.

When subagents help and when they hurt: they pay off when subtasks are independent, produce bulky intermediate output or need different tools. They hurt when subtasks depend closely on each other's details, because every handoff loses context and the parent has to explain it again. Each subagent also makes its own model calls, so three parallel subagents cost roughly three times the tokens of one.

How GAIA Uses Subagent

In GAIA, the executor agent (the worker tier behind the chat) is the parent. Built-in integrations such as Gmail and Google Calendar are not separate subagents: the executor loads their tools and acts itself. Subagents are used for two things. The executor can spawn a subagent for bulky, self-contained work, such as researching a topic across many pages, so that output never fills the main context; and it hands tasks to a subagent for each custom or authenticated MCP server you have connected, whose tools are issued per user. Subagents run in the background by default, several can run at once, and each reports its result back to the executor. A spawned subagent cannot spawn more subagents.

Related Concepts

Supervisor Agent

A supervisor agent is the AI agent in charge of a multi-agent system. It receives the request, splits it into subtasks, hands each one to a specialized worker agent (a subagent) with the right tools, checks what comes back, and combines the results into one answer. The workers do the execution; the supervisor decides who does what and when the job is done.

Agentic AI

Agentic AI describes artificial intelligence systems designed to operate autonomously, making decisions and executing multi-step tasks with minimal human oversight.

Agent Loop

An agent loop is the iterative execution cycle of an AI agent in which it reasons about the current state, selects and executes an action (often a tool call), observes the result, and repeats until the task is complete or a stopping condition is reached.

AI Orchestration

AI orchestration is the coordination of multiple AI agents, models, and tools to work together in completing complex, multi-step tasks that no single component could handle alone.

Parallel Agents

Parallel agents are multiple AI agents that execute concurrently on independent tasks, combining their results to complete complex workflows faster than sequential single-agent processing would allow.

Frequently Asked Questions

Not directly. Each subagent reports to the executor agent that started it. Its result lands in the executor's inbox and is read before the executor's next step, so the executor can pass one subagent's findings into the next task. The executor can also send a message to a running subagent or cancel it.

GAIA does not cap this at a small fixed number. Several subagents can run in parallel when their tasks are independent, each with its own step limit. In practice, the model provider's rate limits and the size of each task decide how many are worth running at once.

A subagent is an AI agent started by another agent to handle one part of a larger task. It gets its own instructions, tools and context, works independently, and returns a result to the agent that started it. Subagents let a system run pieces of work in parallel without overloading the main agent's context.

The difference is the role, not the technology. An agent takes a goal from a user and decides how to reach it. A subagent takes a narrower task from another agent, works within the tools and limits it was given, and reports back instead of answering the user directly.

Use them when a task splits into independent parts, when a part would produce a lot of intermediate output (long documents, many search results), or when parts need different tools or permissions. Keep the work in one agent when the steps depend closely on each other or the task is small, because each subagent adds model calls and loses some context at the handoff.

Explore More

Compare GAIA with Alternatives

See how GAIA stacks up against other AI productivity tools in detailed comparisons

GAIA for Your Role

Discover how GAIA helps professionals in different roles leverage AI for productivity

Stop doing everything yourselfStop doing everything yourself

Join thousands of professionals who gave their grunt work to GAIA.

Twitter IconWhatsapp IconDiscord IconGithub Icon
Product
DownloadUse CasesMarketplaceBotsPricingRoadmap
Explore
Compare GAIAAlternativesAutomationsAI GlossaryGAIA for Your RoleBest AI Assistants
Resources
DocumentationBlogFAQRelease NotesStatusRequest a Feature
Company
AboutManifestoContactBranding
Legal
Terms of UsePrivacy Policy
The Experience Company Inc.
Discord IconTwitter IconGithub IconWhatsapp IconLinkedin Icon