AGENTS.md vs CLAUDE.md: A Practical Decision Tree for Multi-Agent Projects
If you're building with AI agents, you've probably encountered both AGENTS.md and CLAUDE.md files. Most developers treat them as interchangeable or just pick one randomly. That's a mistake. These files serve different purposes, and using them correctly makes your multi-agent setup significantly more maintainable.
This guide cuts through the confusion with a practical decision framework, real examples, and clear rules about what each file should contain.
Table of Contents
- The Core Difference
- What CLAUDE.md Is Actually For
- What AGENTS.md Should Contain
- The Decision Tree
- Real Example: A Multi-Agent Repository
- What Claude Code Actually Reads
- Common Mistakes
- When to Use Both
The Core Difference
CLAUDE.md is session context for a single coding assistant. AGENTS.md is architecture documentation for a multi-agent system.
Analogy: CLAUDE.md is like a daily standup brief you give one developer. AGENTS.md is like the system architecture diagram you pin to the wall for the entire team.
The confusion stems from the fact that both files can technically contain similar information. But scope and audience differ completely.
What CLAUDE.md Is Actually For
CLAUDE.md exists to give Claude Code (or similar assistants) immediate context when you open a chat session. It's a convenience file that prevents you from repeating the same context every time.
What belongs in CLAUDE.md:
| Category | Details |
|---|---|
| Project overview | Two paragraphs max |
| Tech stack | Frameworks, languages, key libraries |
| Code conventions | Naming, formatting, file structure |
| Common tasks | Build commands, test runners |
| Entry points | Where new features typically go |
What does NOT belong:
- Individual agent specifications
- Multi-agent orchestration logic
- Detailed prompt templates
- Agent-to-agent communication protocols
- Performance benchmarks for different agents
The reality check: most AI assistants don't automatically read CLAUDE.md unless explicitly told to in each session. GitHub Copilot supports it. Claude Code sometimes picks it up. But counting on automatic reading is wishful thinking.
Keep CLAUDE.md under 500 words. Treat it as a quick reference card, not comprehensive documentation.
What AGENTS.md Should Contain
AGENTS.md documents your multi-agent architecture. This file assumes you're building a system where multiple AI agents work together, each with specific roles.
Core sections for AGENTS.md:
| Section | Purpose |
|---|---|
| Agent roster | Name, role, model, temperature |
| Interaction patterns | Who calls who, when, why |
| State management | How agents share context |
| Prompt templates | Actual prompts or pointers to them |
| Performance notes | What works, what doesn't |
This is architecture documentation first. If you're not building a multi-agent system, you don't need this file at all.
The Decision Tree
Here's the practical framework:
Use ONLY CLAUDE.md when:
- You have a single AI assistant helping you code
- You want to reduce repetitive context-setting
- Your project is straightforward with one agent
Use ONLY AGENTS.md when:
- You have 2+ AI agents with different roles
- Agents interact with each other
- You need to document orchestration logic
- Other developers need to understand your agent setup
Use BOTH when:
- You have a multi-agent system AND use Claude Code for development
- CLAUDE.md points to AGENTS.md for architecture details
- Each file maintains its distinct scope
Use NEITHER when:
- You're just using ChatGPT in a browser
- Your codebase has good README.md documentation
- You don't want to maintain extra files
The key insight: CLAUDE.md is a developer experience optimization. AGENTS.md is system documentation. Different purposes.
Real Example: A Multi-Agent Repository
Here's what AGENTS.md looks like for a content generation system with three agents:
# Agent Architecture
## Agent Roster
### ResearchAgent
- Model: Claude 3.5 Sonnet
- Temperature: 0.3
- Role: Gather factual information from sources
- Input: Topic + search terms
- Output: Structured research brief (JSON)
### WriterAgent
- Model: GPT-4
- Temperature: 0.7
- Role: Generate first draft from research
- Input: Research brief (JSON)
- Output: Markdown draft
### EditorAgent
- Model: Claude 3.5 Sonnet
- Temperature: 0.2
- Role: Polish draft, fix issues
- Input: Markdown draft
- Output: Final markdown
## Interaction Flow
1. ResearchAgent receives topic
2. ResearchAgent outputs to /temp/research.json
3. WriterAgent reads research.json, writes to /temp/draft.md
4. EditorAgent reads draft.md, outputs to /output/final.md
No direct agent-to-agent communication. State passed via filesystem.
## Prompt Templates
See /prompts directory for full templates.
ResearchAgent focuses on citation quality.
WriterAgent optimized for readability scores 60+.
EditorAgent catches formatting and fact errors.
## Performance Notes
WriterAgent at temp 0.9 was too creative, producing tangents.
EditorAgent at temp 0.5 made unnecessary changes.
Current settings are optimal after 50+ runs.
Notice this tells you nothing about how to use Claude Code to develop this system. That's what CLAUDE.md would cover.
Corresponding CLAUDE.md for the same project:
# Project: Multi-Agent Content Generator
Python 3.11, FastAPI backend, three-agent pipeline.
## Structure
- /agents: Individual agent implementations
- /prompts: Markdown templates
- /temp: Intermediate outputs
- /output: Final results
- /tests: Agent unit tests
## Key Conventions
- Agent classes extend BaseAgent
- All prompts in /prompts, never hardcoded
- Temperature settings in config.yaml
- JSON schema validation on all agent outputs
## Common Tasks
```bash
python -m pytest tests/
python main.py, topic "sample topic"
See AGENTS.md for architecture details.
Two files, zero overlap, clear separation of concerns.
## What Claude Code Actually Reads
The uncomfortable truth: Claude Code and similar tools are inconsistent about reading context files automatically.
**Actual behavior:**
| Tool | Auto-reads CLAUDE.md | Needs explicit prompt |
| --- | --- | --- |
| Claude Code | Sometimes | Usually |
| GitHub Copilot | Yes (documented) | Rarely |
| Cursor | Yes | No |
| Windsurf | No | Yes |
Your workflow should assume the agent won't read anything automatically. Start sessions with "Read CLAUDE.md and summarize our project" or similar.
Some developers symlink CLAUDE.md to AGENTS.md to cover both bases. This works if your project is small, but defeats the purpose of separation once you scale.
## Common Mistakes
**Mistake 1: Treating CLAUDE.md as a dump file**
Developers paste everything: full API docs, every environment variable, historical decisions. Result: a 3000-word file that agents ignore and humans can't parse.
Fix: Keep it under 500 words. Link to other docs.
**Mistake 2: Using AGENTS.md when you have one agent**
If you're just using Claude to help you code, AGENTS.md is overkill. A good README.md is sufficient.
**Mistake 3: Duplicating content across both files**
If your CLAUDE.md and AGENTS.md contain the same paragraphs, you've failed at separation of concerns. Each file should serve a distinct reader.
**Mistake 4: Expecting automatic reading**
Don't rely on tools to auto-load context. Explicitly reference files in your prompts.
## When to Use Both
Use both files when:
1. You're building a multi-agent system (AGENTS.md needed)
2. You use Claude Code or similar for development (CLAUDE.md helpful)
3. You can maintain clear boundaries between them
In CLAUDE.md, include one line: "See AGENTS.md for multi-agent architecture."
In AGENTS.md, don't mention Claude Code or development workflow at all.
**Separation strategy:**
| Concern | File | Reader |
| --- | --- | --- |
| Development setup | CLAUDE.md | AI coding assistant |
| Agent architecture | AGENTS.md | Developers + operators |
| API documentation | /docs | Everyone |
| Deployment | README.md | DevOps |
If a piece of information serves multiple audiences, it belongs in neither. Put it in /docs and link from both.
## Conclusion
CLAUDE.md and AGENTS.md solve different problems. CLAUDE.md optimizes your sessions with AI coding assistants. AGENTS.md documents multi-agent system architecture.
The decision is straightforward: if you have multiple agents that interact, use AGENTS.md. If you use Claude Code or similar tools, use CLAUDE.md. If both apply, use both with clear boundaries.
Most importantly, keep both files focused and under 500 words each. The moment they become documentation dumps, they stop being useful.
Don't overthink this. Pick the file that matches your use case, write clear content, and get back to building.