A sophisticated multi-agent AI system for medical diagnosis, drug repurposing analysis, and clinical insights. This platform combines symptom prediction, medical knowledge retrieval, and clinical trial analysis to provide comprehensive healthcare intelligence.
- Symptom Predictor: ML-based disease prediction from user-described symptoms
- Medical Knowledge Agent: RAG-powered medical information retrieval
- Clinical Trials Agent: Analysis of clinical trial data and drug efficacy
- Market Analysis Agent: Pharmaceutical market intelligence and forecasting
- Orchestrator: Intelligent routing and coordination between agents
- ๐ 3-Layer Medical System: Diagnosis โ Knowledge โ Triage workflow
- ๐ง RAG Integration: Vector database with medical literature (PubMed)
- ๐ก๏ธ Safety Validation: Medical integrity guards and audit logging
- ๐ Data-Driven: Operates strictly on curated medical datasets
- ๐ฏ Urgency Assessment: Triage system for medical condition prioritization
drug-repurposing-agent/
โโโ backend/ # FastAPI backend
โ โโโ main.py # API entry point
โ โโโ models.py # Database models
โ โโโ routers/ # API endpoints
โ โโโ ...
โโโ frontend/ # React/TypeScript UI
โ โโโ src/ # Source code
โ โโโ public/ # Static assets
โ โโโ ...
โโโ agents/ # AI Agents system
โ โโโ src/
โ โ โโโ agents/ # Agent implementations
โ โ โโโ core/ # Core functionality
โ โ โโโ rag/ # RAG system
โ โ โโโ ...
โ โโโ data/ # Medical datasets
โ โโโ docs/ # Agent documentation
โโโ docs/ # Project documentation
- Python 3.10+
- Node.js 18+
- Ollama (for local AI agents)
- Install from ollama.com
- Pull required model:
ollama pull llama3
git clone https://github.com/yourusername/drug-repurposing-agent.git
cd drug-repurposing-agent# Install Python dependencies
pip install -r backend/requirements.txt
# Initialize database
python backend/init_db.pycd frontend
npm installcd agents
pip install -r requirements.txtCreate a .env file in the root directory (use .env.example as template):
# Google Search Configuration
GOOGLE_API_KEY=your_google_api_key
GOOGLE_CSE_ID=your_google_cse_id
# AI Configuration
MISTRAL_API_KEY=your_mistral_api_key
GOOGLE_GENAI_KEY=your_google_genai_key
OPENROUTER_API_KEY=your_openrouter_api_key
# Ollama
OLLAMA_MODEL=llama3
# Database
DATABASE_URL=sqlite:///./medical.db
# JWT Secret
SECRET_KEY=your_secret_key_hereEnsure Ollama is running:
ollama serve# From root directory
uvicorn backend.main:app --reload --host 127.0.0.1 --port 8000API will be available at:
- API: http://127.0.0.1:8000
- Docs: http://127.0.0.1:8000/docs
# From frontend directory
cd frontend
npm run devApplication will be available at: http://localhost:5173
POST /agents/query- Query the multi-agent system{ "query": "What are the symptoms of diabetes?" }
POST /auth/register- Register new userPOST /auth/login- User loginGET /auth/me- Get current user
GET /diseases- List diseasesGET /symptoms- List symptomsPOST /predict- Predict disease from symptoms
The system uses three core medical datasets:
- symbipredict_cleaned.csv: Symptom-disease mappings for ML prediction
- disease_knowledge_enriched.csv: Disease information, symptoms, precautions
- synthetic_medical_triage.csv: Urgency assessment and triage data
pytest backend/tests/cd agents
pytest tests/- USAGE.md - Detailed usage instructions
- CHANGELOG.md - Version history
- agents/docs/ - Agent-specific documentation
- AUDIT_LOG_FORMAT.md
- DATA_QUALITY_CHECKLIST.md
- INTEGRITY_GUARD_INTEGRATION.md
This system includes:
- Integrity Guards: Validates medical data quality
- Audit Logging: Tracks all agent interactions
- Safety Validators: Ensures responses meet medical standards
- Dataset-Driven: Operates strictly on curated medical data
โ ๏ธ Disclaimer: This system is for research and educational purposes only. It is not a substitute for professional medical advice, diagnosis, or treatment.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Medical datasets from public health repositories
- LangChain for agent orchestration
- FastAPI for backend framework
- React for frontend framework
- Ollama for local LLM inference
For questions or support, please open an issue on GitHub.
Built with โค๏ธ for advancing medical AI research