WebRTC for Voice Connections
Join your voice agent through LiveKit, Pipecat, or your own signaling URL.
Overview
Use the WebRTC transport when your voice agent talks over WebRTC instead of a phone line. Confident AI joins your agent as a participant and talks to it over audio. Choose your Provider at the top of the WebRTC tab:
- LiveKit (default): your agent runs on LiveKit.
- Pipecat: your agent runs on Pipecat, on Pipecat Cloud or your own server.
- Custom signaling: your agent accepts an SDP offer at a URL you host.
WebRTC calls don't ring, so the Ring timeout call limit doesn't apply and the Test call console shows Connect instead of Dial.
Configuring Your Provider
Confident AI creates a room in your LiveKit project, dispatches your agent into it, and joins as the caller.
| Field | Description |
|---|---|
| LiveKit URL | Your LiveKit server URL. It must start with wss://, for example wss://your-project.livekit.cloud. |
| API key | The API key of the LiveKit project your agent runs in. Found under Settings → Keys in LiveKit Cloud. |
| API secret | The API secret paired with the key. Used to mint the token the simulated caller joins the room with. |
| Agent name (optional) | The agent to dispatch into the room. Leave it blank if your agent joins every new room automatically. |
Confident AI starts a session on your Pipecat agent, then joins it as the caller.
| Field | Description |
|---|---|
| Start URL | Where Confident AI starts a Pipecat session. It must start with https://, for example https://api.pipecat.daily.co/v1/public/my-agent/start. |
| Transport | The transport your Pipecat agent runs on: Daily or SmallWebRTC (default). |
| API key (optional) | Your Pipecat Cloud public API key, sent as a bearer token. |
| Signaling headers (optional) | Extra headers sent when starting the session, for example for authentication. |
With Daily, Confident AI asks the start URL to create a Daily room and joins it. With SmallWebRTC, it starts a session and sends its SDP offer to that session. If your agent runs the SmallWebRTC runner yourself, you can also enter its /api/offer URL directly as the start URL.
Enter your agent's Signaling URL. It must start with https:// or wss://:
https://: Confident AIPOSTs an SDP offer to the URL withContent-Type: application/sdp, and expects an SDP answer back, either as the raw body or as JSON with ansdpfield.wss://: Confident AI sends{"type": "offer", "sdp": "..."}over the socket, and expects{"type": "answer", "sdp": "..."}back. ICE candidates can be exchanged as{"type": "candidate", ...}messages.
Signaling headers (optional) are sent with the SDP offer, so this is where you'd put an API key or bearer token your agent expects.
Testing Your Connection
Click Connect in the Test call console. The console shows Connecting… while Confident AI joins your agent. See Testing Your Connection for what each result means.
Next Steps
Multi-Turn Evals
Run multi-turn evaluations against your voice connection.
LiveKit Integration
Trace your LiveKit voice agent in production.
Last updated on