Loading image...Kiro

Product

  • About Kiro
  • IDE
  • CLI
  • Web
  • Mobile
  • Pricing
  • Downloads

For

  • Enterprise
  • Startups
  • Students

Community

  • Overview
  • Ambassadors
  • Discord
  • Events
  • Powers
  • Shop
  • Showcase

Resources

  • Docs
  • Blog
  • Changelog
  • FAQs
  • Report a bug
  • Suggest an idea
  • Billing support

Social

Site TermsLicenseResponsible AI PolicyLegalPrivacy PolicyCookie Preferences
Loading image...Kiro
  • CLI
  • IDE
  • Web
  • Mobile
  • Enterprise
  • Pricing
  • Docs
SIGN INDOWNLOADS
Loading image...Kiro

Get Started

InstallationAuthenticationYour first project

Models

OverviewAvailable modelsReasoning effort

Features

How Kiro works
Specs
Steering
Hooks
MCP
Permissions
Custom agents
Built-in agents
Creating custom agents
Configuration reference
Invoking as sub-agents
Examples
Troubleshooting
Agent Skills
Powers
CompactionKiroignoreCheckpoints and rewind
Built-in tools
Configuration scopes

IDE 1.x

What's new in 1.0
Setup & First Run
Editor
Chat
Experimental
Troubleshooting0.x reference

CLI

What's new in 3.0
Setup & First Run
Terminal UI
Chat
Headless modeACPAuto complete
Experimental
2.x reference

Web - Preview

Setup & First RunIdentity Center
Connect your repositories
Working with the agent
Autonomous modeAutomations
Sandbox

Mobile - Preview

Overview

Commands and Reference

CLI commandsSlash commandsBuilt-in toolsExit codesSettingsIDE keyboard shortcuts

Billing

OverviewManaging your subscriptionUpgrading your planDowngrading your planCancelling your planPurchasing add-on creditsManaging your paymentsManaging usage notificationsManaging your taxesContacting billing supportDeleting your accountRelated questions

Enterprise

ConceptsOnboarding quickstart
Connecting your identity provider
Subscribe your teamManage subscriptions
Governance
Monitor and track
SettingsManaged updatesBillingIAMSupported regions

Privacy and Security

OverviewData protectionCode referencesCompliance validationInfrastructure securityIAM permissionsFirewalls, proxies, and data perimetersVPC endpoints (AWS PrivateLink)

Guides

Overview
Language support
Learn by playing

Migration

Migrating from Q DeveloperMigrating from VSCodeUpgrading from Q CLI
  1. Docs
  2. Features
  3. Custom agents
  4. Invoking as sub-agents

Invoking as sub-agents


Sub-agents let you hand off focused tasks to agents that run in their own isolated context. The main agent spawns sub-agents when a task benefits from parallelism, specialized tools, or context isolation - then aggregates the results when they finish.

CapabilityIDECLIWebMobile
Automatic sub-agent invocation✓✓✓✓
Explicit sub-agent invocation✓✓✓✓
Custom agents as sub-agents✓✓——
Parallel execution✓✓✓✓

On Web and Mobile, the agent delegates to Kiro's built-in sub-agents only; custom agents defined in .kiro/agents/ can be invoked as sub-agents from the IDE and CLI.

How sub-agents work

  1. Task assignment - You describe a task (or the main agent identifies one that benefits from delegation)
  2. Agent selection - Kiro selects the appropriate agent configuration based on the task and available agents
  3. Isolated execution - The sub-agent runs with its own context window, tools, and permissions
  4. Result return - When finished, the sub-agent returns findings to the main agent

Any custom agent can be invoked as a sub-agent. The main agent automatically selects agents based on their description field, or you can request one explicitly:

text
Use the code-reviewer agent to analyze src/auth/ for security issues

What sub-agents inherit

Sub-agents share the workspace environment but run with isolated conversation context:

Shared with main agentIsolated per sub-agent
Steering filesConversation history
MCP serversContext window
Workspace file accessSpec state
Permissions configurationHook triggers

