RealtimeSessionEventTypes
このコンテンツはまだ日本語訳がありません。
type RealtimeSessionEventTypes<TContext> = object;
Type Parameters
Section titled “Type Parameters”Type Parameter | Default type |
---|---|
|
|
Properties
Section titled “Properties”agent_end
Section titled “agent_end”agent_end: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>, string];
Triggered when an agent ends its work on a response.
agent_handoff
Section titled “agent_handoff”agent_handoff: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>, AgentWithOrWithoutHistory<TContext>];
Triggered when an agent hands off to another agent.
agent_start
Section titled “agent_start”agent_start: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>];
Triggered when an agent starts its work on a response.
agent_tool_end
Section titled “agent_tool_end”agent_tool_end: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>, FunctionTool<RealtimeContextData<TContext>>, string, object];
Triggered when an agent ends a tool call.
agent_tool_start
Section titled “agent_tool_start”agent_tool_start: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>, FunctionTool<RealtimeContextData<TContext>>, object];
Triggered when an agent starts a tool call.
audio: [TransportLayerAudio];
Triggered when there is new audio data available for playing to the user.
audio_interrupted
Section titled “audio_interrupted”audio_interrupted: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>];
Triggered when the agent is interrupted. Can be listened to by the user to stop audio playback or give visual indicators to the user.
audio_start
Section titled “audio_start”audio_start: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>];
Triggered when the agent starts generating audio.
audio_stopped
Section titled “audio_stopped”audio_stopped: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>];
Triggered when the agent stops generating audio.
error: [RealtimeSessionError];
Triggered when an error occurs.
guardrail_tripped
Section titled “guardrail_tripped”guardrail_tripped: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>, OutputGuardrailTripwireTriggered<RealtimeGuardrailMetadata>, object];
Triggered when an output guardrail is tripped.
history_added
Section titled “history_added”history_added: [RealtimeItem];
Triggered when a new item is added to the history. At this point the transcript/response might still be in progress.
history_updated
Section titled “history_updated”history_updated: [RealtimeItem[]];
Triggered when the history got updated. Contains the full history of the conversation.
mcp_tool_call_completed
Section titled “mcp_tool_call_completed”mcp_tool_call_completed: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>, RealtimeMcpCallItem];
Triggered when an MCP tool call is completed.
mcp_tools_changed
Section titled “mcp_tools_changed”mcp_tools_changed: [RealtimeMcpToolInfo[]];
Triggered when the set of currently available MCP tools changes (e.g. after a list-tools result arrives, or when the active agent changes). Carries the list of available tools filtered by the active agent’s server_labels.
tool_approval_requested
Section titled “tool_approval_requested”tool_approval_requested: [RunContext<RealtimeContextData<TContext>>, AgentWithOrWithoutHistory<TContext>, RealtimeToolApprovalRequest | RealtimeMcpApprovalRequest];
Triggered when a tool approval is requested.
transport_event
Section titled “transport_event”transport_event: [TransportEvent];
Emits all the raw events from the transport layer.