Agentic AI Atlasby a5c.ai
OverviewWikiGraphFor AgentsEdgesSearchWorkspace
/
GitHubDocsDiscord
iiRecord
Agentic AI Atlas · Amp
page:docs-agent-mux-reference-agents-ampa5c.ai
Search record views/
Record · tabs

Available views

II.Record viewspp. 1 - 1
overviewarticlejsongraph
II.
Page JSON

page:docs-agent-mux-reference-agents-amp

Structured · live

Amp json

Inspect the normalized record payload exactly as the atlas UI reads it.

File · wiki/docs/agent-mux/reference/agents/amp.mdCluster · wiki
Record JSON
{
  "id": "page:docs-agent-mux-reference-agents-amp",
  "_kind": "Page",
  "_file": "wiki/docs/agent-mux/reference/agents/amp.md",
  "_cluster": "wiki",
  "attributes": {
    "nodeKind": "Page",
    "sourcePath": "docs/agent-mux/reference/agents/amp.md",
    "sourceKind": "repo-docs",
    "title": "Amp",
    "displayName": "Amp",
    "slug": "docs/agent-mux/reference/agents/amp",
    "articlePath": "wiki/docs/agent-mux/reference/agents/amp.md",
    "article": "\n# Amp\n\nSourcegraph's agentic coding assistant with multi-model support and specialized subagents for advanced code understanding.\n\n## Overview\n\n[Sourcegraph Amp](https://sourcegraph.com/amp) is an intelligent coding agent that combines multiple AI models with specialized subagents to deliver superior code understanding and generation. Features include the Oracle multi-model routing system, Librarian code search capabilities, and deep integration with Sourcegraph's code intelligence platform.\n\n## Installation\n\n### NPM (Recommended)\n```bash\nnpm install -g @sourcegraph/amp-cli\n```\n\n### curl (Universal)\n```bash\ncurl -fsSL https://get.sourcegraph.com/amp | bash\n```\n\n### Binary Download\nDownload from [GitHub Releases](https://github.com/sourcegraph/amp/releases) for your platform.\n\n## Authentication\n\n### Sourcegraph Account Setup\n1. Sign up at [sourcegraph.com/sign-up](https://sourcegraph.com/sign-up)\n2. Install Amp CLI (see Installation above)\n3. Generate an access token:\n   ```bash\n   open https://sourcegraph.com/users/settings/tokens\n   ```\n4. Authenticate with Sourcegraph:\n   ```bash\n   amp auth login\n   ```\n5. Verify authentication:\n   ```bash\n   amp --version\n   ```\n\n### Environment Variables\n```bash\nexport SOURCEGRAPH_ACCESS_TOKEN=your_sourcegraph_token\n```\n\n## Usage with agent-mux\n\n### Basic Chat\n```bash\namux run amp --prompt \"Explain this codebase architecture\"\n```\n\n### Resume Session\n```bash\namux run amp --session-id def456 --prompt \"Continue the code review\"\n```\n\n### Model Selection\n```bash\n# Oracle multi-model routing (default)\namux run amp --model oracle --prompt \"Optimize this algorithm\"\n\n# Specific model selection\namux run amp --model claude-sonnet --prompt \"Review for security vulnerabilities\"\namux run amp --model gpt-4o --prompt \"Generate comprehensive tests\"\namux run amp --model gemini-pro --prompt \"Refactor for better maintainability\"\n```\n\n### Auto-approve Tools (Yolo Mode)\n```bash\namux run amp --tool-approval-mode yolo --prompt \"Fix all ESLint warnings\"\n```\n\n### Working Directory\n```bash\namux run amp --cwd /path/to/project --prompt \"Analyze code complexity\"\n```\n\n## Supported Models\n\n| Model ID | Alias | Context Window | Output Tokens | Input Price | Output Price |\n|----------|-------|----------------|---------------|-------------|--------------|\n| `amp-oracle` | `oracle` | 200,000 | 8,192 | Dynamic | Dynamic |\n| `claude-3-5-sonnet-20241022` | `claude-sonnet` | 200,000 | 8,192 | $3.00/1M | $15.00/1M |\n| `gpt-4o` | `gpt-4o` | 128,000 | 4,096 | $5.00/1M | $15.00/1M |\n| `gemini-1.5-pro` | `gemini-pro` | 2,000,000 | 8,192 | $1.25/1M | $5.00/1M |\n\nDefault model: `amp-oracle` (multi-model routing)\n\n## Capabilities\n\n- **Oracle Multi-Model Routing** - Automatically selects the best model for each task\n- **Specialized Subagents** - Librarian for code search, Oracle for complex reasoning\n- **Multi-turn conversations** with session persistence\n- **Tool calling** with parallel execution (up to 8 concurrent)\n- **Code understanding** with Sourcegraph's code intelligence\n- **File operations** with comprehensive project analysis\n- **Interactive approval** or auto-approve (yolo) modes\n- **MCP plugin support** for extensibility\n- **VS Code integration** for enhanced development workflow\n\n## Subagents\n\n### Oracle\nMulti-model routing system that automatically selects the best AI model for each task:\n```bash\namux run amp --model oracle --prompt \"Complex architectural decision\"\n```\n\n### Librarian\nCode search and analysis specialist powered by Sourcegraph's code graph:\n```bash\namux run amp --prompt \"Find all implementations of the authentication interface\"\n```\n\n## Sessions\n\nAmp sessions are stored in:\n```\n~/.config/amp/sessions/\n```\n\n### Session Management\n```bash\n# List sessions\namux sessions amp\n\n# Read session\namux sessions amp read <session-id>\n\n# Resume session\namux run amp --session-id <session-id>\n\n# Fork session\namux sessions amp fork <session-id> --name \"experimental-branch\"\n```\n\n## MCP Plugins\n\nAmp supports MCP (Model Context Protocol) servers for enhanced functionality:\n\n```bash\n# List available plugins\namux plugins list amp\n\n# Install MCP server\namux plugins install amp <mcp-server>\n\n# List installed plugins\namux plugins list amp --installed\n```\n\n## Configuration\n\nAmp configuration is stored in:\n```\n~/.config/amp/config.json\n```\n\n### Project-specific Configuration\nCreate `.amp/config.json` in your project root:\n```json\n{\n  \"defaultModel\": \"oracle\",\n  \"autoApprove\": false,\n  \"maxParallelTasks\": 6,\n  \"subagentPreferences\": {\n    \"enableOracle\": true,\n    \"enableLibrarian\": true\n  },\n  \"sourcegraphEndpoint\": \"https://sourcegraph.company.com\"\n}\n```\n\n## Advanced Features\n\n### Multi-Model Routing\nThe Oracle system automatically routes queries to the most appropriate model:\n```bash\n# Let Oracle decide the best model for your task\namux run amp --model oracle --prompt \"\n1. Analyze performance bottlenecks\n2. Suggest optimization strategies  \n3. Implement the most impactful fix\n\"\n```\n\n### Code Intelligence Integration\nLeverage Sourcegraph's code graph for deep understanding:\n```bash\namux run amp --prompt \"\nFind all callers of the deprecated API endpoint\nand suggest migration strategies for each usage\n\"\n```\n\n### Parallel Subagent Execution\nAmp can run multiple specialized agents simultaneously:\n```bash\namux run amp --prompt \"\nSimultaneously:\n- Search for security vulnerabilities (Librarian)\n- Optimize performance (Oracle routing)\n- Generate comprehensive tests\n\"\n```\n\n### Custom Sourcegraph Instance\nFor enterprise users with private Sourcegraph instances:\n```bash\n# Configure in .amp/config.json\n{\n  \"sourcegraphEndpoint\": \"https://sourcegraph.company.com\",\n  \"defaultModel\": \"oracle\"\n}\n```\n\n## Error Handling\n\nCommon error codes and solutions:\n\n| Error Code | Description | Solution |\n|------------|-------------|----------|\n| `SOURCEGRAPH_AUTH_FAILED` | Authentication required | Run `amp auth login` |\n| `INVALID_ACCESS_TOKEN` | Token expired/invalid | Generate new token at sourcegraph.com |\n| `MODEL_NOT_AVAILABLE` | Model not accessible | Check subscription and model permissions |\n| `SUBAGENT_TIMEOUT` | Subagent execution timeout | Increase timeout or simplify query |\n\n## Troubleshooting\n\n### Authentication Issues\n```bash\n# Check authentication status\namp auth status\n\n# Re-authenticate\namp auth logout\namp auth login\n```\n\n### Model Access Issues\n```bash\n# Check available models\namp models list\n\n# Test specific model\namp chat --model claude-sonnet --prompt \"test\"\n```\n\n### Subagent Issues\n```bash\n# Check subagent status\namp subagents status\n\n# Reset subagent cache\namp subagents reset\n```\n\n### Session Issues\n```bash\n# Verify session directory\nls ~/.config/amp/sessions/\n\n# Check session file integrity\namux sessions amp read <session-id> --validate\n```\n\n## Best Practices\n\n1. **Use Oracle routing** for complex, multi-step tasks:\n   ```bash\n   amux run amp --model oracle --prompt \"Full-stack feature implementation\"\n   ```\n\n2. **Leverage Librarian** for code discovery:\n   ```bash\n   amux run amp --prompt \"Find all error handling patterns in the codebase\"\n   ```\n\n3. **Configure project-specific settings** in `.amp/config.json`\n\n4. **Use auto-approve carefully** - only in trusted environments:\n   ```bash\n   amux run amp --tool-approval-mode yolo --prompt \"Format and lint all files\"\n   ```\n\n5. **Monitor costs** with cost tracking:\n   ```bash\n   amux run amp --prompt \"Complex refactoring task\" | amux cost\n   ```\n\n6. **Combine models strategically**:\n   - `oracle`: Complex reasoning and multi-step tasks\n   - `claude-sonnet`: Code review and documentation\n   - `gpt-4o`: General coding and API integration\n   - `gemini-pro`: Large file analysis and pattern recognition\n\n## VS Code Integration\n\nAmp integrates seamlessly with VS Code:\n\n1. Install the Sourcegraph VS Code extension\n2. Configure Amp in your workspace settings\n3. Use Amp directly from VS Code command palette\n\n## Links\n\n- [Sourcegraph Website](https://sourcegraph.com)\n- [Amp Documentation](https://docs.sourcegraph.com/amp)\n- [Sourcegraph Blog](https://sourcegraph.com/blog)\n- [Oracle Model Routing](https://sourcegraph.com/blog/oracle-routing)\n- [Code Intelligence Platform](https://sourcegraph.com/code-intelligence)\n",
    "documents": []
  },
  "outgoingEdges": [],
  "incomingEdges": [
    {
      "from": "page:docs-agent-mux-reference",
      "to": "page:docs-agent-mux-reference-agents-amp",
      "kind": "contains_page"
    }
  ]
}

Shortcuts

Back to overview
Open graph tab