This page documents Amp's core system architecture, identity, and LLM configuration mechanisms. It covers the multi-model support system, VSCode configuration settings, and system prompt retrieval methods. For detailed information about specific sub-systems, see Oracle AI Advisor Architecture, Sub-agent Delegation and Task Tool, Codebase Search Agent, and Tool Suite and Capabilities.
Amp is a powerful AI coding agent built by Sourcegraph that assists users with software engineering tasks including adding functionality, solving bugs, refactoring code, and explaining code. The system operates with a defined agency model that balances initiative with restraint.
Amp follows three primary behavioral mandates defined in its system prompt:
End-to-End Task Completion: "Do the task end to end. Don't hand back half-baked work. FULLY resolve the user's request and objective." The system continues working through problems until reaching complete solutions rather than stopping at partial answers.
Initiative-Restraint Balance: When users request plans, Amp provides plans without immediately editing files. When users request implementation, Amp takes action. "If the user asks for a plan, give a plan; don't edit files."
Concise Communication: "Do not add explanations unless asked. After edits, stop." The system minimizes verbose output and avoids unnecessary preamble or postamble.
Sources: Amp/gpt-5.yaml10-32 Amp/claude-4-sonnet.yaml5-33
Amp implements a configurable LLM backend system that supports multiple language models with model-specific system prompts optimized for each provider's capabilities.
Model Selection and System Prompt Routing
Sources: Amp/README.md12-20 Amp/gpt-5.yaml1-13 Amp/claude-4-sonnet.yaml1-10
Each model receives a tailored system prompt optimized for its specific capabilities:
| Model | System Prompt File | Key Optimizations |
|---|---|---|
| Claude 4 Sonnet | claude-4-sonnet.yaml | Default configuration; optimized for tool use patterns and concise communication |
| GPT-5 | gpt-5.yaml | Includes reasoning minimization directives: "MINIMIZE REASONING: Avoid verbose reasoning blocks" |
The GPT-5 prompt includes specific instructions not present in the Sonnet prompt: "Before any significant tool call, state a brief summary in 1-2 sentences maximum. Keep all reasoning, planning, and explanatory text to an absolute minimum."
Sources: Amp/gpt-5.yaml63-69 Amp/claude-4-sonnet.yaml1-753
Amp configuration is managed through VSCode user settings with two primary configuration keys:
VSCode Configuration to System Behavior Mapping
Configuration example:
amp.url: Specifies the Amp service endpoint URL (default: "https://ampcode.com/")amp.gpt5: Boolean flag enabling GPT-5 model usage (default: false, uses Claude 4 Sonnet)Sources: Amp/README.md13-20
Amp exposes its active system prompt through a Thread YAML view accessible via keyboard shortcut interaction:
System Prompt Retrieval Flow
Retrieval Steps:
system keySources: Amp/README.md1-10 Amp/view-thread-yaml.png1
Both model-specific system prompts follow a common architectural structure organized into major sections:
System Prompt Section Hierarchy
Sources: Amp/gpt-5.yaml14-542 Amp/claude-4-sonnet.yaml10-753
The system prompt establishes Amp's identity and operational mandate in the opening section. For GPT-5, this includes: "You are Amp, a powerful AI coding agent built by Sourcegraph. You help the user with software engineering tasks."
Key directives:
Sources: Amp/gpt-5.yaml10-32 Amp/claude-4-sonnet.yaml5-33
Establishes four core constraints:
Sources: Amp/gpt-5.yaml31-44
Defines discovery methodology:
Sources: Amp/gpt-5.yaml46-61
Mandates default parallel execution for independent work: "Default to parallel for all independent work: reads, searches, diagnostics, writes and subagents."
Parallelization applies to:
codebase_search_agent tool calls for different conceptsoracle tool for distinct concernsTask tool executors with disjoint write targetsSerialization required when:
Sources: Amp/gpt-5.yaml72-122
Both prompts reference an automatic context injection system: "This file (plus the legacy AGENT.md variant) is always added to the assistant's context."
The AGENTS.md file documents:
Sources: Amp/gpt-5.yaml300-314 Amp/claude-4-sonnet.yaml456-470
The system prompt includes dynamic environment context populated at runtime:
Runtime Environment Data Injection
Example environment block structure:
Today's date: "Mon Sep 15 2025"Working directory: Full absolute pathWorkspace root folder: Project root pathOperating system: "windows (Microsoft Windows 11 Pro 10.0.26100 N/A Build 26100) on x64"Repository: GitHub repository URLAmp Thread URL: Direct link to current threadDirectory listing: Cached tree structure of workspaceSources: Amp/gpt-5.yaml514-612 Amp/claude-4-sonnet.yaml755-851
The system prompt includes complete tool definitions in a structured schema format. Each tool is defined with:
type: functionname: Tool identifier used in function callsdescription: Usage instructions and guidelinesparameters: JSON schema defining input structureAmp Tool Ecosystem Organization
Sources: Amp/gpt-5.yaml625-1462 Amp/claude-4-sonnet.yaml867-2462
The system prompt establishes strict rules for tool usage:
Sources: Amp/gpt-5.yaml140-158 Amp/claude-4-sonnet.yaml872-983
Amp includes dedicated task management tools with specific usage mandates:
Tool Purpose: "You plan with a todo list. Track your progress and steps and render them to the user."
Usage Frequency: "Use these tools frequently to ensure that you are tracking your tasks and giving the user visibility into your progress."
Completion Discipline: "MARK todos as completed as soon as you are done with a task. Do not batch up multiple tasks before marking them as completed."
Sources: Amp/gpt-5.yaml160-218 Amp/claude-4-sonnet.yaml301-399
The system prompt enforces strict markdown conventions:
| Rule | Requirement |
|---|---|
| Bullets | Use hyphens - only |
| Numbered lists | Only for procedural steps |
| Headings | #, ##, ###; don't skip levels |
| Code fences | Always add language tag; no indentation |
| Inline code | Wrap in backticks; escape as needed |
| Links | Every file name must be file:// link |
| Style | No emojis, minimal exclamation points |
Sources: Amp/gpt-5.yaml354-376
Amp mandates specific file reference formatting using the file:// URI scheme:
file:///absolute/path/to/file.ext
file:///absolute/path/to/file.ext#L32
file:///absolute/path/to/file.ext#L32-L42
Special character handling: "Always URL-encode special characters in file paths (spaces become %20, parentheses become %28 and %29, etc.)."
Example: file:///Users/alice/My%20Project%20%28v2%29/test%20file.js
Sources: Amp/gpt-5.yaml372-399 Amp/claude-4-sonnet.yaml554-641
Both prompts enforce brevity with specific token minimization goals:
GPT-5 Specific: "MINIMIZE REASONING: Avoid verbose reasoning blocks throughout the entire session. Think efficiently and act quickly."
Claude 4 Sonnet Specific: "IMPORTANT: Keep your responses short. You MUST answer concisely with fewer than 4 lines (excluding tool use or code generation), unless user asks for detail."
Examples from prompt:
top"Sources: Amp/gpt-5.yaml63-69 Amp/claude-4-sonnet.yaml668-743
The system prompt mandates a specific verification order: "Typecheck → Lint → Tests → Build"
Gate Execution Rules:
AGENTS.md or discover via repository search if unknownSources: Amp/gpt-5.yaml332-344
Code quality mandates:
as any or linter suppression unless explicitly requestedSources: Amp/gpt-5.yaml316-330
Refresh this wiki