---
metadata:
  - name: generator
    content: Diplodoc Platform v5.57.3
alternate:
  - https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/agentsmd.md
  - https://sourcecraft.dev/portal/docs/ru/sourcecraft/concepts/agentsmd.md
  - href: en/sourcecraft/concepts/agentsmd.md
    type: text/markdown
    title: Markdown version
  - href: ../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://sourcecraft.dev/portal/docs/en/llms.txt

# AGENTS.md

_`AGENTS.md`_ is a file containing instructions and context for AI agents. Typically located in the repository root, it serves as a `README.md` for AI agents. In monorepos, you can place `AGENTS.md` in each subproject: this way, agents will prioritize instructions located closest to the file being edited.

`AGENTS.md` is open-format and has no required fields with content tailored to specific project requirements. Some of the popular sections are:

* Project overview
* Build and test commands
* Code style guidelines
* Testing and QA instructions
* Pull request formatting rules
* Safety guardrails

AI-enabled SourceCraft features also rely on context from `AGENTS.md`:

* When using Code Assistant in [chat mode](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/code-assistant.md#chat-mode) in the SourceCraft UI.
* When [generating descriptions](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/code-assistant.md#description) for pull requests. Read more in [Configuring rules for descriptions](https://sourcecraft.dev/portal/docs/en/sourcecraft/operations/generate-description.md#rules).
* When delivering [AI code review](https://sourcecraft.dev/portal/docs/en/sourcecraft/concepts/code-assistant.md#review) of pull requests.
* When using the Code Assistant plugin for Visual Studio Code. For more information on how rules from `AGENTS.md` and other custom rules get to your agent's context, see [Custom rules in SourceCraft Code Assistant](https://sourcecraft.dev/portal/docs/en/code-assistant/operations/chat-rules.md).

For more information about `AGENTS.md`, visit the [project's GitHub repository](https://github.com/agentsmd/agents.md) and the [official website](https://agents.md/).

## Example {#example}

```markdown
Telegram bot for personal reminders and todo tasks. The bot saves user messages and sends notifications at the specified date and time.

## Technology stack

* Python 3.12
* python-dotenv
* Aiogram 3.x (Telegram Bot API)
* SQLite + aiosqlite (task and reminder storage)
* AsyncIOScheduler (task scheduler)

## Code style

* Each handler is a separate file located in `bot/handlers/`
* Do not write functions longer than 40 lines
* Add tests for all new functions
* Add comments for complex logic
* Do not use `time.sleep()`, only `await asyncio.sleep()`

## Do not ever

* Propose migration to other databases
* Propose migration to other APIs

## PR commands

* Build project: `/build`
* Run tests: `/test`
* Check code style: `/lint`
```