Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Principle:Openai Openai node Realtime Session Configuration

From Leeroopedia
Revision as of 17:59, 16 February 2026 by Admin (talk | contribs) (Auto-imported from principles/Openai_Openai_node_Realtime_Session_Configuration.md)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Knowledge Sources
Domains Realtime, Configuration
Last Updated 2026-02-15 00:00 GMT

Overview

A principle for configuring a Realtime API session with modalities, voice settings, instructions, and tool definitions after establishing a WebSocket connection.

Description

Realtime Session Configuration customizes the behavior of an active Realtime session. After connection, the session has default settings. The client sends a session.update event to configure: supported modalities (text, audio, or both), voice selection, system instructions, input/output audio formats, turn detection settings, and available tools.

The server acknowledges configuration with a session.updated event. Configuration can be updated at any time during the session.

Usage

Use this principle immediately after establishing a Realtime connection to set session parameters. Can also be used mid-session to change behavior (e.g., switching voice or adding tools).

Theoretical Basis

Session configuration follows a Configure After Connect pattern:

// 1. Connection established (session.created event received)
// 2. Send session configuration
rt.send({
    type: 'session.update',
    session: {
        modalities: ['text', 'audio'],
        instructions: 'You are a helpful assistant.',
        voice: 'alloy',
        input_audio_format: 'pcm16',
        output_audio_format: 'pcm16',
        turn_detection: { type: 'server_vad' },
        tools: [...],
    },
})
// 3. Server confirms: session.updated event

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment