How it works
- A telephony provider, LiveKit room, or campaign attach request reaches a fleet worker.
- CXB Core reserves one call slot through
CallTracker. - CXB Core fetches bot configuration from CXB API.
- The pipeline runs: customer speech -> STT -> LLM/tools -> TTS -> audio response.
- On call end: recording uploads, auto-disposition/post-call analysis runs, and durable result delivery sends the call back to CXB API.
Transports
CXB Core supports four transport modes:| Transport | Protocol | Audio | Use case |
|---|---|---|---|
| WebSocket | WebSocket WSS | 8kHz LINEAR16 | WebSocket telephony dialler |
| LiveKit SIP Inbound | LiveKit SDK | 16kHz | DID → LiveKit room → bot |
| LiveKit SIP Outbound | LiveKit SDK | 16kHz | CXB API-triggered outbound calls |
| Exotel | Exotel WebSocket | 8kHz LINEAR16 | Exotel Voicebot applet |
- Campaign attach (
POST /attach) — CXB Dialler creates and screens the LiveKit SIP call first, then asks CXB Core to join the already-answered room as the bot. - Web widget (
POST /livekit/widget) — embeddable browser web-call entry point that joins a LiveKit room and runs the same pipeline.
Agent Desk handoff
On the LiveKit routes (inbound, outbound, attach), instead of a SIP transfer the bot can escalate to a human agent: CXB Core enqueues a durable handoff to CXB API and starts a hold worker that keeps the caller engaged while an agent is located. A successful enqueue setsdisconnected_by = "transfer_to_agent", and the hard route timeout deliberately does not tear down a call that has been handed off.
Tech stack
| Component | Technology |
|---|---|
| Runtime | Python 3.12, FastAPI, uvicorn |
| Pipeline framework | the media pipeline framework |
| STT | streaming STT, turn-detecting STT, multilingual STT |
| LLM | the LLM provider, the managed LLM platform |
| TTS | the text-to-speech (TTS) engine |
| VAD | voice activity detection (VAD) |
| Turn detection | the turn-detection model |
| Recording storage | S3-compatible storage: DigitalOcean Spaces or MinIO |
| Package manager | uv |
Statelessness
CXB Core is architecturally stateless with respect to business data. It does not own bots, campaigns, users, call history, CRM mappings, or analytics. Those live in CXB API and MongoDB. The cross-call state inside a worker is operational:CallTrackertracks active call IDs to enforceMAX_CONCURRENT_CALLS.- Result and Agent Desk outboxes persist delivery attempts so transient CXB API failures do not immediately lose post-call results or handoff requests.
- Provider clients and caches may be reused inside the process for performance.