๐ค AI Copilot for Godot
A Copilot/Claude-style AI coding agent, right inside the Godot editor.
Chat with an LLM that actually does the work โ it reads your files, writes and refactors GDScript, edits scenes, runs your game, and reads back the runtime errors to fix its own bugs.

The agent writing a pause menu into a real project โ reasoning, code, tool calls, and the plan, all inline in the dock.
โจ Why AI Copilot
Most AI helpers just autocomplete or answer questions in a separate window. AI Copilot is an agent that works your project for you โ from inside the editor, with your approval, using real tools:
- ๐ง Agentic, not just chat โ a multi-round tool-calling loop that reads, edits, runs, and verifies.
- ๐ Bring any model โ 15+ providers out of the box, or point it at a local Ollama/LM Studio server.
- ๐ฉบ Runs and debugs your game โ captures runtime errors (null refs, index errors,
push_error) with file:line + backtrace, not just compile errors. - ๐ก๏ธ Safe by default โ approve mode shows an inline diff before any file is touched, and the agent is sandboxed to your project.
- ๐จ Feels native โ dark-themed chat dock with streaming, markdown, syntax-highlighted code, tool pills, and a live plan.
๐ Features
| ๐ฌ Chat dock | Right-docked sidebar with token streaming, markdown + fenced code, and syntax highlighting. |
| ๐ค Agent loop | Multi-round tool calls โ the model plans, acts, checks its own work, and stops when done. |
| ๐ Inline diffs | Approve mode shows a colored before/after diff for every write_file / edit_file before it applies. |
| ๐ฉบ Runtime debugging | run_and_capture plays the game in a time-limited process and reports runtime errors with backtraces. |
| ๐งฐ Rich toolset | Filesystem, grep/glob, shell, scene building, project settings, screenshots, and a public API to add your own. |
| ๐พ Persistent | Sessions survive editor restarts; auto-compaction keeps long chats within the context window. |
| ๐ Sandboxed | The agent can't touch anything outside res:// โ or inside the plugin's own folder. |
๐ฆ Installation
From the Godot Asset Library (recommended) โ search for "AI Copilot" and install.
Manually:
- Copy
addons/ai_copilot/into your project'saddons/directory. - In Godot: Project โ Project Settings โ Plugins โ enable "AI Copilot".
- Open the dock, click the โ๏ธ menu โ Settings, pick a provider, paste your API key, and hit Fetch models.
That's it โ start typing in the composer at the bottom of the dock.
๐ Providers
Pick a provider from the dropdown and you're set. All speak the OpenAI /chat/completions
protocol, so switching is instant and models can be fetched live from the endpoint.
| Cloud | Gateways | Local |
|---|---|---|
| OpenAI ยท Anthropic ยท Google Gemini ยท DeepSeek ยท Groq ยท Fireworks ยท Together AI ยท xAI (Grok) ยท Mistral ยท Cerebras ยท DeepInfra ยท Moonshot | OpenRouter | Ollama ยท LM Studio |
Plus a generic OpenAI-Compatible (custom) entry with an editable base URL for anything else. Local providers need no API key โ just start the server and click Fetch models.
๐งฉ Extending it
Register your own tools and the agent can call them:
@tool
extends Node
func _ready() -> void:
var api := Engine.get_meta("AiCopilotAPI", null)
if api == null: return
api.registry.register_tool(
"greet_player",
"Salute the player by name.",
{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]},
func(call, args):
return AiCopilotLLMTypes.ToolResult.new("Hello, %s!" % String(args.get("name", "stranger")), false),
false
)
๐ ๏ธ Built-in tools
read_file ยท list_files ยท glob ยท grep ยท write_file ยท edit_file ยท delete_file ยท
rename_file ยท run_command ยท create_scene ยท add_node ยท run_scene ยท run_project ยท
run_and_capture ยท open_script ยท get_open_scenes ยท check_scripts ยท viewport_screenshot ยท
project_get_setting ยท project_set_setting ยท project_add_input_action ยท todowrite
โ๏ธ Settings
Settings are split into a Connection tab (provider, key, model) and an Advanced tab (everything below).
| Key | Default | Notes |
|---|---|---|
| provider | openai | Selected provider id |
| base_url | (provider default) | Editable for custom / local providers |
| model | (none) | Chat completions model; use Fetch models to list |
| vision_model | (none) | Required for the viewport screenshot tool |
| model_context_window | 32000 | For the compaction threshold |
| api_key | (none) | Stored XOR'd with a per-install salt |
| temperature | 0.2 | |
| max_tokens | 4096 | |
| approve_default | true | Mutating tools require approval |
| allow_shell | true | Disable to unregister the shell tool |
| compact_threshold | 0.7 | Conversation size / context window |
| verbose_logging | false | Toggle debug logging |
Upgrading from a pre-provider version keeps working โ your old
endpointis auto-mapped to the matching provider.
๐ค Contributing
Issues and PRs are welcome. This plugin is 100% GDScript with no external dependencies โ
clone it into a project's addons/ folder, enable it, and hack away.
๐ License
MIT โ do whatever you like.
Changelog for version v1.0.1
2026-07-29 08:09:29
No changelog provided for this version.