Brief IA

Google Revolutionizes Gemini CLI with Specialized Sub-Agents

🛠️ AI Tools·Tom Levy·

Google Revolutionizes Gemini CLI with Specialized Sub-Agents

Google Revolutionizes Gemini CLI with Specialized Sub-Agents
Key Takeaways
1Google introduces sub-agents in Gemini CLI to handle complex and large tasks.
2The sub-agents operate in isolation, avoiding overload on the main session.
3Three native sub-agents are available, including codebase_investigator and cli_help.
💡Why it mattersThis innovation optimizes developer efficiency by alleviating the workload of the main agent.
Le brief IA que lisent les pros

Le brief IA que les pros lisent chaque soir

Les 7 actus IA du jour, décryptées en 5 min. Gratuit.

Inclus dès l'inscription : notre sélection des meilleurs guides & comparatifs IA.

Choisis ton rythme

Gratuit · Pas de spam · Désabonnement en 1 clic

📄
Full Analysis

Google Introduces Sub-Agents in Gemini CLI

On April 15, 2026, Google announced a significant advancement for its open-source AI agent, Gemini CLI, by integrating sub-agents. Aimed at developers, these sub-agents are designed to handle tasks deemed too complex, large, or repetitive for the main agent. By delegating these tasks, the main agent can focus on high-level strategic decisions.

Functionality and Architecture of Sub-Agents

The sub-agents of Gemini CLI operate in an isolated environment, with their own system instructions and tools. This means that the multiple tool calls, file reads, or test executions they perform do not overload the main session history. Once their task is completed, they relay a consolidated result back to the main agent, thus maintaining a lightweight and efficient session.

Google describes this approach as a hub and spoke model, where the main agent acts as a strategist, while the sub-agents are interchangeable specialists. Tasks that a sub-agent can manage include simultaneous modifications of multiple files, executing commands that generate large logs, and analyzing extensive codebases.

Google explains that the complete execution of a sub-agent, which may involve dozens of tool calls, file searches, or test executions, is consolidated into a single response sent back to the main agent. This prevents saturation of the main context window and ensures fast and economical interactions.

Creating and Customizing Sub-Agents

To create a custom sub-agent, one simply needs to define a Markdown file with a YAML header. This file contains the agent's metadata and system instructions that serve as a starting point. The main parameters include the name, description, accessible tools, and the model to use.

These files can be stored at two levels: at the project level in the .gemini/agents/ folder, or at the user level in ~/.gemini/agents/. Sub-agents can also be integrated into Gemini CLI extensions via an agents/ folder.

Using Sub-Agents in Gemini CLI

Gemini CLI offers three native sub-agents:

  • codebase_investigator, for analyzing codebases and mapping dependencies.
  • cli_help, specialized in assisting with Gemini CLI, to be consulted for configuration or command questions.
  • A general-purpose agent for tasks requiring isolated context.

To invoke a sub-agent, simply precede the prompt with the @ symbol followed by the agent's name. Without this prefix, the main agent decides whether to delegate the task. Gemini CLI also supports remote sub-agents via the Agent-to-Agent (A2A) protocol, allowing delegation to agents on external servers.

Sub-agents are enabled by default but can be disabled by modifying the settings.json file by setting enableAgents to “false”, or via the /agents disable command at the project level.

Brief IA — L'actualité IA en français

L'essentiel de l'actualité de l'intelligence artificielle, décrypté et expliqué chaque jour.