Cura is a multi-agent healthcare assistant built with AG2 (AutoGen). It combines two specialist chatbot flows into one professional console application:
- General Healthcare Consultation
- Mental Health Consultation
The project keeps the GroupChat architecture, but moves the code into a clean Python package that runs with python main.py.
Cura uses a small orchestration layer and two specialist workflows:
main.pyhandles the console UX and consultation selection.config.pyloads environment variables, builds the OpenAI client, and centralizes model settings.agents/contains the agent factories and routing logic.workflows/contains the two AG2 GroupChat flows.utils/contains reusable console helpers.
The healthcare workflow uses:
- Patient Agent
- Diagnosis Agent
- Pharmacy Agent
- Consultation Agent
The mental health workflow uses:
- Patient Agent
- Emotion Analysis Agent
- Therapy Recommendation Agent
project/
├── main.py
├── config.py
├── requirements.txt
├── .env.example
├── README.md
├── agents/
│ ├── __init__.py
│ ├── common.py
│ ├── healthcare.py
│ ├── mental_health.py
│ └── router.py
├── workflows/
│ ├── __init__.py
│ ├── general_consultation.py
│ └── mental_health_consultation.py
└── utils/
├── __init__.py
└── console.py
Create and activate a virtual environment, then install dependencies:
pip install -r requirements.txtCreate a .env file in the project root based on .env.example.
OPENAI_API_KEY=your_key_here
OPENAI_MODEL=gpt-4o
HEALTHCARE_MODEL=gpt-4o
MENTAL_HEALTH_MODEL=gpt-4o
AUTOGEN_USE_DOCKER=falseThe application reads these values with python-dotenv and os.getenv().
Start the application with:
python main.pyAt startup, Cura shows a menu for general healthcare or mental health. You can either pick a numbered option or type a free-text concern and let the router try to infer the best workflow.
The patient agent starts the conversation, then the GroupChat moves through diagnosis, pharmacy, and consultation in a round-robin flow. The consultation agent ends the exchange with CONSULTATION_COMPLETE.
The patient agent starts the conversation, then the GroupChat moves through emotion analysis and therapy recommendation in order.
- The project keeps the AG2 multi-agent design.
- API keys are never hardcoded.
- The smart router is lightweight and keyword-based so the menu still works as the reliable fallback.
This is a project to help me become familiar with the AG2 (AutoGen) framework. The medical advice provided should not be considered a substitute for professional medical consultation, diagnosis, or treatment. Always seek guidance from a qualified healthcare professional.