oxDocs
Browse documentation
Introduction
Vision API
Inference API
Realtime
Integrations
LiveKit & SIP
Administration
Reference

Runtime

Lifecycle and canonical events

Handle the canonical event dialect and understand every Realtime session state.

Server events

The relay converts provider-specific speech and transcript names into this single dialect. Customers should not branch on provider names.

EventStateMeaning
session.createdconnectedThe upstream admitted the session.
session.updatedreadyThe requested configuration is active.
input.speech_startedlisteningServer VAD confirmed speech; stop stale assistant playout immediately.
input.speech_stoppedthinkingServer VAD closed the user turn.
input.transcript.partiallisteningThe current full input hypothesis; replace the previous partial.
input.transcript.finalthinkingFinal transcript for the user turn.
response.createdthinkingA response generation began.
output.transcript.deltaspeakingAppend-only assistant transcript text.
output.transcript.finalspeakingFinal assistant transcript for the response.
output.audio.donespeakingNo more binary PCM packets will be emitted for this response.
response.function_call_arguments.donetool_waitExecute the named customer function and submit its result.
tool.startedtool_waitThe agent began a function call.
tool.finishedthinkingThe function result was accepted by the agent.
response.cancelledlisteningBarge-in cancelled the in-progress response.
response.donereadyThe response finished.
errorerrorA bounded protocol or runtime error occurred.
session.endclosedThe session ended and will not emit more media.
pongreadyHeartbeat response.
pandan.relay.traceunchangedRedacted relay-relative timing; contains no provider credential or wall clock.
pandan.relay.providerunchangedResolved admission route without credentials.
trace.stageunchangedRedacted per-stage deadline timing from the Ox agent runtime.

Client events

EventDirectionMeaning
session.updateclientConfigure instructions, history, voice, endpointing, reasoning, and customer functions.
conversation.item.createclientReturn the result of a customer function call.
response.createclientContinue generation after a tool result.
session.closeclientEnd the session cleanly.
pingclientApplication heartbeat.

State transitions

Normal state flow: minted → connected → ready → listening → thinking → speaking → ready. Interruption moves speaking → listening; a tool call moves thinking → tool_wait → thinking. error and closed are terminal for the current connection.

Help improve this guideFound something unclear or incomplete?
Report an issue ↗View source ↗