TurnEvent
A canonical event envelope emitted by the turn harness. The payload is kept JSON-shaped so runtimes can load all events even when newer payload types are added; event-specific typed payload models below define the canonical shapes.
Class Diagram
Section titled “Class Diagram”---
title: TurnEvent
config:
look: handDrawn
theme: colorful
class:
hideEmptyMembersBox: true
---
classDiagram
class TurnEvent {
+string id
+string type
+string timestamp
+string turnId
+int32 iteration
+string parentId
+string spanId
+dictionary payload
}
Yaml Example
Section titled “Yaml Example”id: evt_abc123timestamp: 2026-06-09T20:00:00ZturnId: turn_001iteration: 0parentId: evt_parentspanId: span_tool_001Properties
Section titled “Properties”| Name | Type | Description |
|---|---|---|
| id | string | Unique identifier for this event |
| type | string | Event type discriminator |
| timestamp | string | ISO 8601 UTC timestamp when the event was emitted |
| turnId | string | Stable identifier for the outer turn |
| iteration | int32 | Zero-based agent-loop iteration associated with the event |
| parentId | string | Parent event or span identifier for reconstructing event hierarchy |
| spanId | string | Trace span identifier associated with this event |
| payload | dictionary | Event-specific payload. Values may be explicit null. Use the typed payload model matching ‘type’. |