Prerequisites
- macOS or Linux
- A Rust toolchain (rustup)
- A clone of the engine repository
1. Start the server
The agent API is served by the headless host —euca-studio with no window. From the
repo root:
localhost:3917. Leave it running and open a second terminal for the commands
below.
Check it is up:
The headless host boots the loaded project (a full world), so your real
entity_count, tick, and
the entity ids your spawns return will be higher than the small illustrative numbers shown below — the flow
is identical, only the ids differ. (For an empty world, build your own host that loads no level.)2. Build a world
Spawn two entities and add a rule. Entity A gets a velocity and aKinematic
physics_body so a system actually moves it; entity B is a stationary target on the other
team.
3. Play it
Step the simulation forward, then read the world back:observe returns the whole world — the loaded project’s entities plus the two you spawned. Picking
your two rows out of it, entity A has advanced along +x (30 ticks at 1 unit/s, with dt = 1/60) while B
has not moved (ids shown illustratively as 1/2 — yours will be the higher ids your spawns returned):
observe dump is the whole world as a flat table — see
The world as a table. (Below, T is whatever tick the world is at when you
fork; the numbers diverge relative to it.)
4. Experiment on a fork
Fork the world, run a what-if only on the copy, and confirm the main run never moved.The fork advanced 100 ticks while the main world stayed exactly where it was. That clean
divergence — the same systems running on an isolated copy — is what makes a fork a true
counterfactual.
Going further
- Diff two moments — snapshot the world with
POST /snapshot, change it, snapshot again, and compare withGET /snapshot/diff(it compares game-state summaries: counts, phase, roles). - Save and replay — export the whole world as a scenario with
GET /scenarioand rebuild it withPOST /scenario. See Determinism & replay. - Full API — every endpoint, request, and response is in the API reference.
- Grade a world model — the same engine doubles as an exact answer key; see World-model evaluation.