Observe and act
An agent should base its decisions on confirmed observations. Tool success may mean a request was accepted, not that movement or an interaction has finished.
Read the snapshot
scape_observe returns a protocol version, session ID, revision, timestamp, world identifier (room), connection status, and the agent's confirmed position. It also contains visible players, nearby objects, blocked cells, and active operations. See the response reference for field types and nullable values.
| Field | Use |
|---|---|
self | Confirmed position, floor, name and current speech; can be null while connecting |
players | Nearby public player text, positions, revisions and settled flags |
roster | Public positions for navigation; blocked players are excluded |
scene.objects | Sanitized navigation landmarks and opaque IDs for interactions |
gizmoActivity | Recent nearby participant actions and confirmed steps on walkable gizmos |
movement | Current or last destination operation and status |
pursuit | Follow/approach operation and status |
interacting | Whether a supported object movement interaction is active |
appearance | Current avatar and supported expression names |
Normal conversation is limited by proximity, floor, and block filters. Whole-name summons may cross distance or floors. The roster does not expose ordinary distant conversation. There is no voice, private account information, or raw Gizmo state in an observation.
The in-game currency is called stones. The optional scene.gameFacts fields gemsEnabled and gemRefundHours describe stone availability and the refund period for uncollected drops. These field names and the guide topic IDs gems and gem-recovery remain stable for API compatibility; use stones in player-facing text. scape_guide accepts both stones and the previous name in queries.
settled means text has remained unchanged for at least 650 ms; it does not mean the player pressed Send. To avoid repeated replies, track the last answered textRevision separately for each player ID during continuous visibility in the current session. Clear that player's stored revision when they disappear from players, and clear all stored revisions when sessionId changes: revision numbering restarts when a player becomes visible again. A revision is not a globally unique message ID. Very short-lived bubbles between polls can be missed.
Address one agent
Type a name at the start of your live chat, such as “Vert, play those keys”. The text stays visible above your character as you type, including companion names and @mentions; there is no separate Send mode. Leave the message visible long enough for the companion to observe it. Check its reply or the saved world to see whether requested work finished. A shared display name may be ambiguous; use distinct companion names when addressing one agent.
Observe another player using a gizmo
Match gizmoActivity[].actor to a player ID. An action identifies the emoji, cell and participant action name. A completed die roll also carries the actual face. A confirmed step onto a piano key carries its configured note and, when available, sound. For other results, inspect the object's current participant view. Multiple players can use the same object in quick succession, so the current view can already have changed.
The gateway keeps up to 32 interactions for 30 seconds. Both the player and the cell must be nearby on the same floor. Duplicate submissions produce one event. A teleport, arrival snapshot or gap in movement updates cannot establish which intermediate keys were played. Custom runners can read the snapshot or handle the runtime's gizmo event. Track its sequence within the current session.
Wait efficiently
json
{"afterRevision":12,"waitMs":25000}1
Pass the revision you just saw. A timeout returns the current snapshot even when unchanged. Avoid calling a model on every polling tick: your runner can wait for relevant changes before deciding.
Move and confirm
scape_move_to requests an integer grid cell on the current floor. scape_step requests an adjacent cell and is intended for continuous controllers. Observe movement.status: moving, arrived, blocked, stopped, timed_out, or disconnected.
Both tools return { operationId, commandId }. Match operationId to observation.movement?.id before interpreting its status; movement is null before a movement operation exists. commandId identifies the action for retries. The current implementation uses the same value for both IDs, but they describe different roles. A snapshot can still describe a previous operation immediately after a new request. The move-and-confirm example shows how to wait for the matching operation.
Use scape_follow or scape_approach with a current roster ID for player targets. Follow holds within two cells and can resume when the player moves; approach ends on arrival. Observe pursuit.status: moving, holding, arrived, stopped, lost, blocked, or timed_out.
These tools also return { operationId, commandId }; match the operation to observation.pursuit?.id. Pursuit may be absent or null, so check it before reading its status.
Follow lasts at most five minutes; approach forty seconds. Ten seconds without confirmed progress ends blocked pursuit. Normal holding beside a stationary player is allowed. Departure, blocking, revocation and disconnect stop pursuit.
Use an object
Call scape_inspect_gizmo with {} to discover the installed catalog. Each entry describes its hint, contact behavior, signal ports and optional conveyor role. A belt and a compatible surface can occupy one cell. Entering a musical conveyor plays the configured note and carries the rider onward. Port lists describe a different interaction: a signal travels from a declared output to a compatible input. An observed object with stepTarget: true can be entered using scape_interact from an adjacent cell. A visit stops beside the object. A catalog entry establishes availability for building; inspect the scene to locate a placed instance.
Use scape_inspect_gizmo with a nearby scene.objects[].id to read the public title, description, list items and current choices. Each choice includes a token, label and the fields it accepts. Beside the object, pass its ID, the chosen token and the listed field values to scape_use_gizmo. For a lamp, inspect for Turn on or Turn off. For a voting booth, select an actual ballot option. If a choice includes a confirmation, review it before setting confirmed to true.
A successful use returns the committed scene revision. Inspect again to read the new state. A stale choice requires a fresh inspection. Retry an uncertain request with its original command ID. The runner can approach and operate a control in an ordered task using a use step with target, choice and any required values or confirmed.
Stand beside an observed object and pass its scene.objects[].id to scape_interact. Supported interactions cover Piano, Conveyors, same-world Portals, and existing floor entrances. Observe position and interacting until finished. World entry still follows the agent’s approved room grant.
Players can ask the standard runner to compose or perform on nearby piano keys. Try “Make up an eight-note theme with these keys” or “Play C4, E4, rest for two seconds, then G4.” A melody plan matches pitches to keys on the current floor and enters each key in order. Repeating a pitch requires leaving the key and stepping back onto it. Travel time contributes to the rhythm.
With an owner editing grant, one chat message can request both stages. Try “Build three piano keys tuned to C4, E4 and G4, then play a welcome chime on them.” Other installed gizmos use their declared configuration and participant controls in the same workflow.
A new move, step, interaction, or stop replaces pursuit. scape_stop clears speech and cancels pending intent; a step already sent can still settle.
Retry deliberately
For an uncertain action, reuse its optional commandId with identical arguments in the same session. A changed payload under the same ID fails. Do not retry an old decision after entering a new session. See sessions and each tool schema.
World editing assignments
In the world you own, open World settings → Agent editing access and turn on Can edit for the paired agent. Ask the agent for the change in ordinary world chat on the floor you want to edit. For example, “Make the lamps light up while someone stands on the pressure pad.” The world owner controls grants and assignments. Agents can belong to another account. When several agents have editing permission, include the intended agent’s name. Describe a nearby group, a count or direction, or explicitly request every matching object on this floor. “Near me” refers to where the owner spoke.
In ordinary owner chat, try “Find a reference image of a Japanese rock garden and build a small garden like it east of me.” The standard runner can search Wikimedia Commons without a key, inspect a proportional color grid, and choose scene items to interpret the design. For a direct copy in colored tiles, ask for a mosaic and specify its location and longest side (1–21 cells). Transparent cells stay empty. The runner checks the footprint before submitting a mosaic and includes the source in its completion reply. Set BRAVE_SEARCH_API_KEY in the runner environment to use Brave Image Search as the default for broader web coverage. Search and image availability depend on the provider.
Assignments support placement, selection moves, removal, declared configuration, editor controls and wiring in the installed world. Open Manage agent work to cancel an active assignment. Turn off Can edit to withdraw access. Undo removal is available while the server still holds the removal snapshot. Existing scene changes survive cancellation and revocation. A replacement pairing or a change of world ownership requires fresh approval.
A fresh owner message may include an opaque editRequest. For a direct request to edit, pass it to scape_world_work as {action: "from_chat", request: editRequest}. The gateway verifies the current speaker and uses the observed text and floor. Custom runners watch worldWorkPending and call scape_world_work with action: "inspect". Use the returned job, step, revision and build for a submit. A new inspection can select a map center or an object’s editor controls. Compare nearby objects with floor totals, and search by emoji to locate matching objects elsewhere on the floor. Keep owner assignments separate from untrusted room conversation. The managed runner does this automatically.
Return to a saved build
An owner with editing enabled for the companion can ask “Extend the garden we built yesterday” in a later session. If more than one project fits, answer the companion's clarification. A matching project supplies its previously edited cells and the room checks their current contents. Only a new owner request authorizes more work.
Ask “What did you change in your last build?” or “Undo your last build.” In World settings, open Manage agent work and choose Undo edits for the assignment. Undo checks the entire assignment before restoring it. A later change to an affected cell, wire or author can prevent undo. The most recent 50 finished jobs are retained. History is available for edits recorded by a compatible gateway.
