diff --git a/ai/agent.mdx b/ai/agent.mdx index 02496f6e7..ab93dc86e 100644 --- a/ai/agent.mdx +++ b/ai/agent.mdx @@ -52,6 +52,24 @@ Use the agent in Slack to collaborate with your team on documentation updates. The agent can only access repositories that you connect through the Mintlify GitHub App. Configure which repositories the agent can access in the agent panel **Settings** or in the [GitHub App settings](https://github.com/apps/mintlify/installations/new). +## Customize agent behavior + +Add an `AGENTS.md` file in your repository to customize the agent's behavior. The agent reads this file and follows any instructions you provide. + +Create the `AGENTS.md` file at the root of your repository. If your project is a monorepo, create the file in the root of the documentation directory. + +Add any instructions that you want the agent to follow. The agent appends these instructions to its system prompt, so they influence all of its responses and actions. + +```markdown Examples of custom instructions +Always use TypeScript for code examples. Never use JavaScript. + +When documenting API endpoints, include rate limiting information. + +Use ISO 8601 (YYYY-MM-DD) format for dates. +``` + +The agent applies these instructions to all tasks, whether you're using it in the dashboard, Slack, or via the API. + ## Embed the agent via API Use the agent endpoints to [create jobs](/api-reference/agent/create-agent-job), [get a specific job](/api-reference/agent/get-agent-job), and [get all jobs](/api-reference/agent/get-all-jobs).