SDK Install
Recommended 0.1v workflow: set World Rules in Vibe Console, then let your game send events and react to live NPC state updates.
Copy files into your Godot project
Inside your Godot project, create this folder if it doesn’t exist:
res://addons/chronos/
Then copy these files into res://addons/chronos/:
Chronos.gd ChronosRESTClient.gd ChronosSSEClient.gd ChronosTypes.gd plugin.gd plugin.cfg
Keep your project config script here (developers only edit credentials):
res://scripts/chronos_setup.gd
Enable the plugin
- • Open Project → Project Settings → Plugins
- • Find Chronos and set it to Enabled
This makes the SDK available to your game code.
Configure your world
Recommended: add Chronos as an AutoLoad so you can call it from anywhere.
- • Open Project → Project Settings → AutoLoad
- • Add these paths and enable them:
res://addons/chronos/Chronos.gd
res://scripts/chronos_setup.gd
Recommended setup script (chronos_setup.gd):
extends Node
func _ready():
print("SETUP: running chronos_setup.gd")
Chronos.configure(
"https://YOUR-VERCEL-URL",
"CHRONOS_xxxxx",
"game_id", # example: "village_reputation"
"npc_id" # example: "guard_1"
)
# Plug-and-play runtime:
# auto brain = on
# debounce = 2 sec
# max_events = 50
Chronos.configure_runtime(true, 2, 50)
Chronos.start()
print("SETUP: Chronos configured + started")Call the SDK in your game code
This is the official 0.1v flow: game sends events → Chronos stores memory → Brain derives NPC state → game reacts to updates.
Your game should listen for updates from Chronos. When the Brain processes world events, the updated NPC state will be pushed back to the game.
Chronos.npc_state_updated.connect(_on_npc_state_updated)
# Example handler for NPC updates
func _on_npc_state_updated(row):
var npc_id = row["npc_id"]
var state = row["state"]
print("NPC state updated:", npc_id, state)
# Example in a real game:
func _on_npc_state_updated(row):
var state = row["state"]
if state["mood"] == "hostile":
guard_attack_player()
if state["mood"] == "friendly":
guard_allow_entry()
When something important happens in your game, send it to Chronos.
Chronos.append_event( "player_1", event_type, payload, true )
Chronos.append_event(
"player_1",
"player_lied_to_guard",
{"context":"conversation"},
true
)If a scene loads after a restart, you may want to fetch the current NPC state once.
Chronos.get_npc_state("guard_1")# Manual Brain run (debug / admin / testing)
Chronos.brain_think(50)
# Optional: set rules from game (advanced)
# Recommended MVP workflow: set rules in Vibe Console instead.
Chronos.set_rules("IF player_lied_to_guard THEN mood=hostile")
# Optional: read rules (debug)
Chronos.get_rules()For a complete working integration example (Godot project, gameplay scripts, live event → Brain → state flow), review the official Demo 0.1v source code on GitHub.
View Demo Source on GitHubCommon issues
- • Plugin not showing? Confirm
plugin.cfgandplugin.gdare insideres://addons/chronos/ - • Requests failing? Ensure
base_urlstarts withhttps://and your API key is valid - • Live updates not arriving? Confirm
Chronos.start()is running and SSE connects successfully - • State changes in Console but not in game? Confirm your game uses the same
world_idandnpc_id - • Need manual control? Use
brain_think()for debug/admin only
