Files
mintlify[bot] 384ee2150b Documentation quality check: fill gaps in recently updated pages (#6685)
* docs: fill gaps in recently updated pages

* docs: translate gap-fill edits to es, fr, zh

* Apply suggestions from code review

Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>

---------

Co-authored-by: mintlify[bot] <109931778+mintlify[bot]@users.noreply.github.com>
Co-authored-by: Ethan Palm <56270045+ethanpalm@users.noreply.github.com>
2026-07-21 10:12:18 -07:00

109 lines
5.8 KiB
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "什么是 agent?"
description: "使用 Mintlify agent 自动化文档更新。可通过 Slack 消息、pull request 或 API 调用触发变更。"
keywords: ["automation", "automate", "AI", "autoupdate", "maintenance"]
---
<Info>
agent 需要 [Pro 或 Enterprise 方案](https://mintlify.com/pricing?ref=agent)。
</Info>
agent 是一款 AI 工具,会根据你的提示,为文档创建包含建议更改的拉取请求 (PR;亦称“合并请求”/Merge Request) 。当你发送请求时,agent 会:
* **调研**:搜索并阅读你现有的文档、所有已连接的代码仓库、相关上下文以及网络内容。
* **规划**:为复杂的文档工作创建结构化任务清单。
* **撰写**:生成或更新内容,遵循写作规范和最佳实践。
* **验证**:运行 Mintlify 命令行界面 (CLI) 检查,确保文档可以正确构建。
* **发布更改**:打开一个包含建议更改的拉取请求 (PR;亦称“合并请求”/Merge Request) 供你审核,或直接向你的部署 branch 提交,具体取决于你的[审核流程设置](/zh/agent/index#choose-how-the-agent-publishes-changes)。
<div id="how-to-use-the-agent">
## 如何使用 agent
</div>
你可以通过以下方式向 agent 发送提示词:
- **Slack**:在 agent 所在的任何频道中提及 `@Mintlify`,或直接向该应用发送私信。参见[将 agent 添加到 Slack](/zh/agent/slack)。
- **控制台**:在 [Mintlify 控制台](https://app.mintlify.com)中打开 agent 面板以开始新对话。
- **自动化**:按计划或基于事件触发 agent。参见[自动化](/zh/automations/index)。
<div id="what-you-can-do-with-the-agent">
## 你可以用智能助手做什么
</div>
使用智能助手可以:
* 根据你的提示词、拉取请求 (PR;亦称“合并请求”/Merge Request) 、Slack 线程或文件附件撰写新内容。
* 根据新功能或 API 变更更新现有文档。
* 处理并插入来自 Slack 附件的图片、图表和其他文件。
* 在你的文档中搜索并修改代码示例和 API 参考。
* 引用任何已安装 Mintlify GitHub 应用的仓库中的源代码。
* 通过自动化处理文档维护工作。
* 回答与你的文档和技术写作相关的问题。
* 处理代码审查反馈并维护文档质量。
* 在知识从 Slack 对话和拉取请求中流失之前,将其记录下来。
* 高效地在多个文件和目录之间导航并协调更改。
<div id="connect-your-github-account">
## 连接你的 GitHub 账户
</div>
默认情况下,代理会以 Mintlify 机器人身份创建拉取请求 (PR;亦称“合并请求”/Merge Request) 。若要将拉取请求归属到你的账号,请在控制台的 [My profile](https://dashboard.mintlify.com/settings/account) 页面连接你的 GitHub 账户。
<div id="choose-how-the-agent-publishes-changes">
## 选择 agent 如何发布更改
</div>
默认情况下,agent 会为每次更改打开一个拉取请求,以便你的团队在更改发布前进行审核。如果你的部署由 Mintlify 托管,agent 会将更改直接提交到你的部署 branch,使其立即发布。
对于连接到你自有 Git 提供商的部署,你可以在控制台 [Agent](https://app.mintlify.com/products/agent) 页面的 **Review process** 设置中更改 agent 发布更改的方式:
- **Create a pull request**:agent 在新的 branch 上提交更改,并针对你的部署 branch 打开拉取请求。当你希望有人在更改发布前进行审核时,请使用此选项。
- **Push to main**:agent 直接向你的部署 branch 提交更改,agent 完成后更改立即发布。当你信任 agent 无需审核即可发布时(例如在预发布环境的部署中),请使用此选项。
<Note>
如果你的部署 branch 设置了阻止直接推送的分支保护规则,**Review process** 设置会被隐藏,agent 将始终打开拉取请求。
</Note>
<div id="connect-repositories-as-context">
## 将仓库连接为上下文
</div>
Agent 只能访问你通过 Mintlify GitHub 应用连接的仓库。你可以在 agent 面板的 **Settings** 中,或在 [GitHub 应用设置](https://github.com/apps/mintlify/installations/new) 中配置 agent 可访问的仓库。
<div id="use-ai-tools-alongside-the-agent">
## 与 agent 配合使用 AI 工具
</div>
agent 通过拉取请求异步工作,但你也可以在本地使用 Cursor 或 Claude Code 等 AI 编码工具进行快速、迭代式编辑。安装 Mintlify [skill](/zh/ai/skillmd) 并连接 [MCP 服务器](/zh/ai/model-context-protocol),让你的编辑器拥有与 agent 相同的上下文。
要让外部代理通过 MCP 工具调用直接编辑你的内容,请将其连接到 [Mintlify MCP 服务器](/ai/mintlify-mcp)。
<Prompt description="为 AI 编码工具安装 Mintlify skill 和 MCP 服务器。" actions={["copy", "cursor"]}>
安装 Mintlify skill,以获取关于 Mintlify 项目结构、组件和文档最佳实践的上下文:
npx skills add https://mintlify.com/docs
然后添加 Mintlify Docs MCP 服务器以访问文档搜索。https://mintlify.com/docs/mcp
然后添加 Mintlify MCP 服务器以访问 dashboard 和其他 Mintlify 专属工具。https://mcp.mintlify.com
</Prompt>
<div id="next-steps">
## 后续步骤
</div>
<Card title="连接 Slack" horizontal icon="slack" href="/zh/agent/slack">
将 agent 添加到你的 Slack 工作区。
</Card>
<Card title="自定义行为" horizontal icon="wrench" href="/zh/agent/customize">
使用 `AGENTS.md` 文件配置 agent。
</Card>
<Card title="编写高效的提示词" horizontal icon="pen" href="/zh/agent/effective-prompts">
使用更聚焦的提示词以获得更好的效果。
</Card>
<Card title="使用自动化实现自动化" horizontal icon="refresh-cw" href="/zh/automations/index">
使用自动化处理重复性任务和文档维护。
</Card>