Built-in sub-agents

Kiro includes two internal sub-agents used automatically when appropriate:

  • Context gathering - Explores your project structure and gathers relevant files and context
  • General purpose - Handles parallelized tasks of any kind using the default agent configuration

You don't need to configure these - the main agent uses them as needed.

Parallel execution

Sub-agents run in parallel, each working independently. This is useful for:

  • Refactoring multiple files simultaneously
  • Researching several topics in parallel
  • Running independent analysis tracks
text
Refactor these three services to use the new auth middleware - do them in parallel

Task dependencies

Sub-agents support directed acyclic graphs (DAGs) where tasks depend on each other. The main agent plans the full task graph upfront, then executes in the right order - running independent tasks in parallel and waiting for dependencies before starting dependent ones.

text
┌─────────────┐ │ 1. Analyze │ │ dependencies │ └──────┬───────┘ │ ┌──────▼───────┐ │ 2. Refactor │ │ modules │ └──────┬───────┘ │ ┌──────▼───────┐ │ 3. Run and │ │ fix tests │ └──────────────┘
Info

Task graphs are planned upfront and cannot be modified during execution. The agent determines the full DAG before any sub-agent starts running.

Review loops

A stage can loop back to an earlier stage when its output signals that more work is needed - for example, a reviewer sends work back to an implementer for revisions.

text
Implement the feature, then have a reviewer check it and send it back for fixes until it passes

The agent builds a looping pipeline with:

  • target - the stage to re-run when the loop triggers
  • trigger - text in the stage output that fires the loop (e.g., NEEDS_CHANGES)
  • max_iterations - safety cap (between 1 and 10)

Constraints:

  • A stage cannot loop back to itself
  • Mutual loops (A → B → A) are rejected
  • The trigger must be at least four characters

Tool availability

The default sub-agent has the same built-in tools as the main agent - read, write, shell, web_search, web_fetch, and any configured MCP tools.

When you delegate to a custom agent, the sub-agent uses that agent's tools and permissions configuration. Tools not listed in the custom agent's config won't be available to the sub-agent.

Custom orchestrator agents need the subagent tool

If you're building a custom agent that will spawn sub-agents, include subagent in its tools array (or use @builtin). Without it, the agent can't delegate.

Configuring sub-agent access

Control which agents can be spawned and which run without approval prompts using toolsSettings.subagent in your agent configuration:

json
{ "toolsSettings": { "subagent": { "availableAgents": ["reviewer", "tester", "docs-*"], "trustedAgents": ["reviewer", "tester"] } } }
FieldDescription
availableAgentsGlob patterns for agents this agent can spawn. Omit to allow all.
trustedAgentsAgents that run without permission prompts.

To restrict the tools a sub-agent can use, configure tools in the sub-agent's own config file rather than in the parent.

Surface-specific behavior

Sub-agents run in parallel and the main agent waits until all complete before proceeding. Each sub-agent has its own context window.

You can speed up development by leveraging sub-agents to perform multiple tasks simultaneously - for example, fetching and analyzing several tickets in parallel.

Best practices

  1. Use for complex tasks - Most valuable for multi-step operations that benefit from isolation or parallelism
  2. Provide clear instructions - Specific task descriptions lead to better agent selection and results
  3. Monitor progress - In CLI, use Ctrl+G to check on long-running sub-agents
  4. Configure access - Use availableAgents and trustedAgents for orchestrator agents that spawn many sub-agents

Troubleshooting

IssueSolution
Sub-agent not startingVerify the task description is clear and actionable
Missing tool accessCheck the agent configuration's tools field
Approval prompts blockingAdd the agent to trustedAgents, or trust the subagent tool
Main agent can't spawn sub-agentsAdd subagent to the orchestrator agent's tools array
Incomplete resultsProvide more specific instructions or break into smaller tasks
Page updated: August 4, 2026
Configuration reference
Examples