"0.1" but are not wire-compatible with each other (before 1.0); each entry lists its wire-visible changes. Revisions are tagged spec-v0.1-draft.N in git.
The game profile no longer requires snapshot/restore.Wire-visible changes. None.Clarifications
- Snapshot in the game profile. The game profile no longer requires snapshot/restore. A world claims it when it advertises
snapshot, and AWP-REP-002 binds those worlds as before. This lets game engines without exact restore claim the profile. - Chunk start. AWP-GAM-002 now starts a chunk at the world’s first input update after admission, since worlds apply input at discrete steps.
- Trace. The replacing-device-input trace reports the replaced chunk at 4 of 6 slots, the slots completed by the boundary where it is preempted.
Device-level input for game worlds.Wire-visible changes
- Device input. The game profile reserves the action type
input_chunk: keyboard, mouse, and gamepad state in fixed-length slots, with normative params inschemas/v0.1/profiles/input-chunk.schema.json. A world that declares it follows the declaration and narrowing, slot, replacement, and release rules (new AWP-GAM-001..004). A replacement takes over at the next slot boundary, and a chunk that ends without one releases everything, trading continuity for safety.
Rules for worlds that bind several embodiments or several lockstep sessions, found by giving the reference world a second, shared embodiment, and requirement IDs for normative sentences that had none.Wire-visible changes
- Barrier calls. Under
tick_authority: "barrier", aworld.tickrecords its session’s readiness forcountadvances. The world advances while every bound non-observer lockstep session, suspended ones included, has advances left, and answers each call after its last advance. A session has one pending call; another fails withAWP_BUSY. A pending call is discarded with a lost connection, fails withAWP_TICK_MISMATCHwhen a reset or restore moves the tick, and fails withAWP_SESSION_EXPIREDorAWP_TICK_NOT_AUTHORIZEDwhen its session closes or becomes an observer (new AWP-TIM-014). - Multi-bind. A submission without
embodiment_idin a multi-bind session fails with-32602, and one whose type the named embodiment does not offer withAWP_FORBIDDEN(AWP-EMB-005). A takeover names the one embodiment it takes;takeoverwithembodimentsfails withAWP_EMBODIMENT_UNAVAILABLE. A holder bound to several embodiments keeps the others and loses the transferred one’s action types and channel grants; it becomes an observer only when none is left (AWP-EMB-003). - Events about embodiments.
e_stop_engaged,e_stop_released,envelope_violation,safe_state_entered,safe_state_exited, andembodiment_transferredname their embodiment indetail.embodiment, and an occurrence that concerns several embodiments is reported once per embodiment (new AWP-EVT-004). Safe-state entry leaves a shared embodiment that another session’s action is executing on to that session (AWP-SAF-004). - Tick grants. A world that may bind several lockstep sessions under
any_sessiongrantstickto at most one session at a time, as AWP-PRM-005 has it, rather than to exactly one (AWP-MA-005). - Reserved extension types. Senders MUST NOT emit types
0x00or0x04–0x7F, now under AWP-DAT-006.
- New SHOULDs with IDs: a streaming action’s status carries
streamat least once per second (AWP-CMD-009), and a robotics-profile world offers servo- or torque-level control on command channels (AWP-ROB-008). - The scene channel is optional; its rules apply to a world that offers one.
- Approval requests go to the world’s approver connections on the control channel (AWP-APR-001).
Standing approvals, and the answers to what the first independent implementation, a TypeScript agent written from the specification alone, found unclear.Wire-visible changes
- Standing approvals. A world declares support with
safety_policy.standing_approvals. An approver grants one alongside an approval,standing: { scope: { type, predicate }, expires_at_ns }— renamed fromexpires_at— scoped to the requesting session and its clock and ending with it. Submissions within it are admitted without approval, and theiraction.submitresult carries the grant’sapproval_id. A world refuses a standing approval withAWP_PARAMS_INVALIDif it does not declare them, if the decision isdeny, if the scope’s type is not the request’s, or if the predicate is not a JSON Schema (AWP-APR-004). - Out-of-range integers. The 2^53 − 1 bound applies to binary frames too. A receiver answers the request that carried a larger value with
AWP_INTEGER_RANGE; a world closes the session with the newsession.statereasonprotocol_error, and an agent sendssession.closewithout awaiting its result. Either side then closes the connection with WebSocket close code 1002 and reasonAWP_INTEGER_RANGE(AWP-CTL-009). - Malformed frames. A frame is malformed if its magic, version, or length is wrong, its extension block is inconsistent, a type repeats, or it carries
resyncwithoutkeyframe. The receiver drops it and, on a stream connection, closes the connection with close code 1002 and reasonAWP_MALFORMED(new AWP-DAT-010, AWP-TRN-013). Extension types0x00and0x04–0x7Fare reserved. New vectors: an unknown version, trailing bytes, and resync without keyframe. - Lockstep resumption. After the replay, the world sends a resync keyframe carrying the current tick on every subscribed per-tick channel,
latest-winsones included, which also completes an advance whose frames were lost with the connection (AWP-TIM-009, AWP-TRN-008). - Transitions are reported once. A transition an
action.cancelcauses is reported in its result, every other one as anaction.statusnotification (AWP-LIF-001);status_seqcounts both (AWP-CTL-008). - Defaults. A submission that selects no preemption policy gets the first its type declares (AWP-PRE-001). After
world.resetorworld.restore, the fresh per-tick frames precede the initiating session’s result (AWP-PRM-006). - Schemas. Channel ids start at 1.
session.stateno longer listsnegotiating, which is never sent.stream.clamped_countis required on streaming actions’ statuses.reconnect_window_msandheartbeat_interval_msinsession.readyare required and have no default. The error message pattern admits JSON-RPC’s ownInvalid Request.
- Schema forms. The canonical schemas are in receiver form;
x-awp-closedandx-awp-lintdefine the sender form every sent message must satisfy (AWP-VER-004). - A lost session. After
AWP_SESSION_UNKNOWNthe agent treats the session as closed and assumes nothing of it survives; opening a new session is how it continues, not an obligation (AWP-SES-008). - Resumption. An agent processes the replay through
replay_to_status_seqbefore resubmitting an action whose admission it has not seen (AWP-AGT-007). - Retries. A resubmission retries a refused one when its
type,params, andembodiment_idmatch, whatever itsaction_id(AWP-ERR-001). - Connections. The control connection’s WebSocket binding uses the
awpsubprotocol, one JSON-RPC message per text message (AWP-TRN-001). Neither side detects loss by silence beforesession.ready, or on a new connection before thesession.resumeresult (AWP-SES-012). The agent clock is monotonic across the agent’s connections and sessions (AWP-CLK-006). A world never grants areconnect_window_msshorter than itswatchdog_ms(AWP-SAF-003). - Channels. Per-tick channels are those a lockstep session is granted with
rate_hz: null(AWP-TIM-003). Command channels are listed ingranted.channels, and an endpoint withoutchannelscarries them too (AWP-CMD-002, AWP-TRN-012). While a lost stream connection is down its channels are sent in neither direction, not even inline, and one closed over a malformed frame is re-established like any lost one (AWP-TRN-010, AWP-DAT-010). Anobs.report’sgapsleaves out the gap before a resync frame. - The inline frame schema’s
flagsdescription and theminimalvector’s payload length now match the text.
obs.report where it sends one, and needs manual evidence otherwise. AWP-OBS-007 is on both sides: worlds must accept the report, agents should send it. AWP-AGT-008 applies to streaming. New row AWP-DAT-010.Two rules the first conformance claim had to interpret, stated.Wire-visible changes. None.
- Latest-wins in lockstep. The sender’s drop rule for
latest-winschannels applies in streaming; in lockstep no frame is dropped, since every advance delivers its frame on every subscribed per-tick channel (AWP-DAT-002, AWP-TIM-003). - Milliseconds.
_msis a unit suffix, as the specification’s own fields (deadline_ms,watchdog_ms, and others) already use it (AWP-UNI-001).
What a stream binding and the features beyond Core had to decide, found by implementing them in the reference world and testing them with the suite.Wire-visible changes
- Moving a channel. A channel is delivered inline until a stream connection carrying it is established, then only there, starting with a resync keyframe; an endpoint without
channelscarries every channel of the session. A late inline frame is discarded by its receiver, not counted as loss (AWP-TRN-012). - Stream connections. On
ws, one binary frame per message, the session token as the bearer credential, theawpsubprotocol; a message that is not a valid frame closes the connection withAWP_MALFORMED(AWP-TRN-013). While a lost stream connection is down its channels are not delivered inline (AWP-TRN-010); suspension closes stream connections, and after resumption channels are inline until they are re-established (AWP-TRN-008). - Transfer. Transfer tokens are single-use and expire; a bad one fails
AWP_EMBODIMENT_UNAVAILABLEand changes nothing. The previous holder continues as an observer and receives the new eventembodiment_transferred(AWP-EMB-003, AWP-EVT-001). - Approvers. An approver is a control connection the deployment authorizes; it needs no session.
safety.approval.respondfrom anyone else failsAWP_FORBIDDEN, and for an unknown or decided approvalAWP_PARAMS_INVALID.expires_at_nsis on the requester’s session clock (AWP-APR-007). - Lockstep clock. The session clock counts advances and never moves backward; the tick is world state that reset and restore may move, carried as simulated time in
ts_sim_nsonce the two diverge (AWP-TIM-013).approval_timeout_msis measured on the session clock. - Seeding and snapshots.
seedseeds random sources and changes no other state; determinism holds for runs from the same state (AWP-REP-001). Restore brings back random sources and the tick; an unknown snapshot token failsAWP_PARAMS_INVALID(AWP-REP-002). Replay feeds every call that changes action state — includingworld.reset,world.restore, andsession.close— in recorded order (AWP-REP-003). - Command frames. They travel inline as
cmd.frameor on a stream connection; dropped and clamped frames count instream.clamped_count(AWP-CMD-006).
The conformance suite is published, and the claim rules say what its report must show.Wire-visible changes. None.Conformance.
awp-conformance runs the matrix’s assertions against a world at a URL, or against an agent launched beside a harness world (AWP-CNF-004). “AWP-conformant” now requires a suite report for the named revision with no failure and nothing untested in scope, plus the evidence for every manual row; everything else is “self-assessed against 0.1-draft.N” (AWP-CNF-005).Requirement matrix. Rows the suite cannot observe on the wire are relabelled: transport backpressure (AWP-DAT-002, AWP-TRN-009), the frame test vectors, which exercise an implementation’s own decoder (AWP-DAT-008), and unit naming (AWP-UNI-001) need manual evidence; semver policy (AWP-VER-001) and artifact versions (AWP-VER-006) are process rules. AWP-SAF-005 is an agent requirement, and AWP-AUD-005 applies only with capability:replay.Artifacts. Conformance test suite, badges, and registry pages; the reference implementation’s pages.Choices a first implementation had to make on its own, now written into the text.Wire-visible changes
- Lockstep clock. The session clock in lockstep is simulated time: it moves only with advances, by the same amount each time, and every timing bound on it measures simulated time (AWP-TIM-013). Clock synchronization applies to streaming sessions only (AWP-CLK-008/009).
- Replace in lockstep. A replacing submission cancels the group’s pre-execution actions at admission; the executing action is preempted at the start of the next advance, not at admission (AWP-PRE-007).
- Rate limits.
max_action_rate_hzandretry_after_msare measured on the session clock; in lockstep an agent clears the limit by advancing (AWP-ENV-004). - Closing.
session.closeis answered only after every action has ended andsession.state: closedhas been sent. While closing, new work, cancellation, subscription changes, advances, resets, and resumption fail withAWP_SESSION_EXPIRED; in lockstep the abort completes without an advance (AWP-SES-011). - Connections without a session. Worlds MAY close a silent connection that has no session, after at least 15 s; pongs on such a connection do not feed the clock estimate (AWP-SES-012).
Contradictions that blocked a first implementation resolved; traces checked for meaning, not only shape.Wire-visible changes
- Unknown fields. The canonical schemas are now receiver schemas and accept unknown fields, as AWP-VER-003 always required; the stricter sender rules (only declared and
x-<vendor>.fields, sender-only value constraints) are annotations (x-awp-closed,x-awp-lint) applied by CI. JSON-RPC reserved errors (e.g.-32601) MAY omitdata(AWP-ERR-001). - Watchdog. Only messages the agent originates reset the watchdog; answering the world’s
pingno longer does (AWP-SAF-003/005). A Core world that offers streaming runs the watchdog (Core profile). Newmax_duration_mson extended action types bounds execution without fresh intent (AWP-ACT-008), required by the robotics profile (AWP-ROB-007). - Idempotency and replay. An idempotent
action.submitreports the action’s current state, any state, with its lateststatus_seqand consumes none (AWP-ACT-001); “identical content” is defined (AWP-ACT-009); a submission rejected with a JSON-RPC error creates no action and itsaction_idmay be retried (AWP-ACT-010). Transitions first reported in a result are replayed asaction.status(AWP-CTL-008).session.resumeresults carryreplay_to_status_seq; agents acknowledge delivery withlast_status_seqonping, and worlds retain what is unacknowledged (AWP-CTL-010). Receivers deduplicate onstatus_seq. Resuming a session whose old connection is still open replaces it (connection_replaced, AWP-SES-010). - Lifecycle. The normative transition table is
spec/action-lifecycle.yaml. New edgesaccepted → rejectedandcancelling → failed; new reasonsabort_failed(AWP-LIF-010) andtransferred(AWP-EMB-003); “coincide” defined for precedence, which now ranks reset, close, and transfer (AWP-LIF-008). - Credentials. Bearer credentials travel in
Authorizationor theawp.bearer.<token>WebSocket subprotocol, never in URLs (AWP-SEC-005/006); audit redaction covers the subprotocol. - Frames. The inline
flagsschema accepts reserved bits 4–7 as receivers must (AWP-DAT-005); senders are held to keyframe-with-resync by CI. - Tick authority. Under
barrier, every non-observer lockstep session may tick without an admin grant; thetickgrant is required only underany_sessionon a world that may bind several lockstep sessions (AWP-TIM-012, AWP-MA-005).
schemas/v0.1/profiles/ is compiled and typed in CI. Trace validation checks every action against the transition table, idempotency and conflicts, replay from last_status_seq + 1, loss-class-aware frame sequences, and watchdog timing; CI also fails if the lifecycle diagram and table disagree. New traces: lost acknowledgement and resubmission, e-stop during a safe abort, approval, and a quiet agent on a live connection. Timestamps in the streaming, cancel, and disconnect traces corrected: several intervals were written in microseconds.One channel model, clock synchronization, and validated wire traces.Wire-visible changes
- Channel model. The control/data-plane split is replaced by channels: channel
0is the control channel (all JSON-RPC); channels ≥ 1 are observation and command channels with classreliableorlatest-wins(AWP-TRN-005..011). Stream bindings arews,grpc,webrtc,webtransport,shm, classified by independent flow control; endpoints MAY declaremax_frame_bytes; a lost stream connection can reconnect while the control connection stays up. Pages renamed: Control plane → Control channel, Data plane → Frames. - Clock sync over the heartbeat.
pingnow carries{ origin_ns }and its result — the pong —{ origin_ns, receive_ns, transmit_ns }(was param-less). Agents keep a clock-offset estimate and map agent-originated session-clock values through it (AWP-CLK-006..009, AWP-AGT-008). - Frames. New extension
0x03ts_send_ns, required on streaming observation frames (AWP-OBS-006). Flags bit 3 isresync; reserved bits are now 4–7 (AWP-DAT-005, AWP-DAT-009). Inline form gainsts_send_ns. - Telemetry. The
awp.telemetrychannel andtelemetry-payloadschema are removed; the world sends thesession.telemetrynotification on the control channel at ≥ 1 Hz (AWP-TIM-006). New agent notificationobs.report(AWP-OBS-007). - Events.
world.eventtravels only on the control channel;text/event+jsonobservation channels MUST NOT carry registry events (AWP-EVT-003).data_plane_degradedrenamedchannel_degraded. - Actions.
action.submitgainsbasis_ts_mono_nsandvalid_until_ns(AWP-ACT-007); its result gainsreceived_ts_mono_ns(AWP-LIF-002).safety_policy.max_basis_age_ms, reasonstale_intent, andAWP_STALE_INTENT(3007) (AWP-SAF-013). Optionalmax_abort_msper action type andAWP_ACTION_UNKNOWN(3008) (AWP-LIF-010).action.submitandaction.cancelresults consumestatus_seqfrom the shared sequence. - Lockstep.
world.tickrequiresexpected_tick; a mismatch fails withAWP_TICK_MISMATCH(3009) and nothing advances (AWP-TIM-011). Advance completion is defined per channel (AWP-TIM-003). - Session.
session.readycarriessession_id(AWP-SES-009).session.stateis specified as{ state, status_seq, ts_mono_ns, reason? }and sharesstatus_seq(AWP-SES-007).session.transfertakes{ expires_in_ms? }. - Subscriptions.
obs.subscribeandobs.unsubscribereturn the complete grant list; undeclared channels fail withAWP_CHANNEL_UNKNOWN(2007) (AWP-NEG-004). - Profiles. Robotics:
max_basis_age_ms≤ 500 andbasis_ts_mono_nson every submission (AWP-ROB-005); an independent-flow-control binding for everylatest-winschannel (AWP-ROB-006). Core Agent: explicitworld.tick, no implicit advancing (AWP-AGT-009).
examples/v0.1/traces/*.jsonl: core lockstep, core streaming, cancel, disconnect), validated in CI and rendered at Wire traces. New schemas: ping, ping-result, obs-report, session-telemetry, session-state, tick, subscribe, unsubscribe, reset, restore, action-ref, and the result schemas they need.Lifecycle, liveness, and lockstep rules tightened; RFDs folded into the text; canonical schemas and the requirement matrix.Wire-visible changes
- Action lifecycle. New states
pending_approval,queued,cancelling. Theaction.submitresult is the admission acknowledgement and reports the post-validation state (AWP-LIF-002). Terminal statuses carry areasonfrom the status reason registry; cause precedence and deadline origin are fixed (AWP-LIF-001..009).action_idresubmission is idempotent; conflicting content fails withAWP_ACTION_ID_CONFLICT(3004). - Delivery. Every
action.statusandworld.eventcarriesstatus_seq;session.resumecarrieslast_status_seqand the world replays what follows (AWP-CTL-008). One session per connection (AWP_SESSION_EXISTS, 2004);AWP_SESSION_UNKNOWN(2005) after a world restart; 64-bit JSON integers bounded by 2^53 − 1 (AWP_INTEGER_RANGE, 2006). - Lockstep.
tick_policyison_tickonly (on_action,on_bothremoved). Staging, initial observations,world.tick { count }, andtick_authority(any_session|barrier), withAWP_TICK_NOT_AUTHORIZED(3006) (AWP-TIM-002..012). - Liveness and safe state.
session.readydeclaresheartbeat_interval_ms; three silent intervals is loss (AWP-SAF-001/002).safety_policy.safe_state { behavior, watchdog_ms }replacessafety_policy.on_disconnect(safe state). New eventsgrant_expired,safe_state_entered,safe_state_exited,data_plane_degraded; per-channelstale_after_ms.e_stop_engagedcancels pre-execution actions;AWP_ESTOP_ACTIVE(3005). - Grants. Fourth grant class
admin(snapshot,restore,reset,tick) requested insession.openand enumerated insession.ready;world_resettingand cross-session reset effects (AWP-PRM-005/006). - Frame extension block. Flags bit 2
has_extensionsand a TLV block after the 28-byte header:0x01tick,0x02ts_sim_ns,0x80–0xFFvendor.tickandts_sim_nsnever travel in the payload (AWP-DAT-005..008). The inline form isobs.frame/cmd.framewith named JSON fields. - Command channels and task (from RFD-002, RFD-003). Capability
command_channels, manifestcommand_channels,duration: "streaming"action types withwatchdog_ms,cmd.frame, modalityservo/json, reasonwatchdog(command channels). Capabilitytask,taskonsession.open,task.update, namespacetask.*(task). - Manifest.
tick_policy,tick_authority,initial_states,concurrency_group,max_queue,multi_bind_group(withembodimentsinsession.openandembodiment_idon submissions), envelopeenforcement,safety_policy.audit.redact_paths;safety_policyis a concrete object, never a reference. - Telemetry.
awp.telemetrypayload given a schema (telemetry-payload). - Security. Plaintext permitted on loopback and stdio; authentication required on every non-loopback connection (AWP-SEC-001/002).
follow_trajectory remains an informative idiom. The RFD pages are removed.Artifacts. Canonical JSON Schemas in schemas/v0.1/; CI validation of examples/v0.1/*.json and of every json awp:<schema>-tagged block in the docs; frame test vectors (schemas/test-vectors/frames.json) and a reference codec; TypeScript types generated from the schemas; the requirement matrix generated from spec/requirements.yaml.Initial public draft of the Agent World Protocol: four-layer architecture, lockstep and streaming time models, action lifecycle, safety model (grants, envelopes, approval, audit log), six profiles, and error registry. Six draft RFDs published alongside it: brokered relay transport, command channels, first-class task instruction,
follow_trajectory, generalized elicitation, and capabilities generalization.Reference-code license set to Apache-2.0 with a no-CLA contribution policy. ACP comparison added. Pages for unpublished software — SDKs, adapters, awp-sim, quickstarts, the conformance suite and registry, and the worlds and agents directories — reduced to “Not published yet” stubs the same day.