Skip to content
xJoeyCodesPublic

About

multi-agent healthcare assistant built with AG2 (AutoGen)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

3 Commits

Folders and files

Repository files navigation

Cura

Cura is a multi-agent healthcare assistant built with AG2 (AutoGen). It combines two specialist chatbot flows into one professional console application:

  1. General Healthcare Consultation
  2. Mental Health Consultation

The project keeps the GroupChat architecture, but moves the code into a clean Python package that runs with python main.py.

Architecture

Cura uses a small orchestration layer and two specialist workflows:

  • main.py handles the console UX and consultation selection.
  • config.py loads 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

Folder Structure

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

Installation

Create and activate a virtual environment, then install dependencies:

pip install -r requirements.txt

Environment Setup

Create 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=false

The application reads these values with python-dotenv and os.getenv().

Running the Project

Start the application with:

python main.py

At 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.

Workflow Behavior

General Healthcare

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.

Mental Health

The patient agent starts the conversation, then the GroupChat moves through emotion analysis and therapy recommendation in order.

Notes

  • 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.

Disclaimer

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.

About

multi-agent healthcare assistant built with AG2 (AutoGen)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages