{"id":30059661,"url":"https://github.com/joyceannie/multi_agent_medical_system","last_synced_at":"2025-08-20T19:23:47.949Z","repository":{"id":308081868,"uuid":"1031497798","full_name":"joyceannie/Multi_Agent_Medical_System","owner":"joyceannie","description":"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. ","archived":false,"fork":false,"pushed_at":"2025-08-13T19:11:52.000Z","size":179,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-13T21:21:06.375Z","etag":null,"topics":["clinical-notes","fastapi","healthcare","huggingface","icd10-codes","image-analysis","langchain","langgraph","langsmith","llm","medgemma","medical-application","medical-assistant","multi-agent-systems","natural-language-processing","python","pytorch","radiology","soap-notes","transformers"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joyceannie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-03T21:37:47.000Z","updated_at":"2025-08-13T19:24:46.000Z","dependencies_parsed_at":"2025-08-04T03:44:00.582Z","dependency_job_id":"00cd60a0-d934-4353-8b73-99b5bd798966","html_url":"https://github.com/joyceannie/Multi_Agent_Medical_System","commit_stats":null,"previous_names":["joyceannie/multi_agent_medical_system"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joyceannie/Multi_Agent_Medical_System","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyceannie%2FMulti_Agent_Medical_System","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyceannie%2FMulti_Agent_Medical_System/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyceannie%2FMulti_Agent_Medical_System/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyceannie%2FMulti_Agent_Medical_System/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joyceannie","download_url":"https://codeload.github.com/joyceannie/Multi_Agent_Medical_System/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joyceannie%2FMulti_Agent_Medical_System/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271370314,"owners_count":24747804,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-20T02:00:09.606Z","response_time":69,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["clinical-notes","fastapi","healthcare","huggingface","icd10-codes","image-analysis","langchain","langgraph","langsmith","llm","medgemma","medical-application","medical-assistant","multi-agent-systems","natural-language-processing","python","pytorch","radiology","soap-notes","transformers"],"created_at":"2025-08-08T01:36:19.599Z","updated_at":"2025-08-20T19:23:47.936Z","avatar_url":"https://github.com/joyceannie.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏥 Multi-Agent Healthcare Assistant\n\nThis 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.\n\n![Multi-Agent Medical System](artifacts/multi-agent.png)\n---\n\n## 🚀 Features\n\n- 🧠 **ICD-10 Code Extraction**  \n  Extracts ICD-10 codes from free-text clinical notes using NLP models.\n\n- 🖼️ **Medical Image Analysis**  \n  Supports analysis of radiology images (X-ray, MRI, etc.) using multimodal models like MedGemma.\n\n- 📋 **SOAP Note Generation**  \n  Generates structured SOAP notes from raw clinical transcripts.\n\n- 🧩 **Multi-Agent Architecture**  \n  Built with modular agents for each task, easily extensible and integrated via `agentic_workflow.py`.\n\n- 🔌 **FastAPI Backend**  \n  Exposes an endpoint to upload both clinical text and medical images.\n\nThe 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.\n\nAll 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. \n\n\nHere is an architecture diagram:\n\n![Workflow Graph](artifacts/langgraph_workflow.png)\n\n---\n\n## 🎬 Demo\n\nWatch a quick demo of the Multi-Agent Medical System in action:\n\n[\u003cvideo src=\"artifacts/demo.mp4\" controls width=\"600\"\u003e\u003c/video\u003e\n](https://github.com/user-attachments/assets/d5451b68-ee10-4f70-8876-39fdf3886654)\n\n\n---\n\n## 📊 Monitoring\n\n\nThe app is monitored using LangSmith.\n\n![Langgraph Runs](artifacts/runs.png)\n\n---\n## 📝 Requirements\n\nThe current version of the app is using [mlx- version](https://huggingface.co/mlx-community/medgemma-4b-it-4bit) of medgemma model. The app is run locally on a machine with 48 GB RAM and Apple M4 Max chip. \n\n---\n\n## 📦 Installation\n\n### 1. Clone the repo\n\n```bash\ngit clone https://github.com/joyceannie/Multi_Agent_Medical_System.git\ncd Multi_Agent_Medical_System\n```\n\n### 2. Setup Python environment\n```bash\npython3.11 -m venv venv\nsource venv/bin/activate\npip install --upgrade pip\npip install -r requirements.txt\n```\n\n### 3. Setup .env file in the root directory with the following format\n```bash\nLANGSMITH_TRACING=\"true\"\nLANGSMITH_ENDPOINT=\"\u003cyour-langsmith-endpoint\u003e\"\nLANGSMITH_API_KEY=\"your-langsmith-api-key\"\nLANGSMITH_PROJECT=\"your-langsmit-project\"\n```\n\n\n### 4. Run the app\n```\nuvicorn app.main:app --reload\n```\n\nGoto http://localhost/8000 and interact with the app.\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoyceannie%2Fmulti_agent_medical_system","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoyceannie%2Fmulti_agent_medical_system","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoyceannie%2Fmulti_agent_medical_system/lists"}