> ## Documentation Index
> Fetch the complete documentation index at: https://www.agentworldprotocol.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Wire traces

> Complete, validated message sequences: discovery and session opening, the lockstep and streaming loops, cancellation, and disconnection with recovery.

<Note>
  Each trace is a JSON Lines file under [`examples/v0.1/traces/`](https://github.com/Hyperduality/agent-world-protocol/tree/main/examples/v0.1/traces). Every line is either a message, `{ from, step, msg }`, or a transport event that is not a message, `{ marker }`. CI validates every message against the canonical schema for its method, matches every response to its request, checks that `status_seq` increases by exactly one across statuses, events, and session-state notifications (AWP-CTL-008), and checks frame `seq` per channel (AWP-DAT-001). Tokens are illustrative.
</Note>

## Core flow, lockstep

Discovery, session opening, the initial observation, one extended action across two advances with progress and completion, and closure, on the inline binding against a grid world. Source: [`core-lockstep.jsonl`](https://github.com/Hyperduality/agent-world-protocol/blob/main/examples/v0.1/traces/core-lockstep.jsonl).

**1. Discovery: the agent states its versions and modalities** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocol_versions": ["0.1"],
    "agent": {
      "name": "example-agent",
      "version": "0.1.0",
      "vendor": "awp"
    },
    "consumes_modalities": ["text/event+json", "proprio/json", "image/jpeg"]
  }
}
```

**2. The world answers with its manifest under the selected version** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "protocol_version": "0.1",
    "world": {
      "name": "gridworld",
      "version": "0.1.0",
      "vendor": "awp"
    },
    "time_models": ["lockstep"],
    "tick_policy": "on_tick",
    "tick_authority": "any_session",
    "capabilities": {
      "seed": true
    },
    "embodiments": [
      {
        "id": "avatar_0",
        "kind": "avatar",
        "action_types": ["move", "walk_to"],
        "channels": ["grid_view"]
      }
    ],
    "observation_channels": [
      {
        "id": "grid_view",
        "modality": "text/event+json",
        "rate_hz": null,
        "loss_class": "reliable",
        "schema": {
          "type": "object",
          "properties": {
            "avatar": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "minItems": 2,
              "maxItems": 2
            },
            "goal": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "minItems": 2,
              "maxItems": 2
            }
          },
          "required": ["avatar", "goal"]
        }
      }
    ],
    "action_schemas": [
      {
        "type": "move",
        "params_schema": {
          "type": "object",
          "properties": {
            "direction": {
              "type": "string",
              "enum": ["north", "south", "east", "west"]
            }
          },
          "required": ["direction"],
          "additionalProperties": false
        },
        "duration": "instant",
        "preemption": "replace",
        "concurrency_group": "locomotion"
      },
      {
        "type": "walk_to",
        "params_schema": {
          "type": "object",
          "properties": {
            "cell": {
              "type": "array",
              "items": {
                "type": "integer"
              },
              "minItems": 2,
              "maxItems": 2
            }
          },
          "required": ["cell"],
          "additionalProperties": false
        },
        "duration": "extended",
        "preemption": ["replace", "queue"],
        "concurrency_group": "locomotion",
        "max_queue": 2
      }
    ],
    "safety_policy": {
      "envelopes": []
    }
  }
}
```

**3. Open a lockstep session on avatar\_0, subscribe to grid\_view, request tick authority** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "session.open",
  "params": {
    "embodiment": "avatar_0",
    "mode": "lockstep",
    "subscribe": [
      {
        "channel": "grid_view"
      }
    ],
    "admin": ["tick"]
  }
}
```

**4. session.ready enumerates exactly what was granted; tick is 0** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "session_id": "sess_01",
    "session_token": "st_3c9e1f7a2b8d4e60",
    "reconnect_window_ms": 30000,
    "heartbeat_interval_ms": 5000,
    "granted": {
      "channels": [
        {
          "channel": "grid_view",
          "rate_hz": null,
          "channel_id": 1
        }
      ],
      "action_types": ["move", "walk_to"],
      "admin": ["tick"],
      "envelopes": []
    },
    "stream_endpoints": [
      {
        "binding": "inline"
      }
    ],
    "clock_anchor": "2026-09-21T09:00:00Z",
    "tick": 0
  }
}
```

