Skip to main content
The Autoplay connector emits two JSON event types over the SSE stream. The SDK parses these automatically into typed Python objects — you rarely need to work with the raw JSON directly, but this reference is useful when debugging or building your own client.

actions event

Emitted when the connector extracts and forwards a batch of UI actions from a user session.
{
  "type":       "actions",
  "product_id": "prod_abc",
  "session_id": "ps_abc123",
  "user_id":    "distinct_id_xyz",
  "email":      "user@example.com",
  "count":      3,
  "forwarded_at": 1700000000.0,
  "actions": [
    {
      "index":           0,
      "type":            "pageview",
      "title":           "Page Load: Dashboard",
      "description":     "User landed on the dashboard page",
      "timestamp_start": 1700000000.0,
      "timestamp_end":   1700000005.2,
      "raw_url":         "https://app.example.com/dashboard?ref=email",
      "canonical_url":   "https://app.example.com/dashboard"
    },
    {
      "index":           1,
      "type":            "click",
      "title":           "Click Export CSV button",
      "description":     "User clicked Export CSV button on the dashboard page",
      "timestamp_start": 1700000005.2,
      "timestamp_end":   1700000012.8,
      "raw_url":         "https://app.example.com/dashboard",
      "canonical_url":   "https://app.example.com/dashboard"
    },
    {
      "index":           2,
      "type":            "click",
      "title":           "Click billing settings link",
      "description":     "User clicked billing settings link on the settings page",
      "timestamp_start": 1700000012.8,
      "timestamp_end":   1700000012.8,
      "raw_url":         "https://app.example.com/settings/billing",
      "canonical_url":   "https://app.example.com/settings/billing"
    }
  ]
}

Top-level fields

FieldTypeDescription
typestringAlways "actions"
product_idstringConnector product identifier
session_idstring | nullUser session identifier
user_idstring | nullExternal user identifier passed at session boot
emailstring | nullUser email from the identity store
countintNumber of actions in this batch
forwarded_atfloatUnix timestamp when the connector forwarded this batch
actionsarrayOrdered list of action objects

Action object fields

FieldTypeDescription
indexint0-based position in the session sequence
typestringLowercase event type: "pageview", "click", "submit", "type", "focus", "blur"
titlestringHuman-readable label for the event
descriptionstringNatural-language description of what the user did
timestamp_startfloatUnix timestamp when the action began
timestamp_endfloatUnix timestamp when the action ended (next action’s start, or same for last)
raw_urlstringOriginal URL before canonicalization
canonical_urlstringNormalised page URL (dynamic segments → :id)

summary event

Emitted when the connector’s LLM summariser produces a prose description of a session. This is intended to replace raw action embeddings for context-window efficiency.
{
  "type":         "summary",
  "product_id":   "prod_abc",
  "session_id":   "ps_abc123",
  "summary":      "The user navigated to the Dashboard, exported a CSV report, then opened account settings to update their billing plan.",
  "replaces":     12,
  "forwarded_at": 1700000060.0
}

Fields

FieldTypeDescription
typestringAlways "summary"
product_idstringConnector product identifier
session_idstring | nullUser session identifier
summarystringProse description of the session
replacesintNumber of individual actions this summary condenses
forwarded_atfloatUnix timestamp when the connector forwarded this summary

SSE frame format

Events arrive as standard SSE frames. The data field contains the JSON payload above.
data: {"type":"actions","product_id":"prod_abc","session_id":"ps_abc123",...}

data: {"type":"summary","product_id":"prod_abc","session_id":"ps_abc123",...}

event: heartbeat
data:
The SDK silently ignores heartbeat frames — they are keep-alive pings sent every 30 seconds.