Skip to content

A multi agent healthcare assistant system implemented using Python and Langgraph. The agents include icd10 code extractor, SOAP document generator and medical image report generator. This project uses one of the latest LLMs, MedGemma model.

License

Notifications You must be signed in to change notification settings

joyceannie/Multi_Agent_Medical_System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏥 Multi-Agent Healthcare Assistant

This project is a modular FastAPI-based application designed to simulate a real-world clinical assistant powered by multiple AI agents. It supports clinical note analysis, medical image interpretation, and structured SOAP note generation — all powered by large language and vision models.

Multi-Agent Medical System

🚀 Features

  • 🧠 ICD-10 Code Extraction
    Extracts ICD-10 codes from free-text clinical notes using NLP models.

  • 🖼️ Medical Image Analysis
    Supports analysis of radiology images (X-ray, MRI, etc.) using multimodal models like MedGemma.

  • 📋 SOAP Note Generation
    Generates structured SOAP notes from raw clinical transcripts.

  • 🧩 Multi-Agent Architecture
    Built with modular agents for each task, easily extensible and integrated via agentic_workflow.py.

  • 🔌 FastAPI Backend
    Exposes an endpoint to upload both clinical text and medical images.

The user input goes through the router agent. The router agent analyzes the input, and routes the input to either icd10 code generation agent, soap generation agent or image analysis agent.

All the agents use MedGemma model as the LLM. The LLM is run locally. In order to reduce the latency of the app, a quantized model is used.

Here is an architecture diagram:

Workflow Graph


🎬 Demo

Watch a quick demo of the Multi-Agent Medical System in action:

demo.mp4

📊 Monitoring

The app is monitored using LangSmith.

Langgraph Runs


📝 Requirements

The current version of the app is using mlx- version of medgemma model. The app is run locally on a machine with 48 GB RAM and Apple M4 Max chip.


📦 Installation

1. Clone the repo

git clone https://github.com/joyceannie/Multi_Agent_Medical_System.git
cd Multi_Agent_Medical_System

2. Setup Python environment

python3.11 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

3. Setup .env file in the root directory with the following format

LANGSMITH_TRACING="true"
LANGSMITH_ENDPOINT="<your-langsmith-endpoint>"
LANGSMITH_API_KEY="your-langsmith-api-key"
LANGSMITH_PROJECT="your-langsmit-project"

4. Run the app

uvicorn app.main:app --reload

Goto http://localhost/8000 and interact with the app.

About

A multi agent healthcare assistant system implemented using Python and Langgraph. The agents include icd10 code extractor, SOAP document generator and medical image report generator. This project uses one of the latest LLMs, MedGemma model.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published