mirror of
https://github.com/mintlify/docs.git
synced 2026-09-14 13:35:46 +08:00
2de38f8b99
* docs: document editor agent connected integrations * docs: fix heading anchor divs and localized integration links in translations --------- Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
130 lines
7.3 KiB
Plaintext
130 lines
7.3 KiB
Plaintext
---
|
|
title: "Ask agent"
|
|
description: "Use the editor's built-in AI agent to write content, edit pages, leave comments and suggestions, search your site, upload files, and configure settings."
|
|
keywords: ["editor", "AI", "assistant", "agent", "chat", "comments", "suggestions", "code mode", "file upload"]
|
|
---
|
|
|
|
The editor includes a built-in agent that can edit pages, reorganize navigation, update `docs.json`, search across your entire repository, and manage dashboard settings. The agent is also available on dashboard settings pages.
|
|
|
|
The editor agent makes changes directly in your current branch. Like your own edits, the agent's changes save automatically but don't reach your live site until you [publish](/editor/publish) them.
|
|
|
|
## Open the agent
|
|
|
|
Click **Ask agent** in the editor toolbar, or press <kbd>Cmd</kbd> + <kbd>I</kbd> (macOS) or <kbd>Ctrl</kbd> + <kbd>I</kbd> (Windows). The same button and shortcut work on dashboard settings pages. Your chat session stays open as you move between the editor and settings. The agent is available to editors and admins. [Viewers](/dashboard/roles) don't see the **Ask agent** button.
|
|
|
|
Type <kbd>@</kbd> to mention a specific page, and the agent focuses on it. Without a mention, it uses the page you currently have open. On your dashboard, the agent knows which page you're viewing so you can ask about the current page without naming it.
|
|
|
|
Example prompts:
|
|
|
|
- `simplify the introduction page`
|
|
- `fix all grammar errors across my content`
|
|
- `add a new page that explains authentication`
|
|
- `rename every mention of "Acme Pro" to "Acme Team" across all pages`
|
|
- `update docs.json to add a new group called "Guides"`
|
|
|
|
## Attach files
|
|
|
|
Click the paperclip icon in the chat box, or drag and drop files onto the panel. The agent reads attached files as context for your request.
|
|
|
|
Supported file types:
|
|
- **Images**: JPG, PNG, GIF, WebP, SVG
|
|
- **Documents**: PDF
|
|
- **Code and text**: `.js`, `.ts`, `.jsx`, `.tsx`, `.mdx`, `.md`, `.json`, `.yaml`, `.html`, `.css`, Python, Go, Rust, Ruby, Java, Swift, C, C++, SQL, shell scripts, and more
|
|
|
|
Maximum size: 5 MB per file, except SVG files, which are limited to 256 KB. Maximum: 10 files per message.
|
|
|
|
Mintlify strips scripts and other active content from SVG files before the agent reads them.
|
|
|
|
## Add a selection to the agent
|
|
|
|
In visual mode, select text and click **Add to agent** in the floating toolbar to send it to the agent as context.
|
|
|
|
## Ask for comments and suggestions
|
|
|
|
The agent edits content directly by default. To get feedback without immediately changing the page, explicitly ask the agent to review the page, leave comments, or make suggestions.
|
|
|
|
- [Suggestions](/editor/collaborate#suggestions) propose a specific replacement that you can accept or reject. The original text remains visible with a strikethrough until you decide, and the agent can include an explanation in the suggestion thread.
|
|
- [Comments](/editor/collaborate#comments) leave feedback or a question anchored to specific text without changing the page.
|
|
|
|
Example prompts:
|
|
|
|
- `review this page and leave suggestions`
|
|
- `comment on anything that needs more context`
|
|
- `suggest ways to make the introduction more concise`
|
|
|
|
The agent uses the page you currently have open unless you name another page. It can annotate rendered page text, including prose inside components. It cannot annotate frontmatter, page metadata, configuration, or raw MDX component tags and attributes.
|
|
|
|
## Review what the agent changed
|
|
|
|
A **Changed files** panel appears in the chat as the agent works. Expand it to see every file modified in the session, and click any file to compare the changes against the original in diff view.
|
|
|
|
To revert the agent's edits, click the discard button next to a file in the **Changed files** panel, or discard all changes from the session.
|
|
|
|
## What the agent can do
|
|
|
|
### Edit pages
|
|
|
|
The agent can write, rewrite, expand, and reorganize content on any page. It reads your existing content to match your style and structure.
|
|
|
|
### Search and navigate your content
|
|
|
|
The agent can search across your entire repository, not just the page you have open. Use it to find information, check for inconsistencies, or verify that content exists before adding it.
|
|
|
|
### Update navigation and docs.json
|
|
|
|
The agent can add, rename, reorder, and delete navigation elements, the same changes you'd make manually in the navigation panel. It can also update `docs.json` configuration directly, including adding new groups, adjusting settings, and configuring redirects.
|
|
|
|
Example: `add a "Quickstart" group under the Getting Started tab and move the quickstart page into it`
|
|
|
|
### Run bash commands
|
|
|
|
The agent can run `grep`, `rg`, and other bash commands against your repository. Use this for bulk operations that span many files.
|
|
|
|
Example: `find every page that mentions the deprecated /v1/auth endpoint`
|
|
|
|
### Configure your site (code mode)
|
|
|
|
For requests that go beyond editing pages (setting up authentication, managing workflows, or changing deployment settings), the agent switches into code mode. It writes and runs a script against your Mintlify dashboard on your behalf.
|
|
|
|
Code mode respects your dashboard permissions. If you don't have access to a setting in the dashboard, the agent can't change it either.
|
|
|
|
Example prompts that use code mode:
|
|
|
|
- `enable JWT authentication for my site`
|
|
- `create a workflow that updates my site when I merge a PR`
|
|
- `add a custom domain`
|
|
|
|
### Use connected integrations
|
|
|
|
<Info>
|
|
Integrations require an [Enterprise plan](https://mintlify.com/pricing?ref=automations).
|
|
</Info>
|
|
|
|
The editor agent can use third-party apps connected through [Integrations](/automations/integrations) as read-only tools while it researches, edits pages, or answers your questions.
|
|
|
|
- **Shared integrations** are available to everyone in your organization.
|
|
- **Personal integrations** use the account connected by the teammate chatting with the agent. For example, a Google Drive search uses your own Drive connection.
|
|
|
|
Ask the agent to use a connected app naturally in your request, such as:
|
|
|
|
- `update the migration guide based on the latest Jira issue`
|
|
- `check what the Notion launch brief says about availability and add it to the release notes page`
|
|
|
|
If the integration you need isn't connected yet, ask the agent to connect it. The agent returns an authorization link. Complete the flow, then send another message so the agent can confirm the connection and continue.
|
|
|
|
### Continue an automation run
|
|
|
|
When you open the editor from an automation result by clicking **Preview**, the agent panel opens automatically with context on what the automation did. A **Changed pages** card at the top of the chat lists every page the automation modified. Click any page to open a diff view.
|
|
|
|
The agent has context on the automation's prompt, a summary of the changes it made, and which pages it modified. You can ask it to refine or extend the automation's work without re-explaining the background.
|
|
|
|
For example: `The new section on rate limits is too long. Trim it to three sentences.`
|
|
|
|
## Session history
|
|
|
|
Click the clock icon in the panel header to see your previous chat sessions. Click any session to reopen it and see what the agent changed.
|
|
|
|
## AI instructions
|
|
|
|
To give the agent persistent guidance like voice rules, terminology, or formatting conventions, configure AI instructions in [Editor settings](/editor/settings#ai-instructions). The agent follows these instructions on every request without you needing to repeat them.
|