Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
74388a6
update Slack app naming
ethanpalm Sep 22, 2025
a8bae3f
add agent page to nav
ethanpalm Sep 22, 2025
ca565ad
create agent page
ethanpalm Sep 22, 2025
d350e42
add to common workflows
ethanpalm Sep 22, 2025
37bbbd0
remove passive voice
ethanpalm Sep 22, 2025
9cc8904
add API workflow example
ethanpalm Sep 23, 2025
6e1220d
add Slack to header exceptions
ethanpalm Sep 23, 2025
8b2616b
revise intro
ethanpalm Sep 23, 2025
bff8349
adjust header depth for ToC
ethanpalm Sep 23, 2025
4d74950
clean up the prompts section
ethanpalm Sep 23, 2025
e1cc77f
add into to workflows section
ethanpalm Sep 23, 2025
32b5ac6
add broad examples
ethanpalm Sep 23, 2025
b0052b3
update example workflows
ethanpalm Sep 24, 2025
1d92a46
💅
ethanpalm Sep 24, 2025
2759113
add steps for connecting repos
ethanpalm Sep 24, 2025
ab0adc1
clean up some TODOs
ethanpalm Sep 24, 2025
89efe28
edit intro
ethanpalm Sep 26, 2025
a58beb0
Merge branch 'main' into agent-docs
ethanpalm Sep 26, 2025
5c0eb5f
feature: rough draft of discovery agent routes. Copy is prone to chan…
cdxker Sep 28, 2025
bb8b439
feature: finalized rough draft of api spec. Cleaned up copy on the ap…
cdxker Sep 28, 2025
44a4de7
alphabetize endpoint groups
ethanpalm Sep 28, 2025
1b29f2c
writer -> agent
ethanpalm Sep 28, 2025
4159fb3
add links to endpoint pages
ethanpalm Sep 28, 2025
9184563
💅
ethanpalm Sep 28, 2025
ef4807f
add rate limit info
ethanpalm Sep 28, 2025
97aef0f
spacing
ethanpalm Sep 28, 2025
b7d24df
update availability
ethanpalm Sep 28, 2025
db3b557
concision
ethanpalm Sep 28, 2025
c6a2c0e
update access requirements
ethanpalm Sep 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .vale/styles/Google/Headings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ exceptions:
- PDF
- SAML
- SDK
- Slack
- SSL
- SSO
- TLS
Expand Down
80 changes: 80 additions & 0 deletions ai/agent.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
title: "Agent"
description: "The agent helps you write and maintain documentation"
icon: "pen-line"
---

