Skip to main content

Knowledge > Runbooks > Chatbot Operations

Chatbot Operations Runbooks

Operational procedures for managing the ChurchWiseAI chatbot — provisioning new churches, debugging responses, managing knowledge base content, and handling escalations.

Architecture Summary

The chatbot is a multi-agent RAG system served from churchwiseai-web. Each church has its own config row in organization_settings. The widget (public/churchwiseai-widget.js) embeds on any website and calls the unified API.

  • API endpoint: churchwiseai-web/src/app/api/chatbot/stream/route.ts
  • Unified CORS API: /api/chatbot/unified (serves all properties including PewSearch embed)
  • LLM chain: Claude Haiku 4.5 → Claude Sonnet 4.6 (escalate:true) → gpt-4o-mini (Anthropic 5xx fallback)
  • 4 agents: Coordinator, Care, Stewardship, Discipleship
  • Tool counts: Starter=12, Pro=35, Suite=39
  • Knowledge base: unified_rag_content (327K rows, pgvector similarity search)

Runbooks

RunbookWhen to Use
add-chatbot.mdProvision chatbot for a new church subscription
chatbot-debug.mdDebug wrong responses, tool failures, or errors
update-kb-content.mdAdd or update FAQ / knowledge base content
chatbot-escalation.mdHandle a Care Agent escalation notification
disable-chatbot.mdDisable or suspend a church's chatbot

Key Tables

TablePurpose
organization_settingsPer-church chatbot config (enabled, tier, personality)
unified_rag_contentKnowledge base content (category='church_kb' for church FAQs)
voice_prayer_requestsPrayer requests from chatbot (legacy table name — shared with voice)
voice_callback_requestsCallback requests from chatbot (shared with voice)
voice_visitor_contactsVisitor captures from chatbot (shared with voice)
product_knowledgeRuntime product info injected into all agent prompts

Tier Restrictions

  • Pro Website chatbot: Simplified toolset — Q&A + prayer request only. No RAG, no KB.
  • Starter: 12 tools
  • Pro: 35 tools
  • Suite: 39 tools (includes white-label — no "Powered by ChurchWiseAI" badge)

See Also