Overview
Bring your agent to production in your product
Once you've built and configured your agent, the next step is connecting it to your product. This section covers how to establish a connection, configure the session, and communicate with the agent in real time.
Connections
The Companion API supports several connection methods depending on your use case.
WebRTC is the recommended option for browser-based experiences. The Web SDK provides a ready-made UI component that you can embed directly in your website, giving your users a full audio and video connection to your agent out of the box.
For audio-only use cases, you have three options: WebSockets provide a lightweight audio stream over a persistent connection, while VoIP and SIP integrate with telephony infrastructure for traditional phone-based interactions.
WebRTC
Connect via the Web SDK with audio and video support
WebSockets
Audio-only connection over WebSockets
VoIP
Audio-only connection over VoIP
SIP
Audio-only connection over SIP
Configuration
Every connection starts with a configuration — the request body where you specify which companion, tools, knowledge, FAQs, language, and provider settings to use for the session. You can also enable cross-session memory and pass user context.
Messaging
Once connected, your client communicates with the agent through events and commands. The server pushes events as the conversation progresses, and your client can send text messages and update session settings in real time.