An AI-powered multi-agent system that demonstrates clinical triage, OTC medication recommendations, and e-pharmacy integration for respiratory conditions. Built with modular agents that collaborate to provide safe, intelligent healthcare assistance.
Multi_AI_Agent_Medical_Assistant is an early-stage Python project in the AI payments / x402 ecosystem, focused on agent-to-agent, agentic-ai, aiagent, antigravity-ide. It currently has 0 GitHub stars and 0 forks, and sits alongside related tools like ai-examples, Sae, Multi-Agent-Research-Assistant-Langgraph, openlibx402, AARF-Agentic-AI-Request-Forgery, a2a-server.
⚠️ EDUCATIONAL DEMONSTRATION ONLY
This is a proof-of-concept system for academic/portfolio purposes. It is NOT for clinical use. Always consult qualified healthcare professionals for medical advice.
An AI-powered multi-agent system that demonstrates clinical triage, OTC medication recommendations, and e-pharmacy integration for respiratory conditions. Built with modular agents that collaborate to provide safe, intelligent healthcare assistance.
Key Features:

| Agent | Responsibility | Key Outputs |
|---|---|---|
| 🗂️ Ingestion | File validation, PII masking, mock OCR | {patient: {age, allergies}, xray_path, notes, pdf_text} |
| 🔬 Imaging | X-ray classification, severity detection | {condition_probs: {pneumonia, normal, covid}, severity_hint} |
| 💊 Therapy | OTC recommendations, interaction screening | {otc_options: [{sku, dose, freq}], red_flags: [...]} |
| 🚨 Doctor Escalation | Triage logic, consultation routing | {doctor_escalation_needed: bool, escalation_suggestions: [...]} |
| 🏥 Pharmacy Match | Stock + geo matching, ETA calculation | {pharmacy_id, items, eta_min, delivery_fee} |
| 🎯 Orchestrator | Flow coordination, timeline tracking | Consolidated results + order preview |
User Input → Ingestion → Imaging → Therapy → Doctor Escalation
↓
Pharmacy Match → Order Preview
Each agent handoff is validated through integration tests (see tests/integration/).
# Clone the repository
git clone <your-repo-url>
cd Multi_AI_Agent_Medical_Assistant
# Install dependencies (includes dev tools for testing)
pip install -e .[dev]
# Run the application
streamlit run app.py
The app will launch at http://localhost:8501 🎉
uv pip install -e .[dev]
streamlit run app.py
Multi_AI_Agent_Medical_Assistant/
├── Agents/ # Core agent implementations
│ ├── ingestion.py # File validation, PII masking
│ ├── imaging.py # X-ray analysis (mock classifier)
│ ├── therapy.py # OTC recommendation engine
│ ├── pharmacy_match.py # Geo + inventory matching
│ ├── doctor_escalation.py # Triage & consultation routing
│ └── coordinator.py # Orchestrator (flow control)
├── Data/ # Mock data sources (CSV/JSON)
│ ├── medicines.csv # OTC formulary (age limits, contraindications)
│ ├── interactions.csv # Drug interaction matrix
│ ├── pharmacies.json # Partner pharmacy locations
│ ├── inventory.csv # Stock levels per pharmacy
│ ├── doctors.csv # Mock tele-consult roster
│ └── zipcodes.csv # Pincode → lat/lon mapping
├── Utils/ # Helper utilities
│ ├── data_loader.py # CSV/JSON loaders
│ ├── logger.py # Structured logging
│ ├── lookups.py # SKU/pharmacy name mappings
│ └── constants.py # Global config
├── tests/ # Unit & integration tests
│ ├── unit/ # Agent-level tests
│ └── integration/ # Handoff validation tests
├── Docs/ # Documentation & diagrams
├── Testcases/ # Sample X-rays, PDFs, screenshots
├── app.py # Streamlit UI
├── sample_order.json # Sample order payload
├── test_sample_order.py # Order validation script
└── README.md # This file
Patient Input
System Processing
Ingestion Agent
↓ (validates, masks PII, extracts text)
Imaging Agent
↓ (analyzes X-ray → condition probabilities + severity)
Therapy Agent
↓ (matches symptoms → OTC options, checks age/allergy/interactions)
Doctor Escalation Agent
↓ (evaluates red flags → escalate if severe)
Pharmacy Match Agent
↓ (finds nearest stock → calculates ETA & delivery fee)
Output
Order Placement (Mock)
order_id, placed_at timestamp, total_costSee sample_order.json for a complete example. Test it with:
python test_sample_order.py
Expected output:
📂 Loading sample order from: sample_order.json
🔍 Validating order schema...
✅ Schema validation PASSED
============================================================
ORDER CONFIRMATION
============================================================
📋 Order ID: ORDER-AB12CD
📅 Placed: December 08, 2025 at 04:30:45 PM
🏥 Pharmacy: ph001
⏱️ Estimated Delivery: 20 minutes
💊 Items Ordered:
------------------------------------------------------------
1. Paracetamol (SKU: SKU001)
Quantity: 100 | Unit Price: ₹20 | Subtotal: ₹2000
2. Ibuprofen (SKU: SKU002)
Quantity: 50 | Unit Price: ₹30 | Subtotal: ₹1500
------------------------------------------------------------
Subtotal: ₹ 3500.00
Delivery Fee: ₹ 15.00
==============================================
TOTAL: ₹ 3515.00
============================================================
# Full test suite (unit + integration)
pytest
# Only integration tests (agent handoffs)
pytest tests/integration/
# Verbose output
pytest -v
Integration Tests (Agent Handoffs):
test_ingestion_to_imaging - File persistence & X-ray path handofftest_imaging_to_therapy - Condition enrichment (imaging → therapy)test_therapy_to_pharmacy - SKU matching (therapy → pharmacy)test_full_flow - End-to-end orchestration with order previewUnit Tests:
| Feature | Implementation |
|---|---|
| Red-Flag Detection | "SpO2 < 92%", severe severity → immediate doctor escalation |
| Age Restrictions | Automatic rejection of medicines below age_min threshold |
| Allergy Screening | Checks contra_allergy_keywords for patient allergies |
| Drug Interactions | High/Moderate interactions flagged from interactions.csv |
| Doctor Escalation | Triggered when severity=severe, red flags present, or confidence < 50% |
| OTC Only | No prescription drugs recommended |
P***t, ########76)xray_abc123.jpg, pneumonia_def456.jpg)| Area | Current Implementation | Production Requirement |
|---|---|---|
| X-ray Classifier | Filename-based heuristics (keywords: pneumonia, covid, normal) |
Trained CNN (ResNet-50 on ChestX-ray14 dataset) |
| OCR | Mock placeholder text | AWS Textract / pytesseract |
| Geo Matching | Dummy Manhattan distance | Google Maps API / Haversine formula |
| Pharmacy APIs | Static CSV inventory | Real-time inventory webhooks |
| Payment | Mock confirmation only | Stripe / Razorpay integration |
| Authentication | None (single-user demo) | OAuth2 + RBAC |
| Database | Local CSV/JSON files | PostgreSQL + MongoDB |
All data files are located in Data/ and are used for demonstration purposes only.
| File | Description | Sample Fields |
|---|---|---|
medicines.csv |
OTC formulary (8 drugs) | sku, drug_name, indication, age_min, contra_allergy_keywords |
interactions.csv |
Drug-drug interaction rules | drug_a, drug_b, level (High/Moderate/Low), note |
pharmacies.json |
Partner pharmacy locations (3 stores) | id, name, lat, lon, services, delivery_km |
inventory.csv |
Stock levels per pharmacy | pharmacy_id, sku, drug_name, price, qty |
doctors.csv |
Tele-consult roster (2 doctors) | doctor_id, name, specialty, tele_slots (ISO 8601) |
zipcodes.csv |
Pincode → geo mapping | pincode, lat, lon |
Agents/ (follow existing patterns)get_logger(__name__)tests/unit/tests/integration/Data/Utils/data_loader.pytests/This app is deployed at: https://multi-ai-agent-doctor-by-vidisha.streamlit.app/
Deployment steps:
app.pyweb: streamlit run app.py --server.port=$PORTThis project was built as a proof-of-concept for a multi-agent healthcare system to demonstrate:
Key Learning Outcomes:
If you reference this project, please cite:
Multi-Agent Healthcare Assistant POC
Author: Vidisha Arvind
Year: 2025
GitHub: https://github.com/Vibhuarvind/Multi_AI_Agent_Medical_Assistant
Demo: https://multi-ai-agent-doctor-by-vidisha.streamlit.app/
Educational project - not for commercial use.
This is a portfolio/demonstration project. No warranties or guarantees are provided. Use at your own risk.
This is a demonstration project, but feedback and suggestions are welcome!
For questions about this project:
GitHub Issues: Open an issue
Built with ❤️ for safe, intelligent healthcare automation
AI Examples
A lawyer for the agent economy. AI agents can request contract review, risk analysis, and legal guidance via A2A protocol.
Autonomous multi-agent system built using LangChain and LangGraph that orchestrates collaborative agents—Supervisor, Researcher, Writer, and Critiquer—to automatically gather information, generate detailed research reports, refine output, and visualise the workflow as a graph. Includes a Streamlit web UI and optional Graphviz visualisation.
An open-source library for AI-native x402 integrations in the Solana ecosystem. Built for Python and Node.js, distributed via PyPI and npm, with server implementations for FastAPI and Express.js. Accelerate.
Agentic AI Request Forgery (AARF) – New vulnerability class exploiting planner ➝ memory ➝ plugin chaining in MCP Server, MAS, LangChain, and A2A agents. Red Team playbooks, threat models, OWASP Top 10 proposal.
Production-ready A2A Protocol Server with dual protocol support (HTTP REST + JSON-RPC 2.0). Built on SceneGraphManager v2.0.0 for JSON-driven AI workflow orchestration with LangGraph.
The agent-native LLM router for autonomous agents. 55+ models (8 free), <1ms local routing, USDC payments on Base & Solana via x402.
The living ecosystem where AI agents complete tasks through workflow loops, improve through iterative execution, are evaluated by mentor agents or humans in the loop, and turn completed work into reusable work experience and data to improve future agents.
Self-healing infrastructure for AI agent payments. 90.3% auto-recovery.
The AI agent with a wallet — spends USDC autonomously to get real work done. Apache-2.0, TypeScript.
Daydreams is a set of tools for building agents for commerce
Live data for AI agents — search, research, markets, crypto, X/Twitter. Pay-per-call via x402 micropayments.