**5. Session transition to ready** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "ready",
    "status_seq": 1,
    "ts_mono_ns": 0,
    "reason": "opened"
  }
}
```

**6. Initial observation for tick 0 (AWP-TIM-009)** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.frame",
  "params": {
    "channel_id": 1,
    "seq": 1,
    "ts_mono_ns": 0,
    "flags": 1,
    "tick": 0,
    "payload_b64": "eyJhdmF0YXIiOlswLDBdLCJnb2FsIjpbMiwwXX0="
  }
}
```

**7. First observation delivered: session active** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "active",
    "status_seq": 2,
    "ts_mono_ns": 0,
    "reason": "first_activity"
  }
}
```

**8. Heartbeat carrying the agent clock** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "ping",
  "params": {
    "origin_ns": 1000000
  }
}
```

**9. Pong with session-clock receive and transmit stamps** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "origin_ns": 1000000,
    "receive_ns": 0,
    "transmit_ns": 0
  }
}
```

**10. Submit an extended action; it is admitted and staged until the next advance (AWP-TIM-010)** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "action.submit",
  "params": {
    "action_id": "a-1",
    "type": "walk_to",
    "params": {
      "cell": [2, 0]
    },
    "preempt": "replace"
  }
}
```

**11. Admission acknowledgement: accepted, with receipt and transition time** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "action_id": "a-1",
    "state": "accepted",
    "status_seq": 3,
    "received_ts_mono_ns": 0,
    "ts_mono_ns": 0
  }
}
```

**12. Advance one tick from tick 0** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "world.tick",
  "params": {
    "expected_tick": 0,
    "count": 1
  }
}
```

**13. The staged action begins executing at the start of the advance** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-1",
    "state": "executing",
    "status_seq": 4,
    "ts_mono_ns": 1000000,
    "tick": 1,
    "progress": 0.5
  }
}
```

**14. Frame for tick 1** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.frame",
  "params": {
    "channel_id": 1,
    "seq": 2,
    "ts_mono_ns": 1000000,
    "flags": 1,
    "tick": 1,
    "payload_b64": "eyJhdmF0YXIiOlsxLDBdLCJnb2FsIjpbMiwwXX0="
  }
}
```

**15. Tick result after statuses and frames** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 5,
  "result": {
    "tick": 1
  }
}
```

**16. Advance again** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 6,
  "method": "world.tick",
  "params": {
    "expected_tick": 1
  }
}
```

**17. The action reaches its goal** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-1",
    "state": "completed",
    "status_seq": 5,
    "ts_mono_ns": 2000000,
    "tick": 2,
    "progress": 1
  }
}
```

**18. Frame for tick 2** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.frame",
  "params": {
    "channel_id": 1,
    "seq": 3,
    "ts_mono_ns": 2000000,
    "flags": 1,
    "tick": 2,
    "payload_b64": "eyJhdmF0YXIiOlsyLDBdLCJnb2FsIjpbMiwwXX0="
  }
}
```

**19. Tick result** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 6,
  "result": {
    "tick": 2
  }
}
```

**20. Close the session** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 7,
  "method": "session.close"
}
```

**21. Session closed; the embodiment is released** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "closed",
    "status_seq": 6,
    "ts_mono_ns": 2000000,
    "reason": "session_closed"
  }
}
```

**22. Close acknowledged** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 7,
  "result": {}
}
```

## Core flow, streaming

