Google Announces Subagents for Gemini CLI: Orchestrating Teams of Expert AI
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

  • Context Preservation: By isolating complex intermediate steps (which might involve dozens of tool calls) into a subagent’s context, the main agent’s context window remains clear of "noise," preventing "context rot."

  • Parallel Execution: Gemini CLI can dispatch multiple subagents simultaneously. Developers can drastically reduce project time by running specialized agents in parallel for research, code exploration, and testing.

  • Custom Experts: Developers can define their own subagents using simple Markdown files with YAML frontmatter. These can be global (for personal use) or committed to a repository (for team-wide standards).

Explicit Delegation

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

  • @frontend-specialist: "Review our UI components for accessibility."

  • @codebase_investigator: "Map out the authentication flow across these microservices."

  • @generalist: "Update the license headers for all files in this directory."

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.