newspaperPress Guidelines
Pricing
Blog
Downloaddownload

Explore our next generation products

See overview

Products

antigravityAntigravity 2.0terminalAntigravity CLIcodeAntigravity IDEsdkAntigravity SDK

Built for developers in the agent-first era

See overview
EnterpriseFrontendFullstackScienceMarketer

Everything you need to stay up-to-date and get help

Documentationkeyboard_arrow_rightChangelogSupportPressReleases

Explore our next generation products

See overview

Products

antigravityAntigravity 2.0terminalAntigravity CLIcodeAntigravity IDEsdkAntigravity SDK

Built for developers in the agent-first era

See overview
EnterpriseFrontendFullstackScienceMarketer
Pricing
Blog

Everything you need to stay up-to-date and get help

Documentationkeyboard_arrow_rightChangelogSupportPressReleases
Home
Antigravity 2.0v2.3.1keyboard_arrow_right
Overview
Getting Started
Build with Google
Feature Overview
Models
Projects
Settingskeyboard_arrow_right
Overview
Agent Settings
Artifact Review
Customizationskeyboard_arrow_right
MCP
Skills
Rules
Plugins
Hooks
Sidecars
Agent Capabilitieskeyboard_arrow_right
Permissions
Subagents
Artifactskeyboard_arrow_right
Overview
Plan
Walkthrough
Screenshots
Antigravity CLIv1.1.5keyboard_arrow_right
Overview
Getting Started
Installation & Auth
Tutorial
Using AGY CLI
Features
Gemini Migration
Prompting
Artifactskeyboard_arrow_right
Overview
Conversations
Agent Capabilitieskeyboard_arrow_right
Choose an execution mode
Subagents
Sandbox
Permissions
Projects
Settingskeyboard_arrow_right
Overview
AI Credits
Customizationskeyboard_arrow_right
MCP
Plugins & Skills
Status Line
Window Title
Commandskeyboard_arrow_right
Agents (/agents)
Code Search (/codesearch)
AI Credits (/credits)
Diff (/diff)
Permissions (/permissions)
Resume (/resume)
Status Line (/statusline)
Window Title (/title)
Model Quotas (/usage, /quota)
Best Practices
Troubleshooting
Reference
Antigravity SDKv0.1.7keyboard_arrow_right
Overview + Quick Start
Customizationskeyboard_arrow_right
MCP
Antigravity IDEv2.1.1keyboard_arrow_right
Overview
Getting Started
Featureskeyboard_arrow_right
Tab
Side Panel
Review Changes
Artifactskeyboard_arrow_right
Plan
Walkthrough
Screenshots
Browser Recordings
Browserkeyboard_arrow_right
Overview
Allowlist / Denylist
Separate Chrome Profile
Customizationskeyboard_arrow_right
MCP
Skills
Rules
Workflows
Plugins
Hooks
Settings
Migrationkeyboard_arrow_right
Firebase Studio Migration
Enterprise
Plans
FAQ
  • side_navigation
  • Antigravity CLI
  • >
  • Commands
  • >
  • Agents (/agents)

Agents Command (/agents)link

Browse, select, and switch between custom agents, or monitor active and completed background subagents directly inside an interactive TUI panel.

Before you beginlink

  • Install Antigravity CLI
  • Understand the Asynchronous execution model

Overviewlink

The /agents command opens the interactive Agent Manager Panel. This interface serves two distinct purposes:
  1. Custom Agent Selection & Discovery: Choose between the default agent and custom workflow-specific agents, or discover where to define new agents locally and globally.
  2. Subagent Monitoring & Control: Track, inspect, or terminate background subagents running concurrently during your active session.
To open the panel inside the TUI, type /agents and press Enter:
bash
/agents
Interactive Agents Panel
---

Custom Agent Selection & Discoverylink

Antigravity CLI supports loading custom agent definitions with specialized system instructions and tool permissions. The Available Agents section lists all agents currently available to your session.

1. Switching between agentslink

  • Select: Use ↑/↓ to highlight an agent (Default agent or a custom agent) under Available Agents, then press Enter.
  • Status Indicator: A green circle (●) indicates the active or prepared agent.
  • Apply & Exit: Press Esc to close the panel and apply your selection.
