Skip to content
Prompty

SessionEvent

A canonical event envelope emitted by an outer harness session.

---
title: SessionEvent
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class SessionEvent {
        +string id
        +string type
        +string timestamp
        +string sessionId
        +string turnId
        +string parentId
        +string spanId
        +dictionary payload
        +RedactionMetadata redaction
    }
    class RedactionMetadata {
        +boolean sanitized
        +RedactedField[] fields
        +string policy
    }
    SessionEvent *-- RedactionMetadata
id: evt_abc123
timestamp: 2026-06-09T20:00:00Z
sessionId: sess_abc123
turnId: turn_001
parentId: evt_parent
spanId: span_hook_001
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
sessionId string Stable identifier for the outer session
turnId string Associated turn identifier, when this session event is linked to a turn
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’.
redaction RedactionMetadata Redaction state for sensitive payload fields

The following types are composed within SessionEvent: