> 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/plugins-and-integrations/convai-unity-sdk/ai-coding-assistant.md).

# AI coding assistant

The Convai AI coding assistant integration adds Convai-specific tools to Unity's official MCP server, so a coding agent can inspect, configure, and diagnose Convai components in your project instead of you wiring them by hand. Use it if you already work with a supported coding agent and want that agent to understand Convai rooms, characters, actions, lip sync, transcripts, and vision. Once connected, you prompt the agent in natural language and review the resulting changes in the Unity Editor.

{% hint style="info" %}
**Before you begin:** The integration requires <code class="expression">space.vars.unity\_recommended\_version</code> or newer and a compatible `com.unity.ai.assistant` package. See [Set up your first coding agent](/api-docs/plugins-and-integrations/convai-unity-sdk/ai-coding-assistant/quick-start.md) for the full prerequisite check and setup walkthrough.
{% endhint %}

### What the integration adds

Unity's official MCP server, provided by the `com.unity.ai.assistant` package, gives a coding agent generic tools for GameObjects, scripts, assets, and scene operations, but no knowledge of Convai components. The Convai Unity SDK adds 20 SDK-aware tools with a `Convai.*` name prefix — for example `Convai.ConfigureCharacter`, `Convai.ConfigureLipSync`, and `Convai.DiagnoseConversation` — that read and mutate only Convai components such as `ConvaiManager`, characters, actions, lip sync, transcripts, and narrative sections. Unity MCP tools continue to own generic GameObjects, scripts, and scene operations. Convai tools never accept or return API keys, and mutating Convai tools use Unity's Undo system instead of saving scenes automatically.

### Supported coding agents

The integration supports five coding agents: Codex, Claude Code, Cursor, Gemini, and VS Code Copilot. Installing support for an agent writes a managed Convai instruction block into that agent's own instructions file — `AGENTS.md` for Codex, `CLAUDE.md` for Claude Code, `.cursor/rules/convai-unity-sdk.mdc` for Cursor, `GEMINI.md` for Gemini, and `.github/copilot-instructions.md` for VS Code Copilot — pointing the agent at the packaged `convai-unity-sdk` skill. See [Supported coding agents](/api-docs/plugins-and-integrations/convai-unity-sdk/ai-coding-assistant/supported-coding-agents.md) for the exact file paths and per-agent install behavior.

### Connect a coding agent to your project

Open **Convai > AI Coding Setup** in the Unity Editor menu to start. This opens the **AI Coding** section of the Convai Editor window, whose **Setup Health** card checks <code class="expression">space.vars.unity\_recommended\_version</code> or newer, a compatible `com.unity.ai.assistant` package, the packaged Convai skill, and the 20-tool contract, with inline **Fix** buttons for any check that fails. Open **Project Settings > AI > Unity MCP Server** — directly, or through the **Open Unity MCP Server Settings** button in the same section — to accept Unity's terms for the MCP Server feature and confirm which MCP clients are connected to your project. Then click **Install** next to a supported coding agent in the **Managed Project Instructions** card to write its managed instruction block. See [Set up your first coding agent](/api-docs/plugins-and-integrations/convai-unity-sdk/ai-coding-assistant/quick-start.md) for the full walkthrough.

### What you can ask a connected agent to do

With a coding agent connected, prompt it in natural language instead of wiring components manually. Typical requests include:

* Build a conversation scene with a player and a character
* Add chat UI to display the conversation transcript
* Switch between push-to-talk and hands-free conversation input
* Add objects to the scene for a character to reference
* Enable vision so a character can see the scene

The agent uses Convai tools for Convai components and Unity's own MCP tools for generic GameObjects, scripts, and scene operations, then reports which instance IDs it changed. See [MCP tools reference](/api-docs/plugins-and-integrations/convai-unity-sdk/ai-coding-assistant/mcp-tools-reference.md) for the complete list of Convai tools available to the agent.

### AI coding assistant pages

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Set up your first coding agent</strong><br>Connect a coding agent to your Unity project and verify the setup end to end.</td><td><a href="/pages/z66YD8D1BvUpEXCOjXz9">/pages/z66YD8D1BvUpEXCOjXz9</a></td></tr><tr><td><strong>Supported coding agents</strong><br>Find the exact instruction file path and install behavior for each of the five supported agents.</td><td><a href="/pages/4fzoj3RtQTbbG69I9A9p">/pages/4fzoj3RtQTbbG69I9A9p</a></td></tr><tr><td><strong>MCP tools reference</strong><br>Reference every Convai tool exposed to a coding agent, including its purpose and default enabled state.</td><td><a href="/pages/Gd4pCWmZTgamoBbmr0R2">/pages/Gd4pCWmZTgamoBbmr0R2</a></td></tr><tr><td><strong>Troubleshoot the AI coding assistant</strong><br>Fix setup, tool registration, and agent connection failures.</td><td><a href="/pages/6KguvwDVvWMYC4R123tO">/pages/6KguvwDVvWMYC4R123tO</a></td></tr></tbody></table>


---

# 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/plugins-and-integrations/convai-unity-sdk/ai-coding-assistant.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.
