A modular multi-agent system that leverages specialized Large Language Models (LLMs) and biomedical tools to support clinical decision-making. This project simulates a collaborative team of AI clinicians, where each agent plays a distinct role (diagnosis, imaging, treatment, pharmacology, patient communication, supervision).
- Multi-Agent Collaboration: Specialized agents working together for safe, explainable outputs.
- Medical Domain LLMs: Uses cutting-edge medical and general-purpose LLMs (Palmyra-Med, Meditron, LLaMA-3).
- Evidence Retrieval: Integration with PubMed, OpenTargets, and ClinicalTrials MCP for up-to-date medical literature.
- Pharmacology Safety: Automated checks for drug–drug interactions, dosage appropriateness, and allergies.
- Explainable Communication: Patient-friendly summaries generated in natural, spoken language.
- Supervisor Oversight: Ensures safe, consistent, and guideline-adherent recommendations.
- Memory with Embeddings: Uses
sentence-transformers/all-MiniLM-L6-v2for memory and context tracking.
| Agent | Role / Function | Accurate Mode (best quality) | Fast Mode (lighter inference) |
|---|---|---|---|
| 🧠 Diagnosis Agent | Generates differential diagnoses from patient data | Palmyra-Med-70B-32K | DeepSeek R1 Medical CoT |
| 🔬 Imaging & Lab Agent | Suggests tests, interprets lab/imaging results | Meditron-7B | HuatuoGPT-o1-8B |
| 💊 Treatment Agent | Recommends treatment plans, literature-backed | Palmyra-Med-70B-32K + PubMedTool | DeepSeek-R1-Medical-CoT (Q5_K_M quantizations) |
| 🧪 Pharmacology Agent | Drug interactions, allergies, dosage safety | Meditron-7B + OpenTargets + PubMed + ClinicalTrials MCP | HuatuoGPT-o1-8B + Tools (lighter, but reasoning + tools = solid) |
| 🗣️ Patient Communication Agent | Converts outputs into empathetic, patient-friendly speech | Meta-LLaMA-3-8B-Instruct | medinote-7b |
| 🧑⚖️ Supervisor Agent | Oversees, resolves contradictions, ensures safety | Palmyra-Med-70B-32K + PubMedTool | HuatuoGPT-o1-8B |
- Python 3.12
- UV package manager (recommended)
- Git
git clone https://github.com/salihfurkaan/multi-agent-clinical-decision-support-system.git
cd multi-agent-clinical-decision-support-systemUsing UV (recommended):
uv pip install -e .Or using pip:
pip install -e .Create a .env file in the project root with your API keys:
HF_TOKEN=your_hf_keypython -m src.multiagent_clinicaldecisionsupport.mainBuild and run using Docker:
docker build -t clinical-decision-support .
docker run --env-file .env clinical-decision-supportThe system runs tasks in the following sequence:
- Diagnosis Agent → Suggests differential diagnoses
- Imaging & Lab Agent → Recommends or interprets diagnostic tests
- Treatment Agent → Proposes treatment plan, checks PubMed for evidence
- Pharmacology Agent → Validates medication safety with drug databases
- Supervisor Agent → Integrates outputs, resolves contradictions, ensures safety
- Patient Communication Agent → Generates empathetic, patient-friendly explanation
- PubMedTool → Fetch latest biomedical research (Update the EMAIL constant in pubmed_mcp.py with your email address (required by NCBI))
- OpenTargets MCP → Drug-target associations
- ClinicalTrials MCP → Clinical trials database
- Embedding Model:
sentence-transformers/all-MiniLM-L6-v2 - Purpose: Maintain patient context, support retrieval-augmented reasoning.
Run tests using pytest:
pytest tests/Contributions are welcome! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
This system is for research and educational purposes only. It is not a substitute for professional medical advice. Always consult a licensed clinician before making medical decisions.