By Sagar Shankaran, Founder of CallSphere
Learn how to build an AI agent that manages church service schedules, promotes events, handles prayer request submissions, and routes pastoral care needs appropriately.
Key takeaways
Churches serve as community hubs where people seek information about service times, register for events, submit prayer requests, and connect with pastoral staff. Church offices typically operate with limited staff and volunteers, yet the congregation expects timely, compassionate responses. An AI communication agent can handle routine inquiries instantly while ensuring sensitive matters like prayer requests and pastoral needs reach the right person.
The key design constraint is sensitivity. A church communication agent must balance efficiency with warmth, and it must recognize when a conversation requires human pastoral care rather than automated responses.
Model the core entities: services, events, and prayer requests.
Hear it before you finish reading
Talk to a live CallSphere AI voice agent in your browser — 60 seconds, no signup.
flowchart LR
INPUT(["User intent"])
PARSE["Parse plus<br/>classify"]
PLAN["Plan and tool<br/>selection"]
AGENT["Agent loop<br/>LLM plus tools"]
GUARD{"Guardrails<br/>and policy"}
EXEC["Execute and<br/>verify result"]
OBS[("Trace and metrics")]
OUT(["Outcome plus<br/>next action"])
INPUT --> PARSE --> PLAN --> AGENT --> GUARD
GUARD -->|Pass| EXEC --> OUT
GUARD -->|Fail| AGENT
AGENT --> OBS
style AGENT fill:#4f46e5,stroke:#4338ca,color:#fff
style GUARD fill:#f59e0b,stroke:#d97706,color:#1f2937
style OBS fill:#ede9fe,stroke:#7c3aed,color:#1e1b4b
style OUT fill:#059669,stroke:#047857,color:#fff
from dataclasses import dataclass, field
from datetime import datetime, date, time
from typing import Optional
from enum import Enum
from uuid import uuid4
class ServiceType(Enum):
SUNDAY_WORSHIP = "sunday_worship"
WEDNESDAY_BIBLE_STUDY = "wednesday_bible_study"
YOUTH_SERVICE = "youth_service"
SPECIAL_EVENT = "special_event"
class PrayerRequestPriority(Enum):
GENERAL = "general"
URGENT = "urgent"
PASTORAL_CARE = "pastoral_care"
CRISIS = "crisis"
@dataclass
class ServiceSchedule:
service_id: str = field(default_factory=lambda: str(uuid4()))
service_type: ServiceType = ServiceType.SUNDAY_WORSHIP
day_of_week: str = "Sunday"
start_time: time = field(default_factory=lambda: time(10, 0))
end_time: time = field(default_factory=lambda: time(11, 30))
location: str = "Main Sanctuary"
pastor: str = ""
description: str = ""
has_childcare: bool = True
livestream_url: Optional[str] = None
@dataclass
class PrayerRequest:
request_id: str = field(default_factory=lambda: str(uuid4()))
requester_name: str = ""
requester_email: Optional[str] = None
requester_phone: Optional[str] = None
request_text: str = ""
priority: PrayerRequestPriority = PrayerRequestPriority.GENERAL
is_confidential: bool = False
submitted_at: datetime = field(default_factory=datetime.utcnow)
assigned_to: Optional[str] = None
follow_up_date: Optional[date] = None
The agent answers questions about service times, locations, and available programs.
from agents import function_tool
service_schedules = [
ServiceSchedule(
service_type=ServiceType.SUNDAY_WORSHIP,
day_of_week="Sunday",
start_time=time(9, 0),
end_time=time(10, 15),
location="Main Sanctuary",
pastor="Pastor James",
description="Traditional worship service with hymns",
has_childcare=True,
livestream_url="https://live.gracechurch.org",
),
ServiceSchedule(
service_type=ServiceType.SUNDAY_WORSHIP,
day_of_week="Sunday",
start_time=time(11, 0),
end_time=time(12, 15),
location="Main Sanctuary",
pastor="Pastor James",
description="Contemporary worship service",
has_childcare=True,
livestream_url="https://live.gracechurch.org",
),
ServiceSchedule(
service_type=ServiceType.WEDNESDAY_BIBLE_STUDY,
day_of_week="Wednesday",
start_time=time(19, 0),
end_time=time(20, 30),
location="Fellowship Hall",
pastor="Pastor Sarah",
description="Midweek Bible study and prayer",
has_childcare=False,
),
]
@function_tool
async def get_service_times(
service_type: str = "all",
) -> dict:
"""Get church service times and details."""
results = []
for svc in service_schedules:
if service_type != "all" and svc.service_type.value != service_type:
continue
results.append({
"type": svc.service_type.value,
"day": svc.day_of_week,
"time": f"{svc.start_time.strftime('%I:%M %p')} - "
f"{svc.end_time.strftime('%I:%M %p')}",
"location": svc.location,
"pastor": svc.pastor,
"description": svc.description,
"childcare": svc.has_childcare,
"livestream": svc.livestream_url,
})
return {"services": results}
Prayer requests require special care. The agent classifies urgency and routes accordingly.
prayer_requests_db: list[PrayerRequest] = []
CRISIS_KEYWORDS = [
"suicide", "self-harm", "abuse", "emergency",
"dying", "hospice", "immediate danger",
]
@function_tool
async def submit_prayer_request(
requester_name: str,
request_text: str,
requester_email: str = "",
requester_phone: str = "",
is_confidential: bool = False,
) -> dict:
"""Submit a prayer request with automatic priority classification."""
# Detect crisis language for immediate escalation
text_lower = request_text.lower()
priority = PrayerRequestPriority.GENERAL
if any(kw in text_lower for kw in CRISIS_KEYWORDS):
priority = PrayerRequestPriority.CRISIS
elif any(kw in text_lower for kw in ["hospital", "surgery", "accident"]):
priority = PrayerRequestPriority.URGENT
elif any(kw in text_lower for kw in ["counseling", "marriage", "grief"]):
priority = PrayerRequestPriority.PASTORAL_CARE
request = PrayerRequest(
requester_name=requester_name,
request_text=request_text,
requester_email=requester_email or None,
requester_phone=requester_phone or None,
priority=priority,
is_confidential=is_confidential,
)
# Route based on priority
if priority == PrayerRequestPriority.CRISIS:
request.assigned_to = "Pastor James (Senior Pastor)"
elif priority == PrayerRequestPriority.PASTORAL_CARE:
request.assigned_to = "Pastor Sarah (Care Pastor)"
else:
request.assigned_to = "Prayer Team"
prayer_requests_db.append(request)
response = {
"status": "submitted",
"request_id": request.request_id,
"priority": priority.value,
"assigned_to": request.assigned_to,
}
if priority == PrayerRequestPriority.CRISIS:
response["urgent_note"] = (
"This request has been flagged as urgent. "
"A pastor will reach out within the hour. "
"If you are in immediate danger, please call 911."
)
return response
from agents import Agent, Runner
church_agent = Agent(
name="Grace Church Communication Agent",
instructions="""You are the communication agent for Grace
Community Church. Your tone should be warm, welcoming, and
compassionate. Your responsibilities:
1. Answer questions about service times, locations, and programs
2. Help people register for church events
3. Receive prayer requests with sensitivity and care
4. Recognize crisis language and escalate immediately
5. For confidential requests, confirm they will only be
shared with the assigned pastor
6. Always provide the church crisis line (555-PRAY) for
urgent needs outside office hours
7. If someone expresses suicidal thoughts, provide the
988 Suicide & Crisis Lifeline number immediately
8. Never attempt to provide counseling — route to pastors""",
tools=[
get_service_times,
submit_prayer_request,
],
)
result = Runner.run_sync(
church_agent,
"Hi, I am new to the area and looking for a church. "
"What are your Sunday service times? Do you have childcare?",
)
print(result.final_output)
When a requester marks a prayer request as confidential, the agent stores it with the is_confidential flag set to True. The request is routed only to the assigned pastor, not to the general prayer team. The agent confirms to the requester that their request will be kept private and shared only with their assigned pastoral contact.
Still reading? Stop comparing — try CallSphere live.
CallSphere ships complete AI voice agents per industry — 14 tools for healthcare, 10 agents for real estate, 4 specialists for salons. See how it actually handles a call before you book a demo.
The agent immediately flags the request as crisis priority and assigns it directly to the senior pastor. The response includes the 988 Suicide and Crisis Lifeline number and a note that a pastor will reach out within the hour. The agent does not attempt to provide counseling or advice — it focuses on immediate resource connection and human handoff.
Yes. Add an events database and a register_for_event tool that checks capacity, collects participant details, and sends confirmation. Common church events include vacation Bible school, small groups, retreats, and community dinners. The tool should track waitlists when events reach capacity.
#ChurchTechnology #CommunityAI #EventManagement #AgenticAI #Python #LearnAI #AIEngineering

Written by
Sagar Shankaran· Founder, CallSphere
LinkedInSagar Shankaran is the founder of CallSphere, where he builds production AI voice and chat agents deployed across healthcare, hospitality, real estate, and home services. He writes about agentic AI, LLM engineering, and shipping voice agents that handle real calls in production.
See how AI voice agents work for your industry. Live demo available -- no signup required.
The 2026 desktop AI agent landscape — ServiceNow Project Arc, Anthropic Claude offerings, OpenAI agents, and Google Mariner. A buyer's map.
Step-by-step build of a working agent with the OpenAI Agents SDK — Agent class, tools, handoffs, tracing — plus an eval pipeline that catches regressions before merge.
An agentic-AI perspective on Anthropic Skills system, covering orchestration patterns, tool use, and how agent tooling fits production agent stacks.
Enterprise CIO Guide perspective on Comet's general-availability launch put an agentic browser in front of millions of consumers, and it works better than the demos suggested.
Enterprise CIO Guide perspective on Harvey AI's enterprise rollout numbers show legal agents have moved past the pilot stage at AmLaw 100 firms.
Enterprise CIO Guide perspective on Hippocratic AI's deployment numbers show healthcare voice agents are moving from pilot to production across major US health systems.
© 2026 CallSphere Inc. All rights reserved.
Made within San Francisco