> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ag2.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

As conversational AI evolves, real-time voice interactions are becoming essential in domains like customer support, healthcare, and virtual assistance. AG2 expands its capabilities by introducing [**`RealtimeAgent`**](/docs/api-reference/autogen/agentchat/realtime/experimental/RealtimeAgent), a powerful agent which enables seamless real-time communication through multiple adapters.

## How RealtimeAgent Works

[**`RealtimeAgent`**](/docs/api-reference/autogen/agentchat/realtime/experimental/RealtimeAgent) acts as the central component for handling voice-based interactions. It integrates with various adapters, allowing developers to choose the best communication channel for their applications. The agent supports:

* **Real-Time Voice Interactions**: Enables natural and immediate conversations with users.
* **Swarm Integration**: Delegates complex tasks to AG2 Swarm teams during live interactions.
* **Developer-Friendly APIs**: Provides straightforward integration for building real-time AI-driven experiences.

## Available Communication Methods for RealtimeAgent

### 1. WebSocket Audio Adapter

For web-based applications, [**`WebSocketAudioAdapter`**](/docs/api-reference/autogen/agentchat/realtime/experimental/WebSocketAudioAdapter#websocketaudioadapter) eliminates the need for external telephony services, offering:

* **Direct Browser Integration**: Streams real-time audio via WebSockets.
* **Faster Setup**: Avoids Twilio’s complex configuration and account verification.
* **Reduced Latency & Cost**: Bypasses telephony platforms, minimizing dependency on external services.

🔗 [Explore the Walk-through](/docs/user-guide/advanced-concepts/realtime-agent/websocket)

### 2. WebRTC Integration

For high-quality, peer-to-peer audio streaming, [**`WebRTC`**](https://webrtc.org/) integration provides:

* **Low-Latency Communication**: Direct peer-to-peer audio streaming ensures real-time responsiveness.
* **Adaptive Audio Quality**: Dynamically adjusts based on network conditions.
* **Secure & Widely Supported**: Uses WebRTC encryption and works across all modern browsers.

🔗 [Explore the Walk-through](/docs/user-guide/advanced-concepts/realtime-agent/webrtc)

### 3. Twilio Audio Adapter

AG2’s [**`TwilioAudioAdapter`**](/docs/api-reference/autogen/agentchat/realtime/experimental/TwilioAudioAdapter#twilioaudioadapter) connects [**`RealtimeAgent`**](/docs/api-reference/autogen/agentchat/realtime/experimental/RealtimeAgent) to Twilio’s telephony services, allowing seamless voice call handling with:

* **Telephony Support**: Direct integration with phone networks via Twilio.
* **Scalability**: Supports enterprise-level deployments for customer service applications.
* **Swarm Team Collaboration**: Allows delegation of tasks to specialized AI agents during live calls.

🔗 [Explore the Walk-through](/docs/user-guide/advanced-concepts/realtime-agent/twilio)

<div className="edit-url-container">
  <a className="edit-url" href="https://github.com/ag2ai/ag2/edit/main/website/docs/user-guide/advanced-concepts/realtime-agent/index.mdx" target="_blank"><Icon icon="pen" iconType="solid" size="13px" /> Edit this page</a>
</div>
