Godot Editor Bridge
Live two-way communication between EngineForge and a running Godot Editor instance via HTTP REST. The bridge enables the AI Agent to create nodes, attach scripts, manage resources, and control the editor remotely.
How it works
- When the IDE detects a Godot project (via
project.godot), it auto-deploys a GDScript plugin toaddons/engineforge_bridge/ - The plugin is a
@tool EditorPlugin that starts an HTTP server on ports 27050–27060 - The plugin writes a discovery file to
.godot/engineforge/bridge.json with the active port - The IDE polls this file every 5 seconds to discover the Godot instance
- Once discovered, all communication happens via HTTP request/response
Plugin deployment
The bridge plugin is auto-deployed when EngineForge detects a Godot project. You need to enable it once: go to Project → Project Settings → Plugins and check EngineForge Bridge. After enabling, the plugin uses the @tool annotation, so it loads automatically on every subsequent editor launch.
The port range (27050–27060) is separate from Unity's range (26742–26752) to avoid conflicts when both editors are running.
HTTP endpoints
| Method | Path | Purpose |
|---|
| GET | /status | Health check |
| POST | /command | Execute a single command |
| POST | /batch | Execute an array of commands |
| GET | /capabilities | List all registered tools |
Command categories
Scene
| Action | Description |
|---|
getTree | Get the full node tree of the current scene |
create | Create a new blank scene |
open | Open an existing .tscn file |
save | Save the current scene |
getActive | Get the currently open scene info |
Node
| Action | Description |
|---|
create | Create a node with a given type, name, and parent path |
delete | Delete a node by path |
duplicate | Duplicate a node |
setProperty | Set a property value on a node |
getProperties | Get all properties of a node |
find | Find a node by name or path |
reparent | Move a node to a new parent |
setTransform | Set position, rotation, and scale |
Script
| Action | Description |
|---|
attach | Attach a GDScript file to a node |
detach | Remove the script from a node |
create | Create a new GDScript file |
read | Read the contents of a script |
edit | Edit an existing script |
find | Find a script by name or path |
delete | Delete a script file |
Resource
| Action | Description |
|---|
create | Create a resource (e.g. Material) |
find | Find a resource by path |
createMaterial | Create a new material resource |
setMaterialProperty | Set a property on a material |
getMaterialInfo | Get material properties and shader info |
Editor
| Action | Description |
|---|
play | Start the game |
stop | Stop the game |
pause | Pause the running game |
getState | Check editor state (playing, paused, stopped) |
getScreenInfo | Get viewport/screen resolution info |
Project
| Action | Description |
|---|
getInfo | Get project name, Godot version, and path |
scan | Rescan the project filesystem |
Console
| Action | Description |
|---|
getLogs | Retrieve recent console log entries |
clear | Clear the console log buffer |
Screenshot
| Action | Description |
|---|
capture | Capture a screenshot of the game view |
Animation
| Action | Description |
|---|
play | Play an animation |
stop | Stop an animation |
getInfo | Get animation info |
Smart features
Node ownership
Nodes created via the bridge automatically getnode.owner = edited_scene_root set, ensuring they persist when the scene is saved.
Type instantiation
Node types are resolved via ClassDB.instantiate(). Any built-in Godot node type (Sprite2D, CharacterBody2D, Camera2D, Label, etc.) can be created. Unknown types fall back to a plain Node.
Physics rules
These are critical rules the AI follows when creating physics-based scenes in Godot:
- Every CollisionShape2D must have a shape resource assigned. Creating a CollisionShape2D without setting its
shape property results in a non-functional collision shape. - Shape sizes use full dimensions, not half-extents. A RectangleShape2D with
size: [40, 80] is 40 pixels wide and 80 pixels tall. - For CapsuleShape2D, set height before radius. This is a Godot constraint: height must be ≥ 2 × radius.
- Every physics body needs a CollisionShape2D childwith a shape assigned:
CharacterBody2D (Player)
├── CollisionShape2D (must have shape!)
└── Sprite2D or ColorRect
Scene workflows
Creating a new scene
- Write any scripts needed (GDScript files)
- Call
editor.getScreenInfo to get viewport dimensions - Call
scene.create to create a blank scene - Create all nodes in a single batch for efficiency
- Attach scripts to nodes
- Call
scene.save
Modifying an existing scene
- Call
scene.getTree to see the current node structure - Review what exists before making changes
- Add, modify, or remove nodes as needed
- Call
scene.save
Timeouts
| Setting | Value |
|---|
| Single command timeout | 15 seconds |
| Batch timeout | 60 seconds |
| Discovery poll interval | 5 seconds |
| Event poll interval | 2 seconds |