> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/ai-coding-assistant/supported-coding-agents.md).

# 受支持的编码代理

AI 编码设置支持的五种编码代理参考，包括每个代理的上下文文件、终端支持和选项。

`EConvaiMcpAgent` 列出了五个编码代理，它们 **设置 AI 编码（MCP）** 可以配置： `Claude Code`, `Cursor`, `VS Code`, `Gemini`，以及 `Codex`。使用此参考可查找每个代理对应的确切上下文文件、终端行为和代理特定选项。

### 代理与上下文文件

| 代理            | 上下文文件                             | 位置                  | 终端配置          | CLI 命令   |
| ------------- | --------------------------------- | ------------------- | ------------- | -------- |
| `Claude Code` | `CLAUDE.md`                       | 项目根目录               | 可用            | `claude` |
| `Cursor`      | `.cursor/rules/convai.mdc`        | `.cursor/rules/` 目录 | 不可用（GUI 应用）   | —        |
| `VS Code`     | `.github/copilot-instructions.md` | `.github/` 目录       | 不可用（GUI 应用）   | —        |
| `Gemini`      | `GEMINI.md`                       | 项目根目录               | 可用            | `gemini` |
| `Codex`       | `AGENTS.md`                       | 项目根目录               | 可用；下面还有自动批准选项 | `codex`  |

`Claude Code`, `Codex`，以及 `Gemini` 是 CLI 代理——设置对话框中的终端选项仅对这三个启用，并会写入精确的 `claude`, `codex`，或 `gemini` 命令作为终端的启动行。 `Cursor` 和 `VS Code` 是 GUI 应用，因此选择其中任意一个时都会禁用终端选项。

### primer 如何写入上下文文件

当你启用 **将 Convai 指令添加到代理的上下文文件**时，插件会将 Convai primer 从 `Resources/AgentPrimer/ConvaiAgentPrimer.md` 复制到代理的上下文文件中，并用两条哨兵注释包裹：

```html
<!-- >>> Convai primer (managed by Convai; edits between sentinels are overwritten) -->
...primer content...
<!-- <<< Convai primer -->
```

再次使用相同代理运行设置时，会找到现有的由哨兵分隔的块，并且只替换哨兵之间的内容，因此你在块外添加的内容会被保留。如果上下文文件中尚不存在 Convai 块，则由你在对话框中选择的写入模式决定会发生什么：

| 写入模式 | 行为                          | 默认值 |
| ---- | --------------------------- | --- |
| 追加   | 将由哨兵分隔的块追加到文件末尾，同时保留任何现有内容。 | 是   |
| 替换   | 仅用由哨兵分隔的块覆盖文件。              | 否   |

### Codex 自动批准

`Codex` 有一项其他代理没有的选项： **让 Codex 无人值守运行，不显示批准提示（绕过 Codex 的沙箱）**，默认关闭。启用后会将终端启动行从 `codex` 为 `codex --dangerously-bypass-approvals-and-sandbox`更改为此，因此 Codex 会在没有批准提示和沙箱的情况下执行每个命令。此选项仅在 `Codex` 是所选代理时显示，并且只有在同时启用终端选项时才会生效。

### 下一步

{% content-ref url="/pages/6c5b338b9a5aeacf26b73bf6839fa355e17f8687" %}
[AI 编码助手](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/ai-coding-assistant.md)
{% endcontent-ref %}

{% content-ref url="/pages/50ad5ea121945ebc9be68f274b2be07d5ff35a2d" %}
[AI 编码助手快速入门](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/ai-coding-assistant/quick-start.md)
{% endcontent-ref %}

{% content-ref url="/pages/7c626321bfe9ecc73b233eae6e2ceeeb539c83b0" %}
[Convai AgentSkills](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/ai-coding-assistant/convai-agent-skills.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/ai-coding-assistant/supported-coding-agents.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
