Event ingestion is via OTLP
Events are ingested over OpenTelemetry (OTLP) as spans on the parent session trace:interaction.trackToolCall(...)) and the client emits the corresponding OTLP spans. The API
key must carry both sessions:write and events:write scopes; dashboard-generated keys include
both automatically.
Legacy REST endpoint (compatibility adapter)
The legacyPOST /api/sdk/events endpoint is still supported for externally-deployed older SDKs.
It is now a thin adapter: it translates the REST event body into a child OTLP span (plus a
root marker) on the session’s trace and runs the same ingest pipeline as POST /api/otel/v1/traces.
It requires the events:write scope (the target session must already exist and belong to the same
organization). Tool input/output are carried on the OTLP tool-call attributes, so they land under a
{ "value": ... } wrapper rather than as the raw JSON object the legacy path stored; a client’s own
traceId/spanId are preserved in the event metadata. Prefer upgrading to a current SDK, which
emits OTLP directly.
Event Types
Events still carry the same semantics regardless of transport:- tool_call — a tool your agent invoked, with its input and output.
- llm_decision — an agent decision point, with reasoning, alternatives considered, and confidence.
- state_change — a change in agent or session state.
- error — an error encountered during the session.
Next Steps
Sessions Ingestion
How sessions are ingested.
LangChain Integration
Automatic event tracking.

