Gemini CLI Gets Subagents — Google's Answer to Agent Orchestration
Google just shipped subagents in Gemini CLI, and the design philosophy is worth paying attention to.
The idea: instead of one giant agent trying to do everything and polluting its own context window, Gemini CLI now acts as an orchestrator. When you give it a broad task, it delegates subtasks to specialist agents, each with their own context window, system instructions, and tool set. The specialist does its work — potentially dozens of tool calls — and returns a consolidated summary. Your main session stays clean.
Three built-in subagents ship out of the box: a generalist for general tasks, a cli_help agent that knows Gemini CLI docs inside out, and a codebase_investigator for architectural mapping and bug analysis. But the real play is custom subagents — you define them as simple Markdown files with YAML frontmatter, drop them in ~/.gemini/agents or your project's .gemini/agents directory, and they're live. Share them with your team by committing to the repo.
You can explicitly route tasks using @agent syntax (like @frontend-specialist Review our auth flow) or let Gemini CLI decide which specialist to use based on the task. Subagents can also run in parallel for simultaneous multi-task handling.
This is Google's version of what Claude Code and Windsurf are also converging on: the terminal coding agent as orchestrator, not soloist. The Markdown-file-as-agent-definition pattern is elegant — it means agent creation is as accessible as writing a README.
https://geminicli.com/docs/core/subagents/
https://github.com/google-gemini/gemini-cli
← Back to all articles
The idea: instead of one giant agent trying to do everything and polluting its own context window, Gemini CLI now acts as an orchestrator. When you give it a broad task, it delegates subtasks to specialist agents, each with their own context window, system instructions, and tool set. The specialist does its work — potentially dozens of tool calls — and returns a consolidated summary. Your main session stays clean.
Three built-in subagents ship out of the box: a generalist for general tasks, a cli_help agent that knows Gemini CLI docs inside out, and a codebase_investigator for architectural mapping and bug analysis. But the real play is custom subagents — you define them as simple Markdown files with YAML frontmatter, drop them in ~/.gemini/agents or your project's .gemini/agents directory, and they're live. Share them with your team by committing to the repo.
You can explicitly route tasks using @agent syntax (like @frontend-specialist Review our auth flow) or let Gemini CLI decide which specialist to use based on the task. Subagents can also run in parallel for simultaneous multi-task handling.
This is Google's version of what Claude Code and Windsurf are also converging on: the terminal coding agent as orchestrator, not soloist. The Markdown-file-as-agent-definition pattern is elegant — it means agent creation is as accessible as writing a README.
https://geminicli.com/docs/core/subagents/
https://github.com/google-gemini/gemini-cli
Comments