Skip to main content

RealtimeAgent

Defined in the realtime_agent module.
Agent for real-time voice conversations using OpenAI Realtime API. This agent enables bidirectional audio streaming for voice conversations, supporting both text and audio modalities with configurable voice settings.

Constructor

name
str
default:"'RealtimeAgent'"
No description available.
llm
Optional
No description available.
realtime
Optional
No description available.
instructions
Optional
No description available.
verbose
bool
default:"True"
No description available.

Methods

Usage

from praisonaiagents import RealtimeAgent
    
    agent = RealtimeAgent(
        name="VoiceAssistant",
        realtime={"voice": "nova"}
    )
    
    # Connect and start conversation
    await agent.aconnect()
    await agent.send_text("Hello!")