Skip to main content
  • The control channel carries JSON-RPC 2.0 objects. Requests originate from either side; notifications (no id) are used for status and event pushes. [AWP-CTL-001]
  • Method names are namespaced: initialize, ping, world.*, session.*, task.*, obs.*, action.*, safety.*. Unknown methods MUST return JSON-RPC -32601. [AWP-CTL-002]
  • Per-direction ordering on the control channel MUST be preserved by the binding; recipients MUST NOT assume cross-direction ordering, nor ordering relative to any other channel (AWP-TRN-007). [AWP-CTL-003]
  • Heartbeats. ping is a JSON-RPC request either side may send, carrying { origin_ns }; its result is the pong, { origin_ns, receive_ns, transmit_ns }, and every exchange is a clock-synchronization sample (timestamps and clocks, AWP-CLK-007/008). Interval, response bound, and loss detection are normative in Liveness and safe state (AWP-SAF-001/002). [AWP-CTL-004]
  • Reconnection. A lost control connection moves the session to Suspended and does not terminate it for reconnect_window_ms, declared in session.ready. The agent reconnects, completes initialize, and calls session.resume with its session token and last_status_seq; the world replays per status delivery and re-issues stream_endpoints, from which the agent re-establishes its stream connections (AWP-TRN-008). Embodiment behavior during the gap is governed by the world-side watchdog, not by the reconnect window (AWP-SAF-003..008): motion stops at watchdog_ms, and resumption never restarts it. [AWP-CTL-005]
  • Batch requests MUST NOT be used. [AWP-CTL-006]
  • One session per connection. A control connection carries exactly one control channel and at most one session. A second session.open on a connection that already holds a session MUST fail with AWP_SESSION_EXISTS; to run several sessions against one world, open several connections. Multiplexing is deferred to a future RFD. [AWP-CTL-007]

Status delivery and replay

  • Every action.status, world.event, and session.state notification carries status_seq, a per-session integer that starts at 1 and increases by exactly 1 with each notification of the three kinds and with each transition first reported in an action.submit or action.cancel result, which carries that transition’s status_seq. session.resume carries last_status_seq, the highest status_seq the agent has processed (0 if none); the world MUST replay, in order, every status_seq > last_status_seq, then continue live. A transition first reported in an action.submit or action.cancel result is replayed as an action.status notification carrying the same status_seq, since the agent may never have received the result. The session.resume result carries replay_to_status_seq, the highest status_seq assigned before resumption; the replay is complete when the agent has processed it. Delivery is therefore at-least-once; status_seq is unique within a session and receivers deduplicate on it (AWP-LIF-009). All notifications are replayed, not only terminal statuses, so a suspension is reported to the agent when it returns. [AWP-CTL-008]
  • Acknowledgement and retention. An agent acknowledges delivery by carrying last_status_seq in session.resume and, optionally, in its own ping params. Worlds MUST retain every status_seq above the highest acknowledged value for as long as the session exists, and MAY discard acknowledged ones. An agent that never acknowledges on ping is replayed from its session.resume value, so worlds serving such agents retain the whole session’s notifications. [AWP-CTL-010]
  • 64-bit integers. ts_mono_ns, ts_sim_ns, ts_send_ns, received_ts_mono_ns, basis_ts_mono_ns, valid_until_ns, origin_ns, receive_ns, transmit_ns, seq, tick, status_seq, expires_at_ns, and every other 64-bit field are encoded as JSON integers and, in JSON and in binary frames alike, MUST NOT exceed 2^53 − 1. A receiver that observes a larger value MUST answer the request that carried it, if any, with AWP_INTEGER_RANGE, and MUST end the session: a world closes the session as on session.close with session.state reason protocol_error and closes the connection; an agent sends session.close and closes the connection without awaiting the result. Either side closes it with WebSocket close code 1002 and reason AWP_INTEGER_RANGE. Senders MUST NOT encode these fields as strings or floats. [AWP-CTL-009]
See the API Reference for the envelope and every method.