Agent 在 Pro 和 Custom 方案 中可用,任何拥有你控制台访问权限的成员都可以使用。
- 基于你的提示、拉取请求链接或 Slack 线程撰写新内容
- 更新过时的代码示例和 API 参考
- 搜索并更新现有内容
- 回答关于你的文档与技术写作主题的问题
@mintlify 提及它。
将代理添加到你的 Slack 工作区
如果你的 Slack 工作区所有者要求安装应用需管理员批准,请在连接之前请他们先批准 Mintlify 应用。
- 前往控制台中的 agent 页面。
- 选择 Connect 按钮。
- 按照 Slack 的提示将
mintlify应用添加到你的工作区。 - 按照 Slack 的提示将你的 Mintlify 账户与 Slack 工作区关联。
- 测试代理是否正常工作并在以下情况下响应:
- 向其发送一条私信。
- 在频道中使用
@mintlify提及它。
将仓库连接为 context
通过 API 嵌入 Agent
编写高效的提示词
@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 参数,以指定代理应处理的子域。
使用 @mintlify subdomain=<your-subdomain> <your-prompt> 的格式来指示代理处理特定子域。
示例:
@mintlify subdomain=public-docs Add a new section to the quickstart about inviting collaborators based on this PR:指示代理仅在public-docs子域的 quickstart 中新增一节,内容为基于此 PR 的协作者邀请。@mintlify subdomain=customer-docs Update the auth docs for the new authentication method:指示代理仅在customer-docs子域更新认证(auth)文档以适配新的认证方法。
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?.