Processes
GoConva runs as three deployable pieces:
The voice worker is separate on purpose — voice sessions are long-lived and
CPU-bound in a way that would degrade API latency if colocated.
Request path
A request enters the LoopBack sequence, passes through middleware, and reaches a controller. Controllers validate and route; services hold the logic; repositories talk to MongoDB. Authorization uses Casbin, with policies insrc/casbin/.
Two authentication strategies coexist: JWT for users, and workspace API keys
presented in the x-api-key header.
Data model
MongoDB, accessed through LoopBack repositories. The workspace is the tenant boundary: agents, connections, knowledge bases, CRM records, and API keys all carry aworkSpaceId, and queries are scoped by it.
All workspaces share one database today. The trade-offs of splitting per
workspace are recorded in ADR 0004.
Real-time
Socket.IO delivers live updates — new messages, conversation state, execution progress.Integrations
Each external service has a controller for its OAuth flow and a service wrapping its API. Credentials live in a connection record, encrypted at rest, keyed by aprofile string.
Adding an integration means: a controller exposing GET /connect/{service}, a
service implementing testConnection and the calls you need, registration in
ConnectController, and workflow steps that expose it to agents.
Voice
A call arrives at Twilio, which hands it to LiveKit over SIP. The Python worker joins the room, runs speech-to-text, drives the agent, and speaks the reply. LiveKit posts lifecycle events back to/webhooks/livekit so the conversation
closes out when the call ends.
The chat widget’s voice mode uses the same worker and LiveKit rooms, minus SIP
and the phone number.