The same flow against a streaming manipulator: clock synchronization on the heartbeat, frames with capture and send time, a submission naming its basis, progress, completion, telemetry in both directions, and closure. Source: [`core-streaming.jsonl`](https://github.com/Hyperduality/agent-world-protocol/blob/main/examples/v0.1/traces/core-streaming.jsonl).

**1. Discovery** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {
    "protocol_versions": ["0.1"],
    "agent": {
      "name": "example-agent",
      "version": "0.1.0",
      "vendor": "awp"
    },
    "consumes_modalities": ["text/event+json", "proprio/json", "image/jpeg"]
  }
}
```

**2. World manifest: streaming only, safe state declared, basis age bounded** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "protocol_version": "0.1",
    "world": {
      "name": "arm-bridge",
      "version": "0.3.0",
      "vendor": "awp"
    },
    "time_models": ["streaming"],
    "capabilities": {},
    "embodiments": [
      {
        "id": "arm_01",
        "kind": "manipulator",
        "action_types": ["move_to_pose", "stop"],
        "channels": ["rgb_wrist", "proprio"]
      }
    ],
    "observation_channels": [
      {
        "id": "rgb_wrist",
        "modality": "image/jpeg",
        "rate_hz": 30,
        "loss_class": "latest-wins",
        "schema": {
          "width": 1280,
          "height": 720,
          "color_space": "srgb"
        }
      },
      {
        "id": "proprio",
        "modality": "proprio/json",
        "rate_hz": 100,
        "loss_class": "latest-wins",
        "stale_after_ms": 50,
        "schema": {
          "joints": 7,
          "fields": ["q_rad", "dq_radps"]
        }
      }
    ],
    "action_schemas": [
      {
        "type": "move_to_pose",
        "params_schema": {
          "$ref": "#/$defs/move_to_pose_params"
        },
        "duration": "extended",
        "preemption": ["replace", "queue"],
        "concurrency_group": "arm_motion",
        "max_queue": 4,
        "max_abort_ms": 1500
      },
      {
        "type": "stop",
        "params_schema": {
          "type": "object",
          "additionalProperties": false
        },
        "duration": "instant",
        "preemption": "replace",
        "concurrency_group": "arm_motion"
      }
    ],
    "safety_policy": {
      "envelopes": [
        {
          "embodiment": "arm_01",
          "spatial": {
            "frame": "base",
            "aabb_m": [
              [-0.8, -0.8, 0],
              [0.8, 0.8, 1.2]
            ]
          },
          "max_velocity_mps": 1,
          "max_action_rate_hz": 10,
          "enforcement": "both",
          "on_violation": "clamp"
        }
      ],
      "safe_state": {
        "behavior": "safe_stop",
        "watchdog_ms": 2000
      },
      "max_basis_age_ms": 200
    },
    "$defs": {
      "move_to_pose_params": {
        "type": "object",
        "properties": {
          "pose": {
            "$ref": "https://agentworldprotocol.com/schemas/v0.1/common.schema.json#/$defs/pose"
          }
        },
        "required": ["pose"],
        "additionalProperties": false
      }
    }
  }
}
```

**3. Open a streaming session on arm\_01 with two channels** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "session.open",
  "params": {
    "embodiment": "arm_01",
    "mode": "streaming",
    "subscribe": [
      {
        "channel": "rgb_wrist",
        "rate_hz": 15
      },
      {
        "channel": "proprio",
        "rate_hz": 100
      }
    ]
  }
}
```

**4. session.ready: grants, envelopes, stream endpoints, frame tree, clock anchor** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "session_id": "sess_7f",
    "session_token": "st_9f2a7c1e4b8d6f03",
    "reconnect_window_ms": 30000,
    "heartbeat_interval_ms": 5000,
    "granted": {
      "channels": [
        {
          "channel": "rgb_wrist",
          "rate_hz": 15,
          "channel_id": 1
        },
        {
          "channel": "proprio",
          "rate_hz": 100,
          "channel_id": 2
        }
      ],
      "action_types": ["move_to_pose", "stop"],
      "admin": [],
      "envelopes": [
        {
          "embodiment": "arm_01",
          "spatial": {
            "frame": "base",
            "aabb_m": [
              [-0.8, -0.8, 0],
              [0.8, 0.8, 1.2]
            ]
          },
          "max_velocity_mps": 1,
          "max_action_rate_hz": 10,
          "enforcement": "both",
          "on_violation": "clamp"
        }
      ]
    },
    "stream_endpoints": [
      {
        "binding": "webtransport",
        "url": "https://127.0.0.1:8711/stream",
        "channels": [1, 2]
      },
      {
        "binding": "inline"
      }
    ],
    "frame_tree": {
      "frames": [
        {
          "id": "world",
          "parent": null
        },
        {
          "id": "base",
          "parent": "world",
          "transform": {
            "p_m": [0, 0, 0.75],
            "q": [0, 0, 0, 1]
          }
        }
      ]
    },
    "clock_anchor": "2026-09-21T09:00:00Z"
  }
}
```

