---
title: "AGENTS.md"
description: "Put repository-level instructions at the root of the repo so Indent knows how your codebase works."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.indent.com/llms.txt
> Use this file to discover all available pages before exploring further.

# AGENTS.md

Indent reads a root `AGENTS.md` at the start of any session that includes that repository, so it
begins already knowing your setup, architecture, and conventions.

## What belongs here

Use `AGENTS.md` for guidance that applies across most tasks in the repository — the kind of thing
you'd tell a new teammate on their first day:

- **Setup and key commands** — how to install dependencies, run the development server, run tests.
- **Architecture** — how the codebase is organized, what the major modules are, where to find
  things.
- **Conventions** — naming patterns, file structure rules, import ordering, error handling style.
- **Testing expectations** — what kinds of tests are expected for different types of changes.
- **Deployment and rollout** — how releases work, what environments exist, any gates or constraints.

## Example

```md
# AGENTS.md

## Setup

- `pnpm install` to install dependencies
- `pnpm dev` to start the development server on port 3000
- `pnpm test` to run the test suite (Jest)

## Architecture

- `src/api/` — Express route handlers, one file per resource
- `src/services/` — business logic, no direct database access
- `src/db/` — Prisma schema and migrations
- `src/workers/` — background job processors (BullMQ)

## Conventions

- Use named exports, not default exports
- Error responses use `src/lib/errors.ts` helpers, never raw status codes
- All new API endpoints need an integration test in `tests/api/`

## Testing

- Unit tests live next to the file they test (`foo.test.ts`)
- Integration tests go in `tests/api/` and run against a real Postgres instance
- Run `pnpm test:integration` separately — these require Docker

## Deployment

- Main branch auto-deploys to staging
- Production deploys go through the `release` branch and require a passing CI check
- Database migrations run automatically on deploy — never run them manually
```

## AGENTS.md, memory, and skills

`AGENTS.md`, memory, and skills all give Indent context that persists, but each fits a different
kind of guidance.

- **`AGENTS.md`** holds repository facts that stay true across most tasks. You write it and commit
  it to the repository, so it is versioned, reviewed in pull requests, and read in full at the start
  of every session that includes that repository. Use it for setup, architecture, conventions,
  testing, and deployment.
- **[Memory](/learning/memory)** holds what Indent should carry across sessions but isn't tied to
  one repository. Indent writes memory as it works, and you can ask it to remember something
  directly. Each note is filed as personal to you or shared with your organization. Use it for your
  preferences, conventions that span repositories, and facts you teach Indent in passing.
- **[Skills](/learning/skills)** hold a specific, repeatable procedure that's too narrow for
  `AGENTS.md`. You commit a skill to the repository, and Indent pulls it in only when a task
  matches. Use it for a workflow like deploying one service or triaging a class of incident.

Source: https://docs.indent.com/learning/agents-md/index.mdx