> Note: If you are currently inside an active conversation, switching custom agents automatically forks your current session ([ Switch will fork the current conversation on exit ]) so you do not lose context. If you start from a fresh session, the switch applies directly ([ Switch will create a new conversation on exit ]).

2. Creating custom agentslink

The header of the /agents panel displays exact template locations for creating new custom agents:
text
Create New Agents
  Workspace: {workspace}/.agents/agents/{agent_name}/agent.md
  Global: ~/.gemini/config/agents/{agent_name}/agent.md
To create a custom agent that is available across all your workspaces and projects, place it under your global customization directory (~/.gemini/config/agents/). Create a directory matching your agent name and add an agent.md file with YAML frontmatter:
bash
mkdir -p ~/.gemini/config/agents/code-reviewer
cat << 'EOF' > ~/.gemini/config/agents/code-reviewer/agent.md
---
name: code-reviewer
description: Rigorous code review specialist focusing on edge cases and security.
---
You are an expert code reviewer. Analyze diffs carefully and verify edge cases.
EOF
When you reopen /agents, the CLI automatically discovers code-reviewer and lists it under Available Agents. If you need an agent scoped strictly to a single project repository, place it inside that workspace's .agents/agents/ directory (for example, /home/user/projects/my-app/.agents/agents/code-reviewer/agent.md). You can also package and distribute custom agents inside Plugins.
---

Subagent Monitoring & Controllink

When your primary agent delegates tasks (such as running tests or querying large codebases), the spawned threads appear in the /agents panel under Subagents, grouped by their triggering prompt.

1. Inspecting subagent progresslink

  • Group Toggling: Press Enter on a subagent group header (▸ Subagents (1 running, 2 done)) to expand or collapse (▾) that group.
  • Status Indicators: Each subagent row displays a live lifecycle state:
  • running: Actively executing tools or generating reasoning steps.
  • done: Successfully completed its assigned background task.
  • error: Encountered a terminal failure during execution.
  • killed: Terminated manually by the user or parent process.
  • Detail View: Highlight a specific subagent row and press Enter to open the full-screen Subagent Detail View. This view displays the subagent's complete internal thoughts, tool calls, and execution stdout. Press Esc to return to the list.

2. Terminating active subagentslink

If a background subagent loops or runs longer than needed, you can kill it immediately without leaving your session:
  1. Open /agents and highlight the running subagent row.
  2. Press k to kill the active subagent and all its child threads.

3. Inline tool approvalslink

If a subagent attempts a protected operation (such as modifying a file or running a shell command in a sandboxed environment), the authorization prompt displays inline in the /agents panel. You can press a to approve or d to deny directly from the list.
---

Panel Keybindings Referencelink

When focused inside the /agents panel, the following keyboard shortcuts apply:
KeyActionBehavior
↑ / ↓NavigateMove the cursor between headers, subagents, and available agents.
EnterSelect / ToggleExpand/collapse groups, open Subagent Detail View, or select a custom agent.
kKill Active SubagentInstantly cancel (CancelSubagent) the highlighted running subagent.
EscGo BackExit the panel, return to the prompt box, and apply any prepared agent switch.
---

Common mistakeslink

MistakeWhy it failsFix
Expecting custom agent switches to modify the existing turn historySwitching agents inside an active thread forks the conversation to preserve historical integrityContinue your workflow in the newly forked session with the new agent's capabilities
Putting custom agent markdown files directly inside ~/.gemini/config/agents/ or .agents/The CLI scanner expects agents to live inside dedicated subdirectories under ~/.gemini/config/agents/<name>/ or .agents/agents/<name>/Move your agent definition to ~/.gemini/config/agents/<name>/agent.md
Using k on completed subagentsKeyKillSubagent only targets active (running) subagent processesUse Enter to inspect completed or failed subagent logs instead
---

Next stepslink

  • Background tasks & subagents: Learn more about the multi-threaded asynchronous execution architecture.
  • Plugins & Skills: Discover how to bundle custom agents, skills, and MCP configs into shareable plugins.
  • Permissions & Sandbox: Configure security guardrails and approval rules for background subagents.
Terminal Title Customization
Code Search Command (/codesearch)
On this Page
Agents Command (/agents)Before you beginOverviewCustom Agent Selection & DiscoverySubagent Monitoring & ControlPanel Keybindings ReferenceCommon mistakesNext steps