This document covers Amp, a multi-LLM AI coding agent built by Sourcegraph. Amp is an IDE-integrated assistant available in VSCode that features dual LLM configurations (GPT-5 and Claude 4 Sonnet), an Oracle advisor powered by OpenAI's o3 reasoning model, a sub-agent delegation system, and the AGENTS.md convention for project-specific context. For other IDE-integrated assistants, see VSCode Agent, Windsurf Cascade, and Claude Code.
Amp provides two distinct system prompt configurations optimized for different language models. Users can switch between configurations via VSCode settings to access model-specific optimizations.
| Configuration | File | Model Target | Key Optimizations |
|---|---|---|---|
| GPT-5 | Amp/gpt-5.yaml1-1920 | gpt-5 | Minimal reasoning emphasis, strict concision rules |
| Claude 4 Sonnet | Amp/claude-4-sonnet.yaml1-1920 | Claude 4 Sonnet | 4-line response limit, detailed communication guidelines |
To enable the GPT-5 configuration, users must set VSCode user settings:
Both configurations define Amp as "a powerful AI coding agent built by Sourcegraph" Amp/gpt-5.yaml10-12 Amp/claude-4-sonnet.yaml5-7 The system operates under three agency principles:
Sources: Amp/gpt-5.yaml10-29 Amp/claude-4-sonnet.yaml1-33 Amp/README.md13-20
Amp receives detailed environment information including working directory, workspace root, operating system details, repository URL, and Amp thread URL Amp/gpt-5.yaml516-610 Amp/claude-4-sonnet.yaml755-852 A cached directory listing provides immediate workspace structure awareness without additional tool calls.
Sources: Amp/gpt-5.yaml516-610 Amp/claude-4-sonnet.yaml755-852
The Oracle is a senior engineering advisor tool powered by OpenAI's o3 reasoning model. It provides expert guidance for planning, code reviews, debugging, and architectural decisions.
The Oracle operates with a restricted tool subset focused on read-only analysis:
| Tool | Purpose |
|---|---|
list_directory | Directory exploration |
Read | File content reading |
Grep | Exact pattern searching |
glob | File pattern matching |
web_search | External information retrieval |
read_web_page | Web documentation access |
The GPT-5 configuration provides explicit decision logic Amp/gpt-5.yaml223-232:
Specific use cases include:
Sources: Amp/gpt-5.yaml223-270 Amp/claude-4-sonnet.yaml211-297
The system instructs users to be explicit when invoking Oracle Amp/claude-4-sonnet.yaml223-226:
Sources: Amp/gpt-5.yaml254-269 Amp/claude-4-sonnet.yaml223-226
Amp implements a three-tier sub-agent system for delegating specialized work. Each sub-agent has distinct responsibilities and tool access patterns.
| Sub-agent | Purpose | When to Use | Tool Access |
|---|---|---|---|
| Task Tool | Fire-and-forget executor | Feature scaffolding, cross-layer refactors, mass migrations, boilerplate generation | Full tool suite |
| Oracle | Senior engineering advisor | Reviews, architecture, deep debugging, planning | list_directory, Read, Grep, glob, web_search, read_web_page |
| Codebase Search Agent | Smart code explorer | Mapping features, tracking capabilities, finding side-effects | list_directory, Grep, glob, Read |
The Task Tool is described as "a productive junior engineer who can't ask follow-ups once started" Amp/gpt-5.yaml237-240 Prompting requirements include:
Don't use Task Tool for: Exploratory work, architectural decisions, debugging analysis Amp/gpt-5.yaml245-246
The Codebase Search Agent locates logic based on conceptual descriptions across languages and layers Amp/gpt-5.yaml274-276 Prompting guidelines:
Don't use Codebase Search Agent for: Code changes, design advice, simple exact text searches Amp/gpt-5.yaml281-282
Sources: Amp/gpt-5.yaml220-298 Amp/claude-4-sonnet.yaml41-47
Amp defaults to parallel execution for independent sub-agents Amp/gpt-5.yaml75-94:
Example of good parallelization: Oracle(plan-API), codebase_search_agent("validation flow"), codebase_search_agent("timeout handling"), Task(add-UI), Task(add-logs) — all disjoint paths Amp/gpt-5.yaml111-113
Sources: Amp/gpt-5.yaml72-121 Amp/claude-4-sonnet.yaml60-62
Amp provides todo_write and todo_read tools for task tracking and planning. The system emphasizes frequent use to prevent forgetting important tasks.
Both configurations mandate frequent todo tool usage:
The standard workflow follows this pattern Amp/gpt-5.yaml180-218:
todo_write to create task listin_progresscompletedFor complex tasks requiring deep analysis, the recommended workflow is:
todo_write to break down plan into stepsSources: Amp/gpt-5.yaml160-218 Amp/claude-4-sonnet.yaml301-399
After completing tasks, Amp must run get_diagnostics and lint/typecheck commands Amp/claude-4-sonnet.yaml50-57 If commands are unknown, the system should:
Sources: Amp/claude-4-sonnet.yaml50-57 Amp/gpt-5.yaml133-136
The AGENTS.md file (or legacy AGENT.md variant) serves as automatically-loaded project context that documents common commands, code style preferences, and project structure.
Both configurations automatically add AGENTS.md to the assistant's context Amp/gpt-5.yaml300-313 Amp/claude-4-sonnet.yaml457-471 The file provides:
AGENTS.md is treated as "ground truth" for commands, style, and structure Amp/gpt-5.yaml416-417 Amp/claude-4-sonnet.yaml457-467 When Amp discovers recurring commands or conventions not documented in AGENTS.md, it should ask the user whether to append them for future runs Amp/gpt-5.yaml312-313
The verification gate workflow explicitly references AGENTS.md for command discovery Amp/gpt-5.yaml336-338:
"Use commands from
AGENTS.mdor neighbors; if unknown, search the repo."
If commands cannot be found, Amp suggests writing them to AGENTS.md for future use Amp/claude-4-sonnet.yaml54-56
Sources: Amp/gpt-5.yaml300-420 Amp/claude-4-sonnet.yaml457-471
Amp enforces strict guardrails to maintain code quality and prevent over-engineering. These rules apply before any action is taken.
The GPT-5 configuration lists four primary guardrails under "Read this before doing anything" Amp/gpt-5.yaml31-44:
| Guardrail | Description | Example |
|---|---|---|
| Simple-first | Prefer smallest, local fix over cross-file "architecture change" | Add guard clause instead of refactoring error handling system |
| Reuse-first | Search for existing patterns; mirror naming, error handling, I/O, typing, tests | Use existing UserRepository pattern when adding OrderRepository |
| No surprise edits | If changes affect >3 files or multiple subsystems, show short plan first | Multi-file refactor requires plan before execution |
| No new deps | No new dependencies without explicit user approval | Must ask before adding new npm package |
The quality standards emphasize consistency and minimalism Amp/gpt-5.yaml316-329:
as any or linter suppression unless explicitly requestedMandatory verification follows a strict order Amp/gpt-5.yaml332-343:
Typecheck → Lint → Tests → Build
For each gate:
Sources: Amp/gpt-5.yaml31-343 Amp/claude-4-sonnet.yaml403-452
Additional guidelines prevent unnecessary complexity Amp/gpt-5.yaml405-411:
The Claude configuration adds security-focused rules Amp/claude-4-sonnet.yaml410-452:
[REDACTED:amp-token] carefully - don't overwrite with marker& operatorSources: Amp/gpt-5.yaml405-411 Amp/claude-4-sonnet.yaml403-452
Refresh this wiki