Gemini CLI subagents

Google has officially introduced subagents to the Gemini CLI, a major architectural update that allows the CLI to act as a strategic orchestrator. Instead of handling every task in a single session, Gemini CLI can now delegate complex, repetitive, or high-volume sub-tasks to specialized expert agents, keeping the primary session lean and focused.

What are Subagents?

Subagents are specialized AI experts that operate with their own isolated context windows, custom system instructions, and curated toolsets. When the primary agent identifies a complex requirement—such as refactoring a codebase or researching multiple topics—it spins up a subagent to handle the work. Once the subagent finishes, it returns a consolidated summary to the main agent.

Key Benefits for Developers

Explicit Delegation

While Gemini CLI can automatically route tasks based on subagent descriptions, developers can explicitly hire an expert using the @agent syntax:

Built-in Experts

The Gemini CLI now ships with several pre-configured subagents:

  1. generalist: Ideal for batch tasks like refactoring with high-volume output.

  2. cli_help: An expert on Gemini CLI features and documentation.

  3. codebase_investigator: Specialized in architectural mapping and bug root-cause analysis.

This update marks a significant shift toward Agentic Workflows, where the developer acts as a manager of a team of AI experts, rather than just interacting with a single chatbot. To explore the full documentation and start building your own subagents, visit the Google Developers Blog.