get started

AGENTS.md

Project-level instructions and docs index for AI coding agents

What is AGENTS.md?

AGENTS.md is a project-level instruction file that lives at your repository root. It provides guidance to AI coding agents about how to work with your projectβ€”including using sus for secure package installation and accessing package documentation.

Based on Vercel's research, passive context in AGENTS.md outperforms active skill retrieval (100% vs 79% pass rate in agent evals). This is why sus now uses a centralized docs index approach instead of per-agent-folder skills.

How It Works

When you initialize sus and add packages, here's what happens:

100%
  1. sus init creates project configuration and optionally sets up the docs index
  2. sus add saves package documentation to .sus-docs/
  3. The AGENTS.md file is updated with a compressed index of all installed packages

Getting Started

Initialize sus

Run sus init in your project root:

Bash
sus init
Bash
  πŸ”§ initializing sus...
 
  Enable AGENTS.md docs index for AI coding agents? (Y/n) Y
 
  βœ“ created sus.json
  βœ“ created .sus-docs/
  βœ“ updated AGENTS.md with sus docs index
 
  βœ“ sus initialized successfully!

Use -y to skip prompts and use defaults:

Bash
sus init -y

Add Packages

When you add packages with sus, documentation is automatically indexed:

Bash
sus add express
Bash
πŸ” checking express@4.21.0...
βœ… not sus
   β”œβ”€ publisher: expressjs (verified)
   β”œβ”€ downloads: 32M/week
   β”œβ”€ cves: 0
   └─ trust score: 95/100
πŸ“¦ installed
πŸ“ updated AGENTS.md docs index

Remove Packages

When you remove packages, the docs index is updated automatically:

Bash
sus remove express
Bash
πŸ“¦ removed express
πŸ“ updated AGENTS.md docs index

Project Structure

After initialization and adding packages, your project will have:

Text
your-project/
β”œβ”€ AGENTS.md           # Instructions + docs index for AI agents
β”œβ”€ sus.json            # sus configuration
β”œβ”€ .sus-docs/          # Package documentation (gitignored)
β”‚  β”œβ”€ express.md
β”‚  β”œβ”€ lodash.md
β”‚  └─ axios.md
└─ package.json

sus.json

The configuration file stores your sus settings:

JSON
{
  "agents_md": true
}
FieldDescriptionDefault
agents_mdEnable AGENTS.md docs indexfalse

.sus-docs/

Package documentation is saved here. Each file contains:

  • Quick start examples
  • Key APIs and usage patterns
  • Best practices and gotchas
  • Required capabilities/permissions

Add .sus-docs/ to your .gitignore. The docs are regenerated from the AGENTS.md index when needed.

AGENTS.md Structure

sus adds a compressed docs index to your AGENTS.md following Vercel's format:

MARKDOWN
# AGENTS.md
 
[sus Docs Index]|root: ./.sus-docs
|IMPORTANT: Prefer retrieval-led reasoning over pre-training-led reasoning
|packages:{express.md,lodash.md,axios.md}
[/sus Docs Index]

This compressed format:

  • Points agents to the .sus-docs/ directory
  • Lists all available package documentation files
  • Instructs agents to use retrieval-led reasoning (read the docs) over pre-training knowledge

What the Instructions Tell Agents

The sus section in AGENTS.md instructs AI agents to:

  1. Use sus for package installation - Instead of npm install or yarn add, agents should use sus add
  2. Check the docs index - After installing, agents can reference the .sus-docs/ folder for package documentation
  3. Follow security best practices - Use --strict mode when security is critical

Why Docs Index?

The docs index approach offers several advantages over per-agent-folder skills:

Per-Agent Skills (Old)Docs Index (New)
Scattered across multiple foldersCentralized in .sus-docs/
Requires agents to actively searchPassive context in AGENTS.md
79% pass rate in evals100% pass rate in evals
Agent-specific pathsUniversal format

Based on Vercel's research, AI agents perform better when documentation is provided as passive context rather than requiring active retrieval.

Supported Agents

The AGENTS.md file is recognized by most AI coding agents:

AgentSupport
Cursorβœ… Reads AGENTS.md from project root
Claude Codeβœ… Reads AGENTS.md from project root
Windsurfβœ… Reads AGENTS.md from project root
Codex CLIβœ… Reads AGENTS.md from project root
Gemini CLIβœ… Reads AGENTS.md from project root
OpenCodeβœ… Reads AGENTS.md from project root

Combining with Other Instructions

AGENTS.md can contain any project-level instructions for AI agents. The sus section is just one part. You might also include:

  • Project architecture overview
  • Coding conventions and style guides
  • Testing requirements
  • Deployment procedures
  • Security policies

Example structure:

MARKDOWN
# Project Instructions for AI Agents
 
## Architecture
This is a Next.js application with...
 
## Coding Standards
- Use TypeScript strict mode
- Follow ESLint configuration
- Write tests for new features
 
## sus Package Security
This project uses sus for secure package installation...
 
## Deployment
Changes to main are automatically deployed to...

Manual Setup

If you prefer to set up manually without sus init:

  1. Create sus.json:
JSON
{
  "agents_md": true
}
  1. Create or update AGENTS.md with the sus section shown above

  2. Add .sus-docs/ to .gitignore