<Info>
The agent is available on [Pro and Custom plans](https://mintlify.com/pricing?ref=agent) for anyone with access to your dashboard.
</Info>

The agent creates pull requests with proposed changes to your documentation based on your prompts. When you send a request to the agent, it references your documentation, connected repositories, and Slack messages to create content that follows technical writing best practices and adheres to the Mintlify schema. Access the agent in your Slack workspace or embed it in custom applications with the API.

Use the agent to:

- Write new content based on your prompts, links to pull requests, or Slack threads
- Revise outdated code examples and API references
- Search and update existing content
- Answer questions about your docs and technical writing topics

To get started, add the agent to your Slack workspace and mention it with `@mintlify` in a channel.

## Add the agent to your Slack workspace

<Note>
If your Slack Workspace Owner requires admin approval to install apps, ask them to approve the mintlify app before you connect it.

Check warning on line 25 in ai/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/agent.mdx#L25

Use 'administrator' instead of 'admin'.
</Note>

1. Navigate to the [agent](https://dashboard.mintlify.com/products/agent) page of your dashboard.
2. Select the **Connect** button.
3. Follow the Slack prompts to add the `mintlify` app to your workspace.
4. Follow the Slack prompts to link your Mintlify account to your Slack workspace.
5. Test that the agent is working and responds when you:
- Send a direct message to it.
- Mention it with `@mintlify` in a channel.

## Connect repositories as context

The agent can only access repositories that you connect through the Mintlify GitHub App. Modify which repositories the agent can access in the [GitHub App settings](https://github.com/apps/mintlify/installations/new).

## Embed the agent via API

The agent endpoints can be used 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).

Check warning on line 42 in ai/agent.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/agent.mdx#L42

In general, use active voice instead of passive voice ('be used').

## Write effective prompts

Think of the agent as a helpful assistant that needs your guidance to complete tasks. Give it clear instructions and context. More focused tasks are easier to complete, so break down complex projects into smaller steps.

Make your prompts specific and outcome-focused. Generic prompts like `@mintlify Improve the onboarding page` apply general best practices, but may not improve content in the specific way that you were picturing.

Try prompts based on outcomes you want your users to achieve or problems that they encounter. For example: `@mintlify A lot of users have trouble installing the CLI. Review the onboarding page and update the docs so that users can easily install the CLI` or `@mintlify Developers keep getting 401 errors when following our authentication guide. Review the auth docs and add clearer examples showing how to properly format the API key`.

Use broad prompts for general content maintenance like fixing typos, updating redirects, or renaming a feature throughout your docs. For example: `@mintlify Find and fix all typos in the docs` or `@mintlify change all unordered lists to use * instead of -`.

## Agent workflows

The agent assists with many different documentation tasks. These workflows show some of the ways you can integrate the agent into your documentation process. Try an approach that fits how your team currently works and adapt it to your specific needs.

### Iterate on a prompt in a Slack thread
Prompt the agent, then continue to mention it with `@mintlify` in the same thread to refine and iterate on the pull request that it creates. For example: `@mintlify Our quickstart page needs a new section on inviting collaborators`. Then `@mintlify The new section should be called "Inviting collaborators"`. Followed by any other iterations.

### Start with the agent, finish manually
Prompt the agent to begin a project, then check out the branch it creates and finish the task in your local environment or the web editor. The agent can help you get started, then you can take over to complete the task. For example: `@mintlify Update the quickstart page to include information about inviting collaborators` and then checkout the branch to make any additional changes using your preferred method.

### Update docs when merging feature changes
When you merge a feature pull request, share the PR link with the agent to update relevant docs. For example: `@mintlify This PR adds a new authentication method. Update the docs to include the new auth flow: [PR link]`.

### Generate release notes from commit history
Prompt the agent with a specific pull request or a time period to generate release notes or changelog updates based on the commit history. For example: `@mintlify Generate release notes for this PR: [PR link]` or `@mintlify Generate release notes for the last month`.

### Generate code examples
Prompt the agent to generate code examples for features throughout your docs or on specific pages. For example: `@mintlify Generate a code example to make the authentication method easier to understand`.

### Review existing content
Prompt the agent to review existing content for technical accuracy, style, grammar, or other issues. For example: `@mintlify Review the API rate limiting section. We changed limits last month`.

### Respond to user feedback
Prompt the agent with feedback from your users to make focused updates to your docs. For example: `@mintlify Users are getting confused by step 3 in the setup guide. What might be making it unclear?`.

### Automate with the API
Integrate the agent into your existing automation tools to automatically update documentation when code changes occur, trigger content reviews, or sync documentation updates across multiple repositories.
8 changes: 4 additions & 4 deletions ai/slack-app.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@
The Slack app is available for [Pro and Custom plans](https://mintlify.com/pricing?ref=slack-app).
</Info>

The Slack app adds a bot named `@mintlify` to your Slack workspace that can search your documentation and answer users' questions. The bot responds to direct messages, @mentions, and to any questions in a channel specifically named `#ask-ai`.
The Slack app adds a bot to your Slack workspace that can search your documentation and answer users' questions. The bot responds to direct messages, @mentions, and to any questions in a channel specifically named `#ask-ai`. The bot's name is `@yourprojectname-assistant`. So if your project name is Mintlify, the bot's name is `@mintlify-assistant`.

Check warning on line 11 in ai/slack-app.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/slack-app.mdx#L11

Did you really mean 'bot's'?

Check warning on line 11 in ai/slack-app.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/slack-app.mdx#L11

Did you really mean 'bot's'?

The Slack app can incur costs: either using your AI assistant credits or incurring overages.

## Setting up the Slack app
## Set up the Slack app

<Note>
If your Slack Workspace Owner requires admin approval to install apps, ask them to approve the Mintlify Slack app before you add it.

Check warning on line 18 in ai/slack-app.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

ai/slack-app.mdx#L18

Use 'administrator' instead of 'admin'.
</Note>

1. Navigate to the [Add-ons](https://dashboard.mintlify.com/products/addons) page of your dashboard.
2. Select **Connect** in the Slack Integration card.
3. Follow the Slack prompts to add the app to your workspace.
4. Test that the bot is working and responds when you:
- Send a direct message to the Mintlify app.
- Mention the bot with `@mintlify` in a channel.
- Send a direct message to the bot.
- Mention the bot in a channel.
- Create an `#ask-ai` channel, add the bot, and ask a question.
19 changes: 19 additions & 0 deletions api-reference/agent/create-agent-job.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
openapi: POST /agent/job/{domain}
---

This endpoint creates an agent job based on provided messages and branch information. The job executes asynchronously and returns a streaming response with the execution details and results.

If a branch doesn't exist, the agent creates one. If files are edited successfully, a draft pull request is automatically created at the end of the job.

Check warning on line 7 in api-reference/agent/create-agent-job.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

api-reference/agent/create-agent-job.mdx#L7

In general, use active voice instead of passive voice ('are edited').

## Rate limits

The agent API has the following limits:

- 10,000 uses per key per month
- 10,000 requests per Mintlify organization per hour
- 10,000 requests per IP per day

## Suggested usage

For best results, use the [useChat hook from ai-sdk](https://ai-sdk.dev/docs/reference/ai-sdk-ui/use-chat#usechat) to send requests and handle responses.
14 changes: 14 additions & 0 deletions api-reference/agent/get-agent-job.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
openapi: GET /agent/{domain}/job/{id}
---

## Usage

This endpoint retrieves the details and status of a specific agent job by its unique identifier. Use this to check the progress, status, and results of a previously created agent job.

## Job details

The response includes information such as:
- Job execution status and completion state
- Branch information and pull request details
- Session metadata and timestamps
11 changes: 11 additions & 0 deletions api-reference/agent/get-all-jobs.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
openapi: GET /agent/{domain}/jobs
---

## Usage

This endpoint retrieves all agent jobs for the specified domain, providing an overview of all agent activities and their current status. This is useful for monitoring and managing multiple concurrent or historical agent jobs.

## Response

Use this endpoint to get a comprehensive view of all previous agent sessions.
Loading
Loading