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
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
- Run the
/agentscommand in interactive mode - Select “Create new agent”
- Select where you want the agent configuration to be stored: the project (
.augment/agents/) or your user directory (~/.augment/agents/) - 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, andweb-fetch. Settingtoolsalso removes all other tools, such ascodebase-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.
- If both are specified, a tool must be in
toolsand not indisabled_tools. - If neither is specified, the subagent has access to all tools the main agent has.
- To keep
codebase-retrievalor other non-built-in tools, usedisabled_toolsinstead oftools.
- 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
read- Read filesgrep- Search file contentsfind- Find files by globcodebase-retrieval- Search the codebaseedit- Edit existing fileswrite- Create new filesbash- Run shell commandsgithub-api- Interact with GitHubweb-fetch- Fetch web contentweb-search- Search the web
Supported models
Subagents can use any model available in Auggie. To see a list of available models, run the following command: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.