This page documents all configuration files and environment variables used by the Curaway backend. Configuration is split between YAML files (checked into the repo) and environment variables (managed per deployment).
The guardrails configuration controls the AI agent's input classification and output validation. It prevents the agent from soliciting or disclosing sensitive information and keeps conversations within the medical tourism intake scope.
The output validator scans every LLM response against these 12 regex patterns. If any pattern matches, the response is blocked and a safe fallback is returned instead.
Pattern ID
Description
diagnosis_statement
Statements like "you have [condition]" or "you are diagnosed with"
dosage_recommendation
Any mention of specific drug dosages
treatment_prescription
Direct treatment prescriptions ("you should take", "I recommend the drug")
prognosis_prediction
Survival rates, recovery time guarantees
lab_interpretation
Interpreting specific lab values as normal/abnormal
emergency_self_treat
Instructions for self-treating an emergency
insurance_guarantee
Guaranteeing insurance coverage or reimbursement
price_guarantee
Guaranteeing specific treatment costs
legal_opinion
Any legal advice or liability statements
credential_leak
API keys, passwords, or internal URLs in the response
When a message is blocked, the system returns a pre-configured response template:
response_templates:medical_advice:>I understand your concern, but I'm not able to provide medical diagnosesor treatment recommendations. I can help connect you with qualifiedmedical professionals who can properly evaluate your condition.emergency:>If you are experiencing a medical emergency, please call your localemergency services immediately. I can help you find appropriate careafter your immediate needs are addressed.pii_solicitation:>For your safety, please do not share sensitive personal informationlike social security numbers or credit card details in this chat.Any required information will be collected securely during theformal intake process.off_topic:>I'm here to help with your medical travel needs. Could you tell memore about the medical procedure you're interested in or thedestination you're considering?