Skip to content

OpenAIRealtimeAgentEvent

Discriminated union of events emitted by OpenAIRealtimeAgent via onAgentEvent.

type OpenAIRealtimeAgentEvent = 
  | {
  type: "user_started_speaking";
}
  | {
  type: "user_stopped_speaking";
}
  | {
  content: string;
  role: "user" | "assistant";
  type: "conversation_text";
}
  | {
  delta: string;
  type: "agent_transcript_delta";
}
  | {
  type: "agent_audio_done";
}
  | {
  arguments: string;
  callId: string;
  name: string;
  type: "function_call";
}
  | {
  code?: string;
  message: string;
  type: "error";
};

Defined in: src/providers/agent/openai/types.ts:218

Discriminated union of events emitted by OpenAIRealtimeAgent via onAgentEvent.

Remarks

These are camelCase, client-friendly views of the raw Realtime server events the provider considers interesting. Subscribe for UI state (speaking indicators, live captions) beyond what the SDK-level events provide.

© 2026 CompositeVoice. All rights reserved.

Font size
Contrast
Motion
Transparency