agent 功能适用于 Pro 和 Custom 方案,所有有权访问你控制台的成员都可以使用。
- 根据你的提示、拉取请求链接或 Slack 线程撰写新内容
- 修改过时的代码示例和 API 参考
- 查找并更新现有内容
- 回答关于你的文档和技术写作相关主题的问题
在控制台中使用 agent
- Chat:向 agent 发送提示词,让它更新你的文档。agent 会根据你的指令创建拉取请求(PR;亦称“合并请求”/Merge Request),并显示链接,方便你查看这些拉取请求或在网页编辑器中打开更改。
- History:浏览过去的对话,并继续处理之前的请求。点击任意对话即可在聊天视图中打开。
- Settings:配置 agent 的集成和存储库访问权限。
将 agent 添加到你的 Slack 工作区
如果你的 Slack 工作区所有者要求安装应用需管理员批准,请先让他们批准 Mintlify 应用,再进行连接。
- 在控制台中打开 agent 面板。
-
点击 Settings 按钮。

- 在 Slack 集成部分点击 Connect。
-
按照 Slack 的提示,将
mintlify应用添加到你的工作区。 - 按照 Slack 的提示,将你的 Mintlify 账户关联到你的 Slack 工作区。
-
测试 agent 是否正常工作,并在你:
- 向它发送一条私信时,
- 在频道中使用
@mintlify提及它时, 能做出响应。
连接你的 GitHub 账号
将代码仓库连接为 context
自定义 agent 行为
AGENTS.md 文件,以自定义 agent 的行为。agent 会读取此文件并遵循你提供的所有指令。
在存储库的根目录下创建 AGENTS.md 文件。如果你的项目是一个 monorepo,请在文档目录的根目录下创建该文件。
添加你希望 agent 遵循的任何指令。agent 会将这些指令追加到它的 system prompt 中,因此会影响它所有的响应和操作。
Examples of custom instructions
通过 API 嵌入 Agent
asDraft 参数(默认为 true)来控制是否将拉取请求以草稿模式创建(拉取请求/PR;亦称“合并请求”/Merge Request)。将 asDraft 设置为 false 可创建非草稿的拉取请求,以便在自动化工作流中立即进行审核和合并。
编写高效的提示词
@mintlify Improve the onboarding page 这样的泛化提示会应用通用最佳实践,但可能无法按照你设想的方式针对性地改进内容。
围绕你希望用户达成的结果或他们遇到的问题来设计提示词。例如:
@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@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
@mintlify Find and fix all typos in the docs@mintlify change all unordered lists to use * instead of -
指定域名
subdomain 参数,用于指定助手应处理哪一个文档集。
要找到你的域名,请查看你想更新的文档集的 dashboard URL。域名是组织名称后面的最后一段。例如,如果你的 dashboard URL 是 https://dashboard.mintlify.com/org-name/domain-name,那么你的域名就是 domain-name。
使用 @mintlify subdomain=<your-domain-name> <your-prompt> 这种格式,引导助手在特定文档集上执行操作。
示例:
@mintlify subdomain=public-docs Add a new section to the quickstart about inviting collaborators based on this PR:提示助手仅更新public-docs站点上的 quickstart 章节。@mintlify subdomain=customer-docs Update the auth docs for the new authentication method:提示助手仅更新customer-docs站点上的认证文档。
Agent 工作流
在 Slack 线程中迭代优化提示词
@mintlify 提及它,以完善并迭代其创建的拉取请求(PR)。
例如:@mintlify 我们的快速入门页面需要新增一个“邀请协作者”的章节。然后:@mintlify 新章节应命名为 “Inviting collaborators”。之后可以继续进行其他迭代。
从代理开始,手动收尾
@mintlify Update the quickstart page to include information about inviting collaborators,接着检出该 branch,按你偏好的方式进行后续修改。
合并功能改动时更新文档
@mintlify This PR adds a new authentication method. Update the docs to include the new auth flow: [PR link]。
从拉取请求生成发布说明
@mintlify 为此 PR 生成发布说明:[PR link]。
生成代码示例
@mintlify 生成一个代码示例,帮助更容易理解认证方法。
审查现有内容
@mintlify Review the API rate limiting section. We changed limits last month
响应用户反馈
@mintlify Users are getting confused by step 3 in the setup guide. What might be making it unclear?.
