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
| Runbook | When to Use |
|---|---|
| add-chatbot.md | Provision chatbot for a new church subscription |
| chatbot-debug.md | Debug wrong responses, tool failures, or errors |
| update-kb-content.md | Add or update FAQ / knowledge base content |
| chatbot-escalation.md | Handle a Care Agent escalation notification |
| disable-chatbot.md | Disable or suspend a church's chatbot |
Key Tables
| Table | Purpose |
|---|---|
organization_settings | Per-church chatbot config (enabled, tier, personality) |
unified_rag_content | Knowledge base content (category='church_kb' for church FAQs) |
voice_prayer_requests | Prayer requests from chatbot (legacy table name — shared with voice) |
voice_callback_requests | Callback requests from chatbot (shared with voice) |
voice_visitor_contacts | Visitor captures from chatbot (shared with voice) |
product_knowledge | Runtime 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
- update-product-knowledge.md — update runtime agent knowledge
- Chatbot architecture