Subagents have arrived in Gemini CLI
Blog post from Google Cloud
Gemini CLI utilizes subagents, which are specialized expert agents designed to handle complex, repetitive, or high-volume tasks, allowing the primary agent to remain focused on overarching goals and decision-making. Each subagent operates within its own context, using custom system instructions and tools to efficiently execute tasks and return a consolidated response to the main session. Users can create custom subagents for specific workflows, defined through Markdown files with YAML frontmatter, which can be shared or bundled within Gemini CLI extensions. Subagents can run in parallel, drastically speeding up processes by managing multiple tasks simultaneously, although caution is advised to avoid conflicts during parallel code edits. Built-in subagents, such as the generalist, cli_help, and codebase_investigator, are available to assist with various tasks, and users can explicitly delegate tasks to subagents using the @agent syntax. This system ensures efficient task management and supports the creation of tailored solutions to meet project-specific needs.