> **Transport.** The agent selects the inline binding; frames below travel as obs.frame notifications on the control connection.

**5. Session ready** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "ready",
    "status_seq": 1,
    "ts_mono_ns": 913004000000,
    "reason": "opened"
  }
}
```

**6. Clock synchronization on the heartbeat (AWP-CLK-007)** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "ping",
  "params": {
    "origin_ns": 5000000
  }
}
```

**7. Pong; the agent derives rtt 50 µs and offset 912998975000 ns (AWP-CLK-008)** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "origin_ns": 5000000,
    "receive_ns": 913004000000,
    "transmit_ns": 913004050000
  }
}
```

**8. Proprioception frame with capture and send time** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.frame",
  "params": {
    "channel_id": 2,
    "seq": 1,
    "ts_mono_ns": 913004100000,
    "ts_send_ns": 913005000000,
    "flags": 1,
    "payload_b64": "eyJxX3JhZCI6WzAuMTIsLTEuMDQsMC44OCwtMS45LDAuMDUsMS4yLDAuM10sImRxX3JhZHBzIjpbMCwwLDAsMCwwLDAsMF19"
  }
}
```

**9. Camera frame; JPEG bytes elided** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.frame",
  "params": {
    "channel_id": 1,
    "seq": 1,
    "ts_mono_ns": 913004112000,
    "ts_send_ns": 913004120200,
    "flags": 1,
    "payload_b64": "/9j/4AAQSkZJRg=="
  }
}
```

**10. First observation delivered: session active** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "active",
    "status_seq": 2,
    "ts_mono_ns": 913004100000,
    "reason": "first_activity"
  }
}
```

**11. Submit naming its basis frame and a validity window (AWP-ACT-007)** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "method": "action.submit",
  "params": {
    "action_id": "a-7",
    "type": "move_to_pose",
    "params": {
      "pose": {
        "frame": "base",
        "p_m": [0.4, 0.1, 0.3],
        "q": [0, 0, 0, 1]
      }
    },
    "preempt": "replace",
    "deadline_ms": 5000,
    "basis_ts_mono_ns": 913004112000,
    "valid_until_ns": 913004312000
  }
}
```

**12. Admitted 29 ms after the basis was captured** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "action_id": "a-7",
    "state": "accepted",
    "status_seq": 3,
    "received_ts_mono_ns": 913004141000,
    "ts_mono_ns": 913004142100
  }
}
```

**13. Execution begins immediately in streaming** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-7",
    "state": "executing",
    "status_seq": 4,
    "ts_mono_ns": 913004142500,
    "progress": 0
  }
}
```

**14. Frames keep flowing while the action executes** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.frame",
  "params": {
    "channel_id": 2,
    "seq": 2,
    "ts_mono_ns": 913004600000,
    "ts_send_ns": 913005500000,
    "flags": 1,
    "payload_b64": "eyJxX3JhZCI6WzAuMTIsLTEuMDQsMC44OCwtMS45LDAuMDUsMS4yLDAuM10sImRxX3JhZHBzIjpbMCwwLDAsMCwwLDAsMF19"
  }
}
```

**15. Progress update (AWP-LIF-003)** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-7",
    "state": "executing",
    "status_seq": 5,
    "ts_mono_ns": 913004600000,
    "progress": 0.4
  }
}
```

**16. Goal reached** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-7",
    "state": "completed",
    "status_seq": 6,
    "ts_mono_ns": 913005100000,
    "progress": 1
  }
}
```

**17. Telemetry for the last second (AWP-TIM-006)** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.telemetry",
  "params": {
    "window_ms": 1000,
    "observation_latency_ns": {
      "count": 2,
      "p50": 900000,
      "p95": 8200000
    },
    "admission_latency_ns": {
      "count": 1,
      "p50": 1100000,
      "p95": 1100000
    },
    "observation_to_action_ns": {
      "count": 1,
      "p50": 29000000,
      "p95": 29000000
    },
    "channels": {
      "1": {
        "count": 1,
        "p50": 8200000,
        "p95": 8200000
      },
      "2": {
        "count": 1,
        "p50": 900000,
        "p95": 900000
      }
    }
  }
}
```

**18. Receiver report (AWP-OBS-007)** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.report",
  "params": {
    "window_ms": 1000,
    "sync": {
      "offset_ns": 912998975000,
      "rtt_ns": 50000,
      "samples": 1
    },
    "channels": {
      "1": {
        "frames": 1,
        "gaps": 0,
        "staleness_ns": {
          "count": 1,
          "p50": 14100000,
          "p95": 14100000
        }
      },
      "2": {
        "frames": 2,
        "gaps": 0,
        "staleness_ns": {
          "count": 2,
          "p50": 1600000,
          "p95": 1700000
        }
      }
    },
    "decision_latency_ns": {
      "count": 1,
      "p50": 22000000,
      "p95": 22000000
    }
  }
}
```

**19. Close** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 5,
  "method": "session.close"
}
```

**20. Closed; the arm enters safe\_stop, then the embodiment is released** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "closed",
    "status_seq": 7,
    "ts_mono_ns": 913005200000,
    "reason": "session_closed"
  }
}
```

**21. Close acknowledged** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 5,
  "result": {}
}
```

## Cancellation during execution

An executing extended action is cancelled: the world enters cancelling, completes its safe abort, and reports cancelled with the progress reached. Source: [`cancel.jsonl`](https://github.com/Hyperduality/agent-world-protocol/blob/main/examples/v0.1/traces/cancel.jsonl).

> **Transport.** Continues the streaming trace after a-7 began executing (status\_seq 4).

**1. Progress update** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-7",
    "state": "executing",
    "status_seq": 5,
    "ts_mono_ns": 913004600000,
    "progress": 0.4
  }
}
```

**2. Cancel the executing action** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 10,
  "method": "action.cancel",
  "params": {
    "action_id": "a-7"
  }
}
```

**3. Executing actions enter cancelling while the safe abort runs (AWP-LIF-005)** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 10,
  "result": {
    "action_id": "a-7",
    "state": "cancelling",
    "status_seq": 6
  }
}
```

**4. Safe abort complete within max\_abort\_ms; progress reached is reported** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-7",
    "state": "cancelled",
    "status_seq": 7,
    "ts_mono_ns": 913004900000,
    "reason": "cancelled_by_agent",
    "aborted_at_progress": 0.4
  }
}
```

## Disconnection, watchdog, resumption

The control connection drops mid-execution. The watchdog enters safe state and terminates the action while the agent is away; the agent reconnects, resumes, receives every missed notification in order, and regains control with a new submission. Source: [`disconnect.jsonl`](https://github.com/Hyperduality/agent-world-protocol/blob/main/examples/v0.1/traces/disconnect.jsonl).

> **Transport.** Continues the streaming trace after a-7 began executing (status\_seq 4). The agent's last message reached the world at t0 = 913004142000.

> **Transport.** The control connection drops. t0 + 2000 ms: the watchdog expires (AWP-SAF-003); the world begins safe\_stop, fails a-7, and records the notifications below for replay (AWP-SAF-004).

> **Transport.** t0 + 15000 ms: three heartbeat intervals without a pong; the session is Suspended (AWP-SAF-002). The stream endpoint is closed with the connection.

**1. Reconnect: a new control connection begins with initialize** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 20,
  "method": "initialize",
  "params": {
    "protocol_versions": ["0.1"],
    "agent": {
      "name": "example-agent",
      "version": "0.1.0",
      "vendor": "awp"
    },
    "consumes_modalities": ["text/event+json", "proprio/json", "image/jpeg"]
  }
}
```

**2. Same manifest; the world process did not restart** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 20,
  "result": {
    "protocol_version": "0.1",
    "world": {
      "name": "arm-bridge",
      "version": "0.3.0",
      "vendor": "awp"
    },
    "time_models": ["streaming"],
    "capabilities": {},
    "embodiments": [
      {
        "id": "arm_01",
        "kind": "manipulator",
        "action_types": ["move_to_pose", "stop"],
        "channels": ["rgb_wrist", "proprio"]
      }
    ],
    "observation_channels": [
      {
        "id": "rgb_wrist",
        "modality": "image/jpeg",
        "rate_hz": 30,
        "loss_class": "latest-wins",
        "schema": {
          "width": 1280,
          "height": 720,
          "color_space": "srgb"
        }
      },
      {
        "id": "proprio",
        "modality": "proprio/json",
        "rate_hz": 100,
        "loss_class": "latest-wins",
        "stale_after_ms": 50,
        "schema": {
          "joints": 7,
          "fields": ["q_rad", "dq_radps"]
        }
      }
    ],
    "action_schemas": [
      {
        "type": "move_to_pose",
        "params_schema": {
          "$ref": "#/$defs/move_to_pose_params"
        },
        "duration": "extended",
        "preemption": ["replace", "queue"],
        "concurrency_group": "arm_motion",
        "max_queue": 4,
        "max_abort_ms": 1500
      },
      {
        "type": "stop",
        "params_schema": {
          "type": "object",
          "additionalProperties": false
        },
        "duration": "instant",
        "preemption": "replace",
        "concurrency_group": "arm_motion"
      }
    ],
    "safety_policy": {
      "envelopes": [
        {
          "embodiment": "arm_01",
          "spatial": {
            "frame": "base",
            "aabb_m": [
              [-0.8, -0.8, 0],
              [0.8, 0.8, 1.2]
            ]
          },
          "max_velocity_mps": 1,
          "max_action_rate_hz": 10,
          "enforcement": "both",
          "on_violation": "clamp"
        }
      ],
      "safe_state": {
        "behavior": "safe_stop",
        "watchdog_ms": 2000
      },
      "max_basis_age_ms": 200
    },
    "$defs": {
      "move_to_pose_params": {
        "type": "object",
        "properties": {
          "pose": {
            "$ref": "https://agentworldprotocol.com/schemas/v0.1/common.schema.json#/$defs/pose"
          }
        },
        "required": ["pose"],
        "additionalProperties": false
      }
    }
  }
}
```

**3. Resume with the session token and the last status\_seq processed** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 21,
  "method": "session.resume",
  "params": {
    "session_token": "st_9f2a7c1e4b8d6f03",
    "last_status_seq": 4
  }
}
```

**4. session.ready again; the embodiment is in safe state (AWP-SAF-008)** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 21,
  "result": {
    "session_id": "sess_7f",
    "session_token": "st_9f2a7c1e4b8d6f03",
    "reconnect_window_ms": 30000,
    "heartbeat_interval_ms": 5000,
    "granted": {
      "channels": [
        {
          "channel": "rgb_wrist",
          "rate_hz": 15,
          "channel_id": 1
        },
        {
          "channel": "proprio",
          "rate_hz": 100,
          "channel_id": 2
        }
      ],
      "action_types": ["move_to_pose", "stop"],
      "admin": [],
      "envelopes": [
        {
          "embodiment": "arm_01",
          "spatial": {
            "frame": "base",
            "aabb_m": [
              [-0.8, -0.8, 0],
              [0.8, 0.8, 1.2]
            ]
          },
          "max_velocity_mps": 1,
          "max_action_rate_hz": 10,
          "enforcement": "both",
          "on_violation": "clamp"
        }
      ]
    },
    "stream_endpoints": [
      {
        "binding": "webtransport",
        "url": "https://127.0.0.1:8711/stream",
        "channels": [1, 2]
      },
      {
        "binding": "inline"
      }
    ],
    "frame_tree": {
      "frames": [
        {
          "id": "world",
          "parent": null
        },
        {
          "id": "base",
          "parent": "world",
          "transform": {
            "p_m": [0, 0, 0.75],
            "q": [0, 0, 0, 1]
          }
        }
      ]
    },
    "clock_anchor": "2026-09-21T09:00:00Z",
    "safe_state": true
  }
}
```

**5. Replay 1 of 4: the action failed at watchdog expiry** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-7",
    "state": "failed",
    "status_seq": 5,
    "ts_mono_ns": 913006142000,
    "reason": "connection_lost",
    "aborted_at_progress": 0.4
  }
}
```

**6. Replay 2 of 4** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "world.event",
  "params": {
    "event": "safe_state_entered",
    "status_seq": 6,
    "ts_mono_ns": 913006142000,
    "detail": {
      "behavior": "safe_stop",
      "embodiment": "arm_01"
    }
  }
}
```

**7. Replay 3 of 4: the suspension the agent could not receive at the time** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "suspended",
    "status_seq": 7,
    "ts_mono_ns": 913019142000,
    "reason": "connection_lost"
  }
}
```

**8. Replay 4 of 4, then live: resumed** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "session.state",
  "params": {
    "state": "active",
    "status_seq": 8,
    "ts_mono_ns": 913025000000,
    "reason": "resumed"
  }
}
```

**9. First frame after resumption: a keyframe carrying resync (AWP-DAT-009)** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "obs.frame",
  "params": {
    "channel_id": 2,
    "seq": 2100,
    "ts_mono_ns": 913025010000,
    "ts_send_ns": 913025010900,
    "flags": 9,
    "payload_b64": "eyJxX3JhZCI6WzAuMSwtMSwwLjksLTEuOSwwLjA1LDEuMiwwLjNdLCJkcV9yYWRwcyI6WzAsMCwwLDAsMCwwLDBdfQ=="
  }
}
```

**10. A new intent is required to move again (AWP-SAF-008)** — agent → world

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 22,
  "method": "action.submit",
  "params": {
    "action_id": "a-8",
    "type": "move_to_pose",
    "params": {
      "pose": {
        "frame": "base",
        "p_m": [0.4, 0.1, 0.3],
        "q": [0, 0, 0, 1]
      }
    },
    "preempt": "replace",
    "basis_ts_mono_ns": 913025010000,
    "valid_until_ns": 913025210000
  }
}
```

**11. Admitted** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "id": 22,
  "result": {
    "action_id": "a-8",
    "state": "accepted",
    "status_seq": 9,
    "received_ts_mono_ns": 913025040000,
    "ts_mono_ns": 913025041000
  }
}
```

**12. Safe state exits when the first post-resume action begins executing** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "world.event",
  "params": {
    "event": "safe_state_exited",
    "status_seq": 10,
    "ts_mono_ns": 913025041500,
    "detail": {
      "embodiment": "arm_01"
    }
  }
}
```

**13. Control regained** — world → agent

```json theme={null}
{
  "jsonrpc": "2.0",
  "method": "action.status",
  "params": {
    "action_id": "a-8",
    "state": "executing",
    "status_seq": 11,
    "ts_mono_ns": 913025041500,
    "progress": 0
  }
}
```
