Overview
Retell AI is a specialized conversational voice engine designed for sub-second conversational latency (~350 ms) and human-like turn-taking. In BrokerOS, the Retell integration is implemented inintegrations/voice/agents/retell/src/index.ts under the Turborepo workspace package @brokeros/int-agent-retell.
BrokerOS administrators configure and manage Retell AI directly through the Web UI at Dashboard -> Marketing -> Voice -> Settings. All API credentials are encrypted using AES-256-GCM and stored in PostgreSQL (VoiceAgentIntegration).
Architecture and Dispatch Sequence
The Retell integration implements theIVoiceAgentProvider contract from @brokeros/types.
Step 1: Obtain Credentials from Retell AI
- Log into your account at beta.retellai.com.
- Navigate to API Keys in the left sidebar menu.
- Click Create API Key and copy your secret key (starting with
key_). - In the Phone Numbers tab, purchase or link an outbound phone number for Caller ID display.
- In the Agents tab, create or inspect your target agent persona.
Step 2: Connect in the BrokerOS Web Dashboard
In your BrokerOS dashboard:- Navigate to Dashboard -> Marketing -> Voice -> Settings.
- Select the Gateways & Voice Platforms tab (
/dashboard/marketing/voice/settings?tab=providers). - Click the AI Voice Platforms sub-tab.
- Click Add Platform and select Retell AI.
- Fill in the modal connection fields:
- Click Save & Verify Engine. BrokerOS sends a live verification request to
GET https://api.retellai.com/list-agents. Once confirmed, the key is encrypted via AES-256-GCM and stored inVoiceAgentIntegration.
Step 3: Webhook Telemetry Handling
When a call concludes, Retell automatically posts post-call analytics and diarized transcripts to the BrokerOS webhook route:parseRetellWebhookEvent parser automatically captures:
- Audio recording URL
- Speaker diarized transcript (Agent vs Lead)
- Sentiment classification (Positive, Neutral, Negative)
- Extracted client budget and location objections
Integration Implementation Details
The Retell client and call dispatcher are located inintegrations/voice/agents/retell/src/index.ts and integrations/voice/agents/retell/src/retell-dispatcher.ts.
Live Verification Engine
When tested in the UI,RetellAgentClient.validateCredentials() executes an authenticated health check: