Runtime
Lifecycle and canonical events
Handle the canonical event dialect and understand every Realtime session state.
SDK 0.1.0Private preview
Server events
The relay converts provider-specific speech and transcript names into this single dialect. Customers should not branch on provider names.
| Event | State | Meaning |
|---|---|---|
session.created | connected | The upstream admitted the session. |
session.updated | ready | The requested configuration is active. |
input.speech_started | listening | Server VAD confirmed speech; stop stale assistant playout immediately. |
input.speech_stopped | thinking | Server VAD closed the user turn. |
input.transcript.partial | listening | The current full input hypothesis; replace the previous partial. |
input.transcript.final | thinking | Final transcript for the user turn. |
response.created | thinking | A response generation began. |
output.transcript.delta | speaking | Append-only assistant transcript text. |
output.transcript.final | speaking | Final assistant transcript for the response. |
output.audio.done | speaking | No more binary PCM packets will be emitted for this response. |
response.function_call_arguments.done | tool_wait | Execute the named customer function and submit its result. |
tool.started | tool_wait | The agent began a function call. |
tool.finished | thinking | The function result was accepted by the agent. |
response.cancelled | listening | Barge-in cancelled the in-progress response. |
response.done | ready | The response finished. |
error | error | A bounded protocol or runtime error occurred. |
session.end | closed | The session ended and will not emit more media. |
pong | ready | Heartbeat response. |
pandan.relay.trace | unchanged | Redacted relay-relative timing; contains no provider credential or wall clock. |
pandan.relay.provider | unchanged | Resolved admission route without credentials. |
trace.stage | unchanged | Redacted per-stage deadline timing from the Ox agent runtime. |
Client events
| Event | Direction | Meaning |
|---|---|---|
session.update | client | Configure instructions, history, voice, endpointing, reasoning, and customer functions. |
conversation.item.create | client | Return the result of a customer function call. |
response.create | client | Continue generation after a tool result. |
session.close | client | End the session cleanly. |
ping | client | Application 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.