Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Realtime API and Voice Agents

Realtime API and Voice Agents

Realtime API und Voice Agents – Die nächste Generation interaktiver KI-Systeme

Klassische Chatbots sind längst Teil des Alltags und doch stoßen sie auf anwendungsspezifische an Grenzen: Textbasierte Interaktionen wirken träge und unnatürlich. Realtime-Modelle verändern das grundlegend, indem sie schnelle, flüssige und multimodale Kommunikation in Echtzeit ermöglichen – per Sprache, Text oder Kombination. Dadurch entstehen völlig neue Anwendungsszenarien, von sprachgesteuerten Assistenten bis hin zu autonomen Systemen, die eigenständig Aufgaben ausführen und mitdenken.

Die OpenAI Agents SDK stellt dafür einen umfassenden TypeScript-Client für die Realtime API bereit. Sie vereinfacht die Entwicklung komplexer Voice Agents, abstrahiert technische Details und ermöglicht Funktionen wie dynamische Tool Calls, Guardrails und flexible Konfiguration. Im Vortrag werden praxisnahe Beispiele und Live-Demos gezeigt, die den Aufbau, die Optimierung und das Verhalten solcher Realtime-Agenten veranschaulichen – inklusive Einblicken in die Echtzeitverarbeitung und gezieltes Prompting zur Verbesserung von Reaktionsfähigkeit und Qualität.

Avatar for Linus Beckhaus

Linus Beckhaus

November 13, 2025
Tweet

Other Decks in Programming

Transcript

  1. - Low-latency - Audio native multimodal interaction - Specialized Models

    - Full feature support - Websocket or WebRTC Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Realtime STT TTS Text Model Speech-to-Speech Model Traditional Voice Pipeline Native Multimodal (Realtime)
  2. Usecases - "Actual" interactive chatbots - Hands-free application - Digital

    Assistant - Robotics - Audio native systems (e.g., call center) Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Realtime
  3. Conversation lifecycle OpenAI Realtime API Realtime API und Voice Agents

    Die nächste Generation interaktiver KI-Systeme Client Server Sending of response (including transcript) is finished ••• User Input response.done Events related to user input (speech, text, data)
  4. Conversation lifecycle OpenAI Realtime API Realtime API und Voice Agents

    Die nächste Generation interaktiver KI-Systeme Client Server ••• User Input response.done Events happening in the background conversation.item.added conversation.item.done response.created response.output_item.added conversation.item.added response.content_part.added output_audio_buffer.started response.output_audio.done response.content_part.done conversation.item.done response.output_item.done (additional out of order transcription events)
  5. Input Events (WebRTC) OpenAI Realtime API Realtime API und Voice

    Agents Die nächste Generation interaktiver KI-Systeme Server has detected speech in audio buffer Server has detected end of speech input_audio_buffer.speech_started input_audio_buffer.speech_stopped input_audio_buffer.committed Client Server Input audio buffer has been committed
  6. Input Events (Text/Data) OpenAI Realtime API Realtime API und Voice

    Agents Die nächste Generation interaktiver KI-Systeme Add data into the Conversation context (messages, function call, function call response, full audio) Trigger response/processing conversation.item.create response.create Client Server
  7. Voice Agents - Typescript client for OpenAI Realtime API -

    Abstraction of transport layer and session - Full integration into agentic framework Python version support for Realtime in beta Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme OpenAI Agents SDK https://openai.github.io/openai-agents-js/guides/voice-agents/
  8. RealtimeAgent RealtimeSession Key Components Realtime API und Voice Agents Die

    nächste Generation interaktiver KI-Systeme Voice Agents RealtimeSession RealtimeAgent Interface to session Transport Context History Configuration Agent Tools Instructions Settings Guardrails Handoffs RealtimeAgent RealtimeAgent Interface to agent
  9. Basic Setup Realtime API und Voice Agents Die nächste Generation

    interaktiver KI-Systeme Voice Agents 1. Create Realtime Agent 2. Create RealtimeSession and set initial agent 3. Establish connection 4. Start server npm run dev and get talking Use ephemeral key - Time limited - Safe - Configurable
  10. Agents SDK - Combination of Session and Agent - Initial

    session configuration - Agents have their own configuration - Update used Agent of RealtimeSession Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Configuration session.updateAgent session.updated
  11. Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme

    Tool Calling Tool Call 1 2 5 6 3 4 Code, Web, Database Agents, API, … Extend LLM capabilities - Ground with code - Perform deterministic actions - Interface with other Systems
  12. Custom tools - Executable code with metadata - tool wrapper

    - Structured output - Zod integration Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Tool Calling DEMO
  13. Using Agents as Tools - Use an (sub-)agent in a

    Tool - Blocking as all Tool Calls - Agent can run server side - Not limited to RealtimeAgents Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Tool Calling https://openai.github.io/openai-agents-js/guides/voice-agents/build/#delegation-through-tools
  14. Configuration - Tools set on RealtimeAgent - Create new Agent

    - Update Agent Config - tools attribute - Tool use behavior set on RealtimeSession - config.toolChoice attribute - Updates through underlying transport session.transport.updateSessionConfig(…) Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Tool Calling session.updateAgent session.updated
  15. Human-in-the-Loop - Sensitive actions - Pause execution until approval/rejection -

    needsApproval option - boolean - async function using context - Rejection handeled automatically - Triggers response by default Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Tool Calling Requires Approval 1 Tool Call 2 3 4 3 4 5 6 7 6 DEMO
  16. Handling Rejection Preventing response on rejection - Lower level sendFunctionCallOutput

    - Manually send result Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Tool Calling
  17. Many more features - Handoffs - Guardrails - MCP -

    Tracing - Turn detection Realtime API und Voice Agents Die nächste Generation interaktiver KI-Systeme Agents SDK