Godot adapter¶
Source: adapters/godot/addons/agentbridge/.
A self-contained Godot 4.6 addon. Drop it into your project's
addons/ directory, enable the plugin, add an AgentBridge node to
a scene, and launch with AGENTBRIDGE=1 set.
Install¶
- Copy
adapters/godot/addons/agentbridge/into<your-project>/addons/. - Open Project Settings -> Plugins, enable
AgentBridge. - Add a
Nodeto your scene, attachres://addons/agentbridge/agent_bridge.gd. Name itAgentBridge. - Add a sibling
Nodewithagent_state_dump.gd(default state dump returnsplayer+time). - Add a sibling
Nodewithagent_input_driver.gdand callregister_default_actions()from_ready.
Subclass for game-specific state¶
Most games will subclass AgentStateDump:
extends AgentStateDump
class_name MyGameStateDump
func extra_state() -> Dictionary:
return {
"inventory": MyInventory.snapshot(),
"objective": MyQuests.current(),
"director": {"threat": Director.threat_level()},
}
Then point the AgentBridge node's state_dump at your subclass instead of the default.
Verify¶
After install:
AGENTBRIDGE=1 godot --path . --headless res://main.tscn
# In another shell:
python ../../../spec/conformance/conformance_suite.py \
--no-launch --port 7777 \
--token-file <userdata>/agentbridge.token \
--adapter-name godot --adapter-version 0.1.0
Expect 16/16 PASS.