Amp AGENTS.md: File Locations, @ Mentions and Glob-Scoped Guidance
How do I give Amp project instructions with AGENTS.md?
Put an AGENTS.md file in your repo. Amp always includes AGENTS.md files in the current directory and its parents up to $HOME, plus personal files at ~/.config/amp/AGENTS.md and ~/.config/AGENTS.md. Subtree files load when the agent reads a file in that subtree.
Compare: rules and instruction files in every AI coding agent →
Which files Amp reads
- AGENTS.md in the working directory and parent directories up to $HOME: always included.
- AGENTS.md in subtrees: included when the agent reads a file in that subtree.
- $HOME/.config/amp/AGENTS.md and $HOME/.config/AGENTS.md: personal guidance, always included.
- /etc/ampcode/AGENTS.md, /Library/Application Support/ampcode/AGENTS.md or %ProgramData%\ampcode\AGENTS.md: system-wide guidance.
If a directory has no AGENTS.md but has AGENT.md or CLAUDE.md, Amp includes that file instead.
Pull in other files with @ mentions
Relative paths resolve from the agent file. Absolute paths, @~/ paths and globs work. Mentions inside code blocks are ignored.
AGENTS.md
See @doc/style.md and @specs/**/*.md. When making commits, see @doc/git-commit-instructions.md.
Guidance only for certain files
Add globs to the front matter of a mentioned file. Amp includes it only after reading a matching file.
docs/typescript-conventions.md
--- globs: - '**/*.ts' - '**/*.tsx' --- Follow these TypeScript conventions: - Never use the `any` type
Skip guidance files
Set AMP_IGNORE_GUIDANCE_FILES to a colon-separated list of globs. Set it to * to ignore all guidance files.
Terminal
AMP_IGNORE_GUIDANCE_FILES="$HOME/.config/amp/AGENTS.md:$HOME/.config/AGENTS.md" amp -x "do the thing"
Team and web guidance
In the web app, open Settings, then Advanced, and edit Global AGENTS.md for personal guidance. Workspace admins can do the same in Workspace Settings. Workspace guidance does not apply to subagents, Puck or raw custom agents.
Sources
More Amp guides
Reviewed Oct 23, 2026. Settings change often; the linked vendor docs are the source of truth.
Built an MCP server? Get it listed everywhere →
Shipping an Android app? Google Play needs 12 testers for 14 days first. Get them with Tester Exchange →