- app/: app demo (Kivy/buildozer) da API do robo - software/: servidor RoboMovel (SLAM, profundidade, navegacao) e firmware da base movel (movido de firmware/) - simulacao/: projeto Godot do robo e script de lancamento servidor + simulacao - modelos/: planta do 5o andar do bloco D, cena Blender do corredor e modelo real do robo - partes/mdf/: chapas identificadas e nesting da base do robo (DXF/SVG/FCStd) - projeto/render, relatorio/imagens, slides: renders finais e apresentacoes de progresso - ferramentas/scripts: encaixe de chapas, planta do bloco D e render do corredor no Blender - .gitignore: ignora backups do Blender/FreeCAD e .godot/ Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
8.6 KiB
Claude Godot — user manual
An AI coding agent that lives in a dock in the Godot editor. Pure GDScript, no native code, so it runs wherever the editor does — including the Android editor build on phones and Quest.
Setting up
- Copy
addons/claude_godotinto your project'saddons/folder. - Enable it under Project → Project Settings → Plugins.
- Open the Claude dock, usually docked on the right.
- Pick a provider, then paste an API key or set the environment variable the
placeholder names (e.g.
ANTHROPIC_API_KEY) before launching the editor.
On Android and Quest there is normally no shell to set environment variables
in before the editor starts, so the key field is the practical route there.
Keys are saved to user://claude_godot/preferences.csv in plain text —
outside the project, so never committed, but plain text on disk.
The dock, top to bottom
Session dropdown — start a new chat or reopen a saved one, newest first. 🗑 deletes the one shown, after a confirmation naming the file.
Provider and model — the model box filters a list of known models as you type, and accepts anything you type that isn't in it, which matters for Ollama and OpenRouter where the list is yours. Under it: where keys are stored, and the cost per million tokens when it's known.
Connect to Claude Code (MCP) — starts a local MCP server so Claude Code, or any MCP client, can use this project's tools directly. See below.
Transcript — your messages, the model's replies, its commentary, and one card per tool call. 📋 copies any entry.
Token line — input and output for the session, plus cached and reasoning tokens when the provider breaks them out, and what it says it actually charged. OpenRouter reports cost on every response; a direct provider usually doesn't, and then nothing is shown rather than a guess.
Activity line — while a turn runs: a spinner, elapsed seconds, and a running token count.
Task strip — appears above the input box only while background tasks
exist. One row per task, with its state glyph, step count and elapsed
seconds; click to expand the brief and the tail of its trail, ✕ to stop a
running one. See task.
Input row — 📎 attaches an image, Send, Stop. Above it, a rough estimate of what the message you're typing will cost.
Reading the transcript
Tool cards collapse to one line: a status glyph (● running, ✓ done,
✗ failed), the tool name, its main argument, and a short stat — +12 −3
for a write, 18 entries for a listing. Click to see the full arguments and
that call's output; a file write shows a coloured diff, an image result shows
the image.
Thought panels collapse to ▸ thought · N words. A model working through
a real task produces far more commentary than answer, so it stays folded, but
it is what explains the tool call that follows.
While a turn is running
Stop aborts the request in flight.
Sending queues. A message typed mid-turn shows as ⏳ queued and goes out
when the turn ends, one per turn. It can't simply be appended — a user
message landing between a tool call and its result makes the next request
invalid. ✕ takes it back out of the queue and into the input box.
Turns are capped at max_steps_per_turn model calls (default 25). On
hitting the cap the agent makes one more call with no tools offered, so the
model has to answer in plain text and tell you where it got to, rather than
the turn ending silently.
What the agent can do
Read, list, write, edit, delete, move and copy files; run shell commands;
fetch URLs;
read the editor and project logs; capture the editor; read and change project
and editor settings; enable addons; reload the filesystem, a scene or the
editor; move between its own chat sessions; compact its own context; run
GDScript snippets with eval; and run
background tasks. Each is documented in tools.
Five are worth knowing about before you use them:
remoteis not SSH and on Android needs a small bridge script running next to the shell you want. Seeremote.set_editor_settingis global — it affects every project opened with this editor install.reloadwith scopeeditorrestarts the whole editor, ending the turn and closing the dock. Seereload.web_fetchblocks the editor while the request runs, likeremote. It is for reading a page, not downloading one. Seeweb_fetch.evalruns GDScript with no sandbox and no timeout — a loop that never ends hangs the editor. Seeeval.
task starts a second agent run working the same project at the same time
as the chat. It keeps going between turns, so it suits slow, well-defined
work — but nothing waits for it, and it spends tokens on its own until it
finishes or is stopped. See task.
When the context fills up
A long session eventually approaches the model's context window. Rather than let the next request fail, the agent compacts automatically at 80% of the window: it asks the model to summarize the conversation, replaces the earlier messages with that summary, and keeps the most recent turns verbatim. The dock shows a line saying how much was freed.
The user can also ask for it in so many words ("compacta o contexto"), and
the model calls compact with an optional instruction
about what to keep. If a request is rejected for being too long anyway, the
agent compacts and retries before falling back to dropping the latest tool
output.
The window is not something the addon can read from the provider, so it comes
from context_window below — point it at the model's real size for the
automatic trigger to fire at the right moment. auto_compact=false turns the
automatic trigger off and leaves only the tool.
Memory
The agent keeps notes across sessions in user://.claude-godot/memory/, one
file per memory plus a MEMORY.md index that is injected into every system
prompt. The spec it follows is in the prompt itself; the short version is
that memories carry a type (user, feedback, project, reference), that
feedback and project ones explain why so a later session can judge edge
cases, and that things the code already answers don't belong there.
Connecting Claude Code
Connect to Claude Code (MCP) starts a server on 127.0.0.1:8787 and
copies the command to add it:
claude mcp add --transport http claude-godot http://127.0.0.1:8787/mcp
Claude Code then uses the same tools this dock does, and its calls appear in
the transcript as cards. On Android 127.0.0.1 is shared between apps, so
Claude Code running in Termux reaches the editor with no network setup.
The server is single-client, loopback-only, with no SSE and no session id — fine for local use, not hardened for anything else.
Settings
user://claude_godot/preferences.csv, one setting,value row each:
| Setting | Default | |
|---|---|---|
preferred_provider |
anthropic |
Which provider opens |
model:<provider> |
per CSV | Model per provider |
api_key:<provider> |
empty | Key per provider, plain text |
max_steps_per_turn |
25 |
Model calls per turn; 0 removes the cap |
streaming |
true |
false waits for whole responses |
shell_bridge |
127.0.0.1:8799 |
Where remote sends commands |
context_window |
128000 |
Context size used for auto-compaction; context_window:<model> overrides per model |
auto_compact |
true |
Compact automatically near the context limit |
request_timeout |
0 |
Seconds to wait on a provider request; 0 means no timeout |
Providers and models come from data/providers.csv instead — one row per
model, carrying the endpoint, protocol, API key env var, whether the model
takes images, and cost. Adding a model, or a provider on a protocol that's
already supported, is a row there and nothing else.
When something goes wrong
Errors name what failed: DNS, TLS, a refused connection or a timeout are reported as such, and a rejected call reports the provider, model, HTTP status and the provider's own message.
If a reply says the context is too long, the agent drops the tool output
that overflowed it and retries once — the conversation keeps working rather
than failing on every message from then on. Reading a large file in parts
with offset/limit avoids it in the first place.
If responses hang or arrive malformed, set streaming to false in
preferences — that falls back to waiting for whole responses and is the first
thing to try.