diff --git a/.vale/styles/Google/Headings.yml b/.vale/styles/Google/Headings.yml
index 6e2645923..a527dab29 100644
--- a/.vale/styles/Google/Headings.yml
+++ b/.vale/styles/Google/Headings.yml
@@ -30,6 +30,7 @@ exceptions:
- PDF
- SAML
- SDK
+ - Slack
- SSL
- SSO
- TLS
diff --git a/ai/agent.mdx b/ai/agent.mdx
new file mode 100644
index 000000000..24d9a073d
--- /dev/null
+++ b/ai/agent.mdx
@@ -0,0 +1,80 @@
+---
+title: "Agent"
+description: "The agent helps you write and maintain documentation"
+icon: "pen-line"
+---
+
+
+ The agent is available on [Pro and Custom plans](https://mintlify.com/pricing?ref=agent) for anyone with access to your dashboard.
+
+
+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
+
+
+ If your Slack Workspace Owner requires admin approval to install apps, ask them to approve the mintlify app before you connect it.
+
+
+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).
+
+## 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.
diff --git a/ai/slack-app.mdx b/ai/slack-app.mdx
index 3335a5834..b63a860e9 100644
--- a/ai/slack-app.mdx
+++ b/ai/slack-app.mdx
@@ -8,11 +8,11 @@ icon: "slack"
The Slack app is available for [Pro and Custom plans](https://mintlify.com/pricing?ref=slack-app).
-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`.
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
If your Slack Workspace Owner requires admin approval to install apps, ask them to approve the Mintlify Slack app before you add it.
@@ -22,6 +22,6 @@ The Slack app can incur costs: either using your AI assistant credits or incurri
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.
diff --git a/api-reference/agent/create-agent-job.mdx b/api-reference/agent/create-agent-job.mdx
new file mode 100644
index 000000000..b21502eb3
--- /dev/null
+++ b/api-reference/agent/create-agent-job.mdx
@@ -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.
+
+## 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.
diff --git a/api-reference/agent/get-agent-job.mdx b/api-reference/agent/get-agent-job.mdx
new file mode 100644
index 000000000..e24430aae
--- /dev/null
+++ b/api-reference/agent/get-agent-job.mdx
@@ -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
diff --git a/api-reference/agent/get-all-jobs.mdx b/api-reference/agent/get-all-jobs.mdx
new file mode 100644
index 000000000..51a586573
--- /dev/null
+++ b/api-reference/agent/get-all-jobs.mdx
@@ -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.
diff --git a/discovery-openapi.json b/discovery-openapi.json
index 30278d030..0cbb4ddde 100644
--- a/discovery-openapi.json
+++ b/discovery-openapi.json
@@ -576,6 +576,290 @@
}
}
}
+ },
+ "/agent/job/{domain}": {
+ "post": {
+ "summary": "Create agent job",
+ "description": "Creates a new agent job that can generate and edit documentation based on provided messages and branch information.",
+ "parameters": [
+ {
+ "name": "domain",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "The domain identifier from your `domain.mintlify.app` URL. Can be found in the top left of your dashboard."
+ }
+ ],
+ "requestBody": {
+ "required": true,
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "branch",
+ "messages",
+ ],
+ "properties": {
+ "branch": {
+ "type": "string",
+ "description": "The name of the Git branch that the agent should work on, will be automatically created if it doesn't exist"
+ },
+ "messages": {
+ "type": "array",
+ "description": "A list of previous messages to provide to the agent.",
+ "items": {
+ "type": "object",
+ "required": [
+ "role",
+ "content"
+ ],
+ "properties": {
+ "role": {
+ "type": "string",
+ "enum": ["system", "user"],
+ "description": "The role of the message sender."
+ },
+ "content": {
+ "type": "string",
+ "description": "The content of the message."
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "responses": {
+ "200": {
+ "description": "Agent job created successfully (streaming response). X-Session-Id Header is sent back in the response",
+ "headers": {
+ "X-Message-Id": {
+ "schema": {
+ "type": "string"
+ },
+ "description": "Message identifier for the created job"
+ }
+ },
+ "content": {
+ "text/plain": {
+ "schema": {
+ "type": "string",
+ "description": "Streaming response containing the agent job execution details and results."
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/agent/{domain}/job/{id}": {
+ "get": {
+ "summary": "Get agent job by ID",
+ "description": "Retrieves the details and status of a specific agent job by its ID.",
+ "parameters": [
+ {
+ "name": "domain",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "The domain identifier from your `domain.mintlify.app` URL. Can be found in the top left of your dashboard."
+ },
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "The unique identifier of the agent job to retrieve."
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Agent job details retrieved successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "type": "string",
+ "description": "The subdomain this session belongs to."
+ },
+ "subdomain": {
+ "type": "string",
+ "description": "The subdomain this session belongs to."
+ },
+ "branch": {
+ "type": "string",
+ "description": "Git branch name where changes were made.",
+ "nullable": true
+ },
+ "haulted": {
+ "type": "boolean",
+ "description": "Whether the session execution was halted."
+ },
+ "haultReason": {
+ "type": "string",
+ "enum": ["completed", "github_missconfigured", "error"],
+ "description": "Reason for session halt."
+ },
+ "pullRequestLink": {
+ "type": "string",
+ "description": "Link to the created pull request."
+ },
+ "messageToUser": {
+ "type": "string",
+ "description": "Message for the user about the session outcome."
+ },
+ "todos": {
+ "type": "array",
+ "description": "List of todo items from the session.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string",
+ "description": "Brief description of the task."
+ },
+ "status": {
+ "type": "string",
+ "enum": ["pending", "in_progress", "completed", "cancelled"],
+ "description": "Current status of the task."
+ },
+ "priority": {
+ "type": "string",
+ "enum": ["high", "medium", "low"],
+ "description": "Priority level of the task."
+ },
+ "id": {
+ "type": "string",
+ "description": "Unique identifier for the todo item."
+ }
+ }
+ }
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Timestamp when the session was created."
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/agent/{domain}/jobs": {
+ "get": {
+ "summary": "Get all agent jobs",
+ "description": "Retrieves all agent jobs for the specified domain, including their status and details.",
+ "parameters": [
+ {
+ "name": "domain",
+ "in": "path",
+ "required": true,
+ "schema": {
+ "type": "string"
+ },
+ "description": "The domain identifier from your `domain.mintlify.app` URL. Can be found in the top left of your dashboard."
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "All agent jobs retrieved successfully",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "allSessions": {
+ "type": "array",
+ "description": "Array of all agent sessions for the domain.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "sessionId": {
+ "type": "string",
+ "description": "The subdomain this session belongs to."
+ },
+ "subdomain": {
+ "type": "string",
+ "description": "The subdomain this session belongs to."
+ },
+ "branch": {
+ "type": "string",
+ "description": "Git branch name where changes were made.",
+ "nullable": true
+ },
+ "haulted": {
+ "type": "boolean",
+ "description": "Whether the session execution was halted."
+ },
+ "haultReason": {
+ "type": "string",
+ "enum": ["completed", "github_missconfigured", "error"],
+ "description": "Reason for session halt."
+ },
+ "pullRequestLink": {
+ "type": "string",
+ "description": "Link to the created pull request."
+ },
+ "messageToUser": {
+ "type": "string",
+ "description": "Message for the user about the session outcome."
+ },
+ "todos": {
+ "type": "array",
+ "description": "List of todo items from the session.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "content": {
+ "type": "string",
+ "description": "Brief description of the task."
+ },
+ "status": {
+ "type": "string",
+ "enum": ["pending", "in_progress", "completed", "cancelled"],
+ "description": "Current status of the task."
+ },
+ "priority": {
+ "type": "string",
+ "enum": ["high", "medium", "low"],
+ "description": "Priority level of the task."
+ },
+ "id": {
+ "type": "string",
+ "description": "Unique identifier for the todo item."
+ }
+ }
+ }
+ },
+ "createdAt": {
+ "type": "string",
+ "format": "date-time",
+ "description": "Timestamp when the session was created."
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
},
"components": {
@@ -587,4 +871,4 @@
}
}
}
-}
\ No newline at end of file
+}
diff --git a/docs.json b/docs.json
index 2f8762811..56bd74f51 100644
--- a/docs.json
+++ b/docs.json
@@ -53,6 +53,7 @@
"group": "AI optimization",
"pages": [
"guides/assistant",
+ "ai/agent",
"ai/llmstxt",
"ai/contextual-menu",
"ai/model-context-protocol",
@@ -257,6 +258,14 @@
"api-reference/update/status"
]
},
+ {
+ "group": "Agent",
+ "pages": [
+ "api-reference/agent/create-agent-job",
+ "api-reference/agent/get-agent-job",
+ "api-reference/agent/get-all-jobs"
+ ]
+ },
{
"group": "Assistant",
"pages": [