Skip to main content

About subagents

Subagents are custom agents that you can configure for specialized tasks, like code review or project bootstrapping. Each subagent has its own tools and capabilities that you can delegate specific tasks to. You can have local subagents or share them with your team by adding their configuration to your repository.
  • Subagents have their own context window independent from the main agent
  • Subagents have a custom prompt that is used to instruct the agent
  • Subagents run in parallel with other subagents
  • Subagents will show a summary of their current progress in the main thread
Auggie includes three built-in agents: general-purpose, explore, and plan. A custom agent with the same name overrides the built-in one.

Create a subagent

You can create a new subagent through the wizard by running /agents command in interactive mode. Or you can create the configuration file manually.

Create a subagent with the wizard

  1. Run the /agents command in interactive mode
  2. Select “Create new agent”
  3. Select where you want the agent configuration to be stored: the project (.augment/agents/) or your user directory (~/.augment/agents/)
  4. Choose a creation method:
    • Generate with Auggie: Describe what the agent should do and give it a name. Auggie writes the configuration for you.
    • Manual configuration: Enter the name, description, tools, model, thinking level, and prompt yourself.
/agents also lists running agents and available agent types.

Create a subagent manually

You can create a subagent manually by creating a configuration file. The configuration file should be a markdown file stored in either ~/.augment/agents/ (user only) or ./.augment/agents/ (shared). See the Subagent configuration reference for more details. Example subagent configuration:

Running your subagent

Once you’ve configured the subagent, you can trigger it by sending a message that references the agent name. Augment will also automatically detect when a task is appropriate for a subagent and offer to use it.

Subagent configuration reference

File locations

Subagents are configured in markdown files with YAML frontmatter. Subagents can be configured at the user level or the workspace level. User-level subagents are available in all workspaces, while workspace-level subagents are only available in the current workspace. Workspace agents override user agents with the same name.

Frontmatter configuration

Tool restrictions

You can control which tools a subagent has access to using either an allowlist or a denylist:
  • tools (allowlist): Only the listed built-in tools will be available: read, bash, edit, write, grep, find, ls, and web-fetch. Setting tools also removes all other tools, such as codebase-retrieval, web-search, integrations, and MCP tools.
  • disabled_tools (denylist): All tools except the listed ones will be available. This works for any tool, including MCP and integration tools.
Important notes:
  • If both are specified, a tool must be in tools and not in disabled_tools.
  • If neither is specified, the subagent has access to all tools the main agent has.
  • To keep codebase-retrieval or other non-built-in tools, use disabled_tools instead of tools.
Tool restrictions are useful for:
  • Security: Preventing a subagent from modifying files or running commands
  • Focus: Giving a subagent only the tools it needs for its specific task
  • Safety: Preventing subagents from performing destructive operations
Common tool names:
  • read - Read files
  • grep - Search file contents
  • find - Find files by glob
  • codebase-retrieval - Search the codebase
  • edit - Edit existing files
  • write - Create new files
  • bash - Run shell commands
  • github-api - Interact with GitHub
  • web-fetch - Fetch web content
  • web-search - Search the web
Example with YAML list format:
Example with comma-separated format:

Supported models

Subagents can use any model available in Auggie. To see a list of available models, run the following command:
Use a model name or part of one, such as sonnet or opus. Auggie picks the closest matching model.
Model availability may vary depending on your Augment subscription and organization settings.

Agent prompt

The agent prompt is the main body of the markdown file. The prompt is used to instruct the agent on its role and capabilities. The prompt can include any information that you want to be available to the agent, including specific tools or instructions. The prompt is rendered as markdown and supports code blocks, lists, and other formatting.

Best practices for subagents

  • Subagents are most effective when they have a specific and focused task. It is better to create multiple subagents for different tasks rather than trying to create a single agent for multi-step, long-running, or complex tasks.
  • Subagents should have a detailed prompt. The prompt should clearly define the agent’s role, capabilities, and expected behavior. Include specific instructions, task lists, examples, and expected output. Take advantage of markdown formatting to make the prompt as clear as possible.
  • Share your subagents with your team. Subagents are a great way to share custom workflows with your team. Store your subagents in your projects ./.augment/agents/ directory to make them available to everyone.

Example subagents

Code review agent

Read-only code reviewer (with tool restrictions)

This example shows how to create a code review agent that can examine code but cannot make modifications:

Test generation agent

API designer agent