Give LatchLoop the context it needs to work like a great teammate on your codebase. AGENTS.md is a simple, open documentation file you add to your repository to teach AI coding agents how to build, test, and contribute to your project.
This guide explains what AGENTS.md is, how LatchLoop uses it, and how you can set it up in a few minutes.
Think of AGENTS.md as a README written for AI coding agents. While your main README focuses on people, AGENTS.md focuses on the practical details an agent needs to be productive:
It’s just a Markdown file that lives in your repository (no special format required). Many open‑source projects use it, and LatchLoop understands it out of the box.
Learn more: https://agents.md/
When you run a task in LatchLoop—like generating code, reviewing a pull request, or asking questions, LatchLoop looks for an AGENTS.md file in your repository and uses it to guide the agent’s actions.
LatchLoop supports multiple AGENTS.md files in a single repo (for example, one per package in a monorepo). We select the “nearest” AGENTS.md to the files being worked on. If that isn’t available, we use the one at the repository root, if present.
Supported filenames include: AGENTS.md, agents.md, AGENT.md, Agent.md, and agent.md.
(Note: LatchLoop automatically understands your project’s tech stack and file structure so mentioning general details in your Agents.md is not neccessary. You may wish to include specific details that might not be inferred from a quick glance at your project.)
Choose one of the following:
LatchLoop will automatically pick the most relevant one for the task at hand.
Tip: If you’re working in a monorepo, place an AGENTS.md near each package so the right guidance is used for changes in that area.
Pull request review: LatchLoop reviews your PR and uses the AGENTS.md nearest to the changed files. It runs the commands you specify and follows your review rules (e.g., test requirements, naming conventions).
New feature in a subpackage: You have /packages/web and /packages/api, each with its own AGENTS.md. If you request changes under /packages/api, LatchLoop prefers /packages/api/AGENTS.md over the root file.
Onboarding a new codebase: If you’ve just connected a repo and your README is very human‑oriented, add an AGENTS.md so the agent knows the exact setup steps and checks to run.
Do I need AGENTS.md for LatchLoop to work?
Can I have more than one AGENTS.md?
What file name should I use?
What format should I use?
What if AGENTS.md conflicts with my README or other docs?
How quickly do updates take effect?
How can I tell if LatchLoop used my AGENTS.md?
I don’t want to clutter my repository. Should I make an AGENTS.md about each repeated process we have?
AGENTS.md isn’t being picked up
The wrong AGENTS.md is being used
Security note
If you have questions or want help shaping an effective AGENTS.md for your repo, contact support from within LatchLoop or reach out to your account team. We’re happy to review examples and suggest improvements.