Agents¶
Agents are specialized configurations that can be invoked as sub-sessions for focused tasks. Each agent has its own tools, system instructions, and capabilities.
Built-in Agents¶
| Agent | Purpose | Best For |
|---|---|---|
explorer | Breadth-first codebase exploration | Understanding new codebases |
bug-hunter | Systematic debugging | Finding and fixing bugs |
zen-architect | System design with simplicity | Architecture decisions |
researcher | Research and synthesis | Gathering information |
modular-builder | Code implementation | Writing new code |
Using Agents¶
In Interactive Mode¶
Use the @ prefix to invoke an agent:
amplifier
amplifier> @explorer What is the architecture of this project?
amplifier> @bug-hunter Find issues in the authentication module
amplifier> @zen-architect Design a caching system
List Available Agents¶
Show Agent Details¶
How Agents Work¶
When you invoke an agent:
- A sub-session is created with the agent's configuration
- The agent inherits base settings from your current session
- Agent-specific tools and instructions are applied
- The agent executes your request
- Results return to your main session
Main Session
│
├── @explorer "Analyze codebase"
│ └── Sub-session with explorer config
│ └── Returns analysis
│
└── Continue main conversation
Agent Descriptions¶
explorer¶
Purpose: Breadth-first exploration of codebases with citations.
Capabilities:
- Scans directory structures
- Reads and summarizes files
- Identifies patterns and architecture
- Provides cited references
Best for:
- Understanding new projects
- Finding specific functionality
- Architecture overview
Example:
bug-hunter¶
Purpose: Systematic debugging and issue identification.
Capabilities:
- Analyzes error messages
- Traces code paths
- Identifies root causes
- Suggests fixes
Best for:
- Debugging errors
- Finding edge cases
- Security analysis
Example:
zen-architect¶
Purpose: System design with ruthless simplicity.
Capabilities:
- Evaluates design trade-offs
- Proposes minimal solutions
- Questions complexity
- Creates architecture diagrams
Best for:
- New feature design
- Refactoring decisions
- Architecture review
Example:
researcher¶
Purpose: Research and information synthesis.
Capabilities:
- Web search
- Document analysis
- Information synthesis
- Source citation
Best for:
- Gathering information
- Comparing options
- Documentation research
Example:
modular-builder¶
Purpose: Focused code implementation.
Capabilities:
- Writes clean code
- Follows existing patterns
- Creates tests
- Documents code
Best for:
- Implementing features
- Writing utilities
- Creating tests
Example:
Creating Custom Agents¶
Define agents in your profile or a separate agent file.
In a Profile¶
---
name: my-profile
extends: dev
agents:
my-agent:
description: My specialized agent
tools:
- tool-filesystem
- tool-bash
system:
instruction: |
You are a specialist in database optimization.
Always explain your reasoning.
---
Standalone Agent File¶
Create .amplifier/agents/my-agent.md:
---
name: my-agent
description: Database optimization specialist
tools:
- tool-filesystem
- tool-bash
- tool-search
providers:
- module: provider-anthropic
config:
default_model: claude-opus-4-1
---
# Database Optimization Specialist
You are an expert in database performance optimization.
## Your Approach
1. Analyze the current schema and queries
2. Identify performance bottlenecks
3. Suggest specific improvements
4. Explain trade-offs
## Guidelines
- Always explain your reasoning
- Consider read vs write patterns
- Account for data growth
Agent Schema¶
---
name: agent-name
description: What this agent does
# Optional - specific tools for this agent
tools:
- tool-filesystem
- tool-bash
# Optional - specific provider/model
providers:
- module: provider-anthropic
config:
default_model: claude-opus-4-1
temperature: 0.3
# Optional - override hooks
hooks:
- module: hooks-logging
# System instruction
system:
instruction: |
Detailed instructions for the agent...
---
# Markdown content becomes additional system instructions
Agent Inheritance¶
Agents inherit from the parent session:
| Setting | Behavior |
|---|---|
| Provider | Inherited (can override) |
| Tools | Replaced if specified |
| Hooks | Inherited (can add) |
| Context | Fresh (isolated) |
Overriding Provider¶
agents:
deep-thinker:
providers:
- module: provider-anthropic
config:
default_model: claude-opus-4-1
Limiting Tools¶
Agent Search Path¶
Agents are loaded from (in order):
- Current profile's
agentssection .amplifier/agents/(project)~/.amplifier/agents/(user)- Installed collections
- Bundled agents
Multi-Turn Agent Sessions¶
Agents can maintain context across multiple invocations:
amplifier> @explorer Analyze the API layer
[Agent analyzes...]
amplifier> @explorer Now focus on the authentication endpoints
[Agent continues with context from previous analysis]
Agent Best Practices¶
- Focused purpose: Each agent should do one thing well
- Clear instructions: Be specific about behavior and approach
- Appropriate tools: Only include tools the agent needs
- Test thoroughly: Try various prompts to ensure consistent behavior
Troubleshooting¶
Agent Not Found¶
# Check agent exists
amplifier agents list
# Check agent locations
ls ~/.amplifier/agents/
ls .amplifier/agents/
Agent Behavior Issues¶
# Show agent configuration
amplifier agents show my-agent
# Check profile includes agent
amplifier profile show --resolved
See Also¶
- Profiles - Profile configuration
- CLI Reference - Agent commands
- → Agent Authoring Guide - Complete reference