{"slug": "subagents-have-arrived-in-gemini-cli", "title": "Subagents have arrived in Gemini CLI", "summary": "Gemini CLI now supports \"subagents,\" which are specialized expert agents that can be delegated complex or repetitive tasks to keep the main session fast and focused. These subagents operate in isolation with their own tools, system instructions, and context window, and can be customized by users through simple Markdown files with YAML frontmatter. Additionally, Gemini CLI supports running multiple subagents in parallel, enabling a team of experts to work simultaneously on different tasks.", "body_md": "Subagents allow Gemini CLI to delegate complex, repetitive, or high-volume tasks to specialized expert agents. Each subagent operates within its own separate context window, custom system instructions, and curated set of tools. This keeps your main session fast, lean, and focused on the big picture while intermediate steps are handed off to a team of subagents.\nSubagents are specialized, expert agents that operate alongside your primary Gemini CLI session. When you give Gemini CLI a broad or complex task, it acts as a strategic orchestrator, delegating specific sub-tasks to the most relevant subagent.\nSubagents act in isolation with their own set of tools, MCP servers, system instructions, and context window. Their entire execution, which might involve dozens of tool calls, file searches, or test runs, is consolidated into a single response back to the main agent. This prevents your main context window from filling up and keeps your subsequent interactions fast and cost-effective.\nKey benefits of subagents:\nYou can create your own specialized team members (subagents) to automate specific workflows, enforce coding standards, or act with specific personas tailored to your project.\nCustom subagents are defined using simple Markdown files (.md\n) with YAML frontmatter. You can define them globally in ~/.gemini/agents\nfor your personal workflows or commit them to your repository to share with your team at the project level in .gemini/agents\n.\nSubagents can also be bundled as part of Gemini CLI extensions by providing agent definition Markdown files (.md\n) to an agents/\ndirectory in your extension.\nHere is an example of how to create a custom frontend specialist agent:\n---\nname: frontend-specialist\ndescription: Frontend specialist in building high-performance, accessible, and\nscalable web applications using modern frameworks and standards.\ntools:\n- read_file\n- grep_search\n- glob\n- list_directory\n- web_fetch\n- google_web_search\nmodel: inherit\n---\nYou are a Senior Frontend Specialist and UI/UX Architect. Your goal is to design\nand implement exceptional, production-grade user interfaces that are both\nbeautiful and functionally robust. You prioritize modern best practices,\nsystem-level architecture, and distinctive aesthetics.\n### Core Principles:\n- Architecture & Scalability: Design modular, maintainable, and scalable\nfrontend architectures. Expert in component-driven development, state\nmanagement patterns, and micro-frontends.\n- Performance & Optimization: Prioritize speed and responsiveness. Deep\nknowledge of Core Web Vitals, rendering strategies (SSR, SSG, ISR, Hydration),\nbundle optimization, and caching.\n- Accessibility (A11y): Ensure all interfaces are inclusive by default\n(WCAG 2.1+ compliance, semantic HTML, robust ARIA implementation, keyboard-\nfirst navigation).\n### Guidelines:\n- Browser-First Thinking: Understand and leverage native browser APIs\n(Intersection Observer, Resize Observer, Web Workers, Storage APIs) before\nreaching for libraries.\n- Atomic Principles: Build small, reusable, and composable components that\nfollow the Single Responsibility Principle.\n- Visual Feedback: Always provide clear states (loading, skeleton screens,\nerror, empty, success) and interactive feedback.\n- Progressive Enhancement: Ensure core functionality works everywhere,\nwhile providing an enhanced experience for modern browsers.\n- Maintenance-Driven Design: Write code that is easy to delete, refactor,\nand test. Document architectural decisions and complex logic clearly.\nYour role is strictly to analyze, report areas of improvement, and make\nstrategic suggestions. Do not fix it yourself, just make suggestions.\nBy placing this file in .gemini/agents/frontend-specialist.md\n, Gemini CLI instantly gains a new expert it can call upon.\nTo see all the different configuration options, refer to the docs for subagents.\nWhat's better than one expert? A whole team of them working simultaneously. Gemini CLI supports parallel subagents, allowing you to spin off multiple subagents or many instances of the same subagent, at the same time.\nIf you need to research five different topics or refactor several distinct components, Gemini CLI can dispatch multiple agents in parallel, drastically reducing the total time it takes to complete the task.\nYou can explicitly request this by saying, \"Run the frontend-specialist on each package in parallel.\"\nNote: Exercise caution with parallel subagents for tasks that require heavy code edits. Multiple agents editing code at the same time can lead to conflicts and agents overwriting one another. Parallel subagents will also lead to usage limits being hit faster as requests are being sent in parallel across agents.\nGemini CLI ships with several built-in subagents ready for you to use:\nGemini CLI automatically routes tasks to your subagents when it determines they are the most efficient path based on their description. However, you can also explicitly delegate tasks to a subagent by referencing them in your prompt using the @agent syntax. For example:\nBy using the @ symbol followed by the subagent's name, you explicitly tell Gemini CLI which expert to hire for the job, ensuring the task is handled within that agent's isolated context window.\nTo view all configured subagents at any given time just run /agents within Gemini CLI.\nTo learn more about configuring subagents, restricting their tools, and optimizing their descriptions, check out the documentation.\nYou can also follow Gemini CLI on X to stay up to date with the latest news and announcements.", "url": "https://wpnews.pro/news/subagents-have-arrived-in-gemini-cli", "canonical_source": "https://developers.googleblog.com/subagents-have-arrived-in-gemini-cli/", "published_at": "2026-05-20 03:15:08.505180+00:00", "updated_at": "2026-05-20 03:15:12.039014+00:00", "lang": "en", "topics": ["artificial-intelligence", "developer-tools", "large-language-models", "products"], "entities": ["Gemini CLI", "MCP"], "alternates": {"html": "https://wpnews.pro/news/subagents-have-arrived-in-gemini-cli", "markdown": "https://wpnews.pro/news/subagents-have-arrived-in-gemini-cli.md", "text": "https://wpnews.pro/news/subagents-have-arrived-in-gemini-cli.txt", "jsonld": "https://wpnews.pro/news/subagents-have-arrived-in-gemini-cli.jsonld"}}