Leave Localhost logoLeave LocalhostDocs
AI Agent DX

The AGENTS.md File

The AGENTS.md file located at the root of the repository is the master instruction set for all AI agents operating within the codebase.

The AGENTS.md file located at the root of the repository is the master instruction set for all AI agents operating within the codebase.

Purpose

AI models have vast general knowledge, but they lack the specific context of your project's architecture. AGENTS.md provides this context, instructing the AI on:

  • Workspace Boundaries: Where specific types of code belong (e.g., UI components in packages/ui, backend logic in packages/backend/convex).
  • Tooling: Enforcing the use of bun instead of npm or yarn.
  • Coding Style: Mandating declarative, functional TypeScript and specific naming conventions.
  • Verification: Reminding the AI to run type checks (bun run typecheck) and linters after making changes.

Best Practices

  • Keep it Updated: As your project evolves, update AGENTS.md to reflect new architectural decisions or libraries.
  • Be Specific: Vague instructions are often ignored by AI. Be direct and clear about what is allowed and what isn't.
  • Reference Sub-Guidelines: AGENTS.md serves as a routing layer, pointing the AI to more specific documents like packages/backend/AGENTS.md for backend tasks.

On this page