---
title: RealtimeAgent over WebSocket Audio Adapter
sidebarTitle: WebSocket Audio Adapter
---

!!! warning "Deprecated"
    `RealtimeAgent` is deprecated as of v0.12 and will be removed in v0.14. It relies on deprecated realtime API endpoints. This documentation will also be removed in v0.14.

![Realtime agent communication over websocket](/snippets/advanced-concepts/realtime-agent/img/websocket_communication_diagram.png)

Previously introduced [**`TwilioAudioAdapter`**](/docs/api-reference/autogen/agentchat/realtime/experimental/TwilioAudioAdapter#twilioaudioadapter) provides a robust way to connect to your [**`RealtimeAgent`**](/docs/api-reference/autogen/agentchat/realtime/experimental/RealtimeAgent), but it comes with challenges:

- **Browser Limitations**: For teams building web-first applications, integrating with a telephony platform can feel redundant.
- **Complex Setup**: Configuring Twilio accounts, verifying numbers, and setting up forwarding can be time-consuming.
- **Platform Dependency**: This solution requires developers to rely on external API, which adds latency and costs.


The [**`WebSocketAudioAdapter`**](/docs/api-reference/autogen/agentchat/realtime/experimental/WebSocketAudioAdapter#websocketaudioadapter) eliminates these challenges by allowing direct audio streaming over [WebSockets](https://fastapi.tiangolo.com/advanced/websockets/). It integrates seamlessly with modern web technologies, enabling real-time voice interactions without external telephony platforms.

import RealtimeAgent from "/snippets/advanced-concepts/realtime-agent/websocket.mdx";

<RealtimeAgent/>
