Skip to main content

Knowledge > Products > Voice Agent

Voice Agent Overview

What It Is

The ChurchWiseAI Voice Agent is an AI-powered phone receptionist that answers church calls 24/7. When a member, visitor, or community member calls a church phone number, the voice agent picks up immediately, greets the caller by church name, and handles their request -- prayer submissions, service time questions, visitor welcome, callback scheduling, directions, giving, and more.

The agent speaks naturally using Cartesia Sonic text-to-speech, understands callers via Deepgram speech-to-text, and reasons through requests using large language models. It is not an IVR menu tree. Callers speak naturally and the agent responds conversationally.

Agent Architecture: Two Agents, Not Four

The voice agent uses a two-agent architecture: Coordinator and Care.

AgentRoleLLMTemperature
CoordinatorFront door for all calls. Handles general inquiries, service times, events, directions, visitor intake, giving/tithing, and event registration. Routes to Care when pastoral topics arise.Gemini 2.5 Flash0.7
CarePastoral care specialist. Handles prayer requests, grief, loss, emotional distress, crisis situations, and callback scheduling for pastoral follow-up.Claude Haiku 4.50.4

Why Two Agents, Not Four

An earlier design split responsibilities across four agents (Coordinator, Care, Stewardship, Discipleship). This was reduced to two for phone-specific reasons:

  • Phone calls are linear. Unlike chat, there is no sidebar or typing indicator. Every handoff creates a silence gap that feels like a dropped call. Fewer agents = fewer gaps.
  • Stewardship merged into Coordinator. Giving/tithing questions are logistically similar to service times -- the caller wants a link or an answer, not pastoral depth. The Coordinator handles giving directly via the send_giving_link tool.
  • Discipleship deferred. Discipleship content (Bible study, theological questions) is better served by the chatbot where callers can read lengthy responses. The voice agent keeps calls short and action-oriented.

Why Verbal Handoff, Not Menus

The handoff from Coordinator to Care is conversational, not menu-driven. The Coordinator empathizes first ("I'm sorry to hear that"), asks consent ("Would you like to speak with someone who can help with that?"), then transfers. This mirrors how a real church receptionist would handle a caller who starts crying.

There is no "Press 1 for prayer, Press 2 for service times" menu. Callers speak naturally and the agent routes based on intent.

Technology Stack

ComponentTechnologyNotes
SDKLiveKit Agents SDK (livekit-agents~=1.5, Python)Multi-turn voice agent framework
HostingLiveKit Cloud + RailwayLiveKit Cloud handles SIP gateway and room management; Railway hosts the Python agent worker
STTDeepgramVia livekit-plugins-deepgram
TTSCartesia SonicVia livekit-plugins-cartesia
Primary LLMGemini 2.5 FlashCoordinator agent
Care LLMClaude Haiku 4.5Care agent (better empathy)
Fallback LLMsCross-fallbackCoordinator falls back to Haiku; Care falls back to Gemini
TelephonyTwilio SIP trunkPhone number provisioning; SIP trunk forwards to LiveKit Cloud SIP gateway
DatabaseSupabaseChurch config, call logs, prayer requests, visitor contacts
EmbeddingsOpenAI text-embedding-3-smallRAG vector search (1536 dimensions)

Multi-Tenant Architecture

ONE deployed agent instance serves ALL churches. There is no per-church deployment. When a call arrives:

  1. The inbound Twilio number is matched to a church via PHONE_REGISTRY (static dict) or church_voice_agents table (DB lookup).
  2. The church's full configuration is loaded from Supabase (voice settings, plan tier, feature toggles, custom FAQs, staff, hours, events).
  3. The agent is built on-the-fly with church-specific prompts, tools, and RAG context.
  4. The call proceeds. All tool actions (prayer requests, callbacks, visitor captures) are saved against that church's ID.

New customer onboarding requires only a database row in church_voice_agents, a Twilio number configured to forward via SIP trunk to the LiveKit Cloud SIP gateway, and the SIP trunk set up to route to the LiveKit project -- no code deploy.

Pricing

Voice agent plans are monthly only (no annual option) because Deepgram (STT) and Cartesia (TTS) charge per-minute, making cost prediction for annual billing impractical.

PlanMonthly PriceIncludesCall Limit
Voice Starter$39.95Voice agent onlyPer-plan limit
Voice Pro$69.95Voice agent onlyHigher limit
Starter Bundle (Voice + Chat)$49.95Voice agent + chatbotPer-plan limit
Pro Bundle (Voice + Chat)$79.95Voice agent + chatbotHigher limit
Suite Bundle (Voice + Chat)$99.95Voice agent + chatbot, white-labelHighest limit

All tiers include Coordinator + Care agents. The tier determines call volume limits and feature toggles (e.g., Planning Center integration, Cal.com booking, white-label branding on Suite).

See C:\dev\PRICING.md for Stripe product/price IDs and complete billing rules.

Current State (March 2026)

  • 3 demo churches configured: Grace Community (Protestant), St. Joseph Catholic Parish, The Bridge Community
  • 3 Stripe subscriptions — Melvindale CoG is the designated internal test account (100% coupon cwa-validation-100pct, sub_1TIUbGFaoK5IPzNowJrWhgDM, all invoices net $0, safe for billing/Stripe/webhook E2E testing); Zewdei/Medhanialem (starter, 100% coupon through June 2026); Hope Community (starter, cancelling)
  • Migrated to LiveKit Agents SDK: The previous Cartesia LINE SDK (voice-agent-line/) has been replaced by the LiveKit Agents SDK (voice-agent-livekit/). The Cartesia managed cloud experienced a multi-day outage in early 2026 (SDK 0.2.4 + wrapper crash) which drove the migration decision.
  • Sales line active: Toll-free +1XXXXXXXXXX routes to the Sales Agent. Demo lines route to the Demo Router Agent (offers choice of demo churches).
  • Deploy mechanism: Push to main branch → Railway auto-deploys. LiveKit Cloud connects automatically via the agent worker WebSocket.

Code Location

All voice agent code lives in churchwiseai-web/voice-agent-livekit/:

FilePurpose
main.pyEntry point. Routes calls by SIP trunk phone number via JobContext.room.sip.
session.pyPhone registry, Supabase client singleton, call lifecycle helpers, TTL cache.
turn_processor.pyPer-turn pipeline: reassurance, moderation, noise filtering, RAG, farewell detection.
moderation.pyPre-LLM safety: threat detection, crisis detection, abuse escalation.
call_handler.pyNoise filtering taxonomy, mutual farewell detection, "are you there?" reassurance.
verticals/church/agents.pyCoordinator + Care agent builders.
verticals/church/prompts.pyPer-church prompt templates.
verticals/church/tools.pyPrayer requests, callbacks, visitor capture, event registration, giving.
verticals/church/config.pyTier gating, agent type mapping, voice defaults.
verticals/church/integrations/Planning Center, Cal.com, Supabase church data loader.
verticals/sales/agents.pySales Agent + Demo Router + Demo Agent builders.
verticals/sales/prompts.pySales and demo prompt templates.
verticals/sales/tools.pyChurch search, demo scheduling, support capture.
core/rag.pyRAG: embeddings, vector search (church KB + theological), formatting.
core/notifications.pyEmail + SMS alerts for threats, crises, prayer requests, callbacks.
core/tools.pyShared tools: SMS link sending, directions link.

Legacy code (do NOT modify):

  • churchwiseai-web/voice-agent-line/ — the previous Cartesia LINE SDK implementation, replaced by voice-agent-livekit/.
  • churchwiseai-web/voice-agent/ — the old Node.js/Railway voice agent, fully replaced.

Database Tables

TablePurpose
church_voice_agentsPer-church voice agent configuration (voice ID, greeting, notification contacts, feature toggles, integrations, pastor info, weekly content).
voice_call_logsCall records: SID, church ID, caller number, transcript (JSONB), AI summary, duration, status, classification fields (category, urgency, sentiment, topics, follow-up, assignee).
voice_prayer_requestsPrayer requests captured by voice agent AND chatbot (shared table despite "voice_" prefix).
voice_callback_requestsCallback requests from voice agent AND chatbot.
voice_visitor_contactsVisitor contact captures from voice agent AND chatbot.
premium_churchesPlan tier, call limits, call counts, custom church data (hours, staff, ministries, events).
organization_settingsAgent configuration (personality, enabled agents, handoff rules).
church_knowledge_baseChurch-specific FAQ pairs and uploaded document chunks (used by RAG).
moderation_violationsLogged threat, crisis, and abuse events with severity and action taken.

See Also

  • Architecture -- Multi-tenant routing, caching, TurnProcessor pipeline, session state
  • Tools -- Tool reference (prayer, callback, visitor, giving, directions, integrations)
  • Prompts -- Prompt engineering: Coordinator and Care system prompts
  • Call Lifecycle -- From ring to classification: the full call flow
  • Care Handoff -- Consent-based warm handoff design
  • Provisioning -- New church setup: DB row + Twilio forwarding
  • Troubleshooting -- Common issues and resolution steps