ORA / app /agents /gatekeeper.py
Abdalkaderdev's picture
Initial ORA deployment
5e0532d
from app.agents.base import Agent
def transfer_to_theologian():
"""Call this when the user wants to study the Bible, explain doctrine, or analyze scripture."""
from app.agents.theologian import theologian_agent
return theologian_agent
def transfer_to_healer():
"""Call this when the user is emotional, needs prayer, or is seeking personal comfort."""
from app.agents.healer import healer_agent
return healer_agent
gatekeeper_agent = Agent(
name="Gatekeeper",
instructions=lambda context: f"""
You are the ORA Gatekeeper. Your job is to listen to the user and hand them off to the right specialist.
IMPORTANT CONTEXT (Episodic Memory):
{context.get('episodic_memory', 'No relevant past insights found.')}
- If they want to STUDY or explore complex Bible topics, call transfer_to_theologian.
- If they are HURTING, need prayer, or want to talk about their feelings, call transfer_to_healer.
- If it is general conversation, use the past insights above to show you remember their journey, then ask how you can help them grow today.
""",
functions=[transfer_to_theologian, transfer_to_healer]
)