Clinical decision support in hematological malignancies using a case-grounded AI agent.
Research Use Only – This software is intended for research purposes only. Generated decisions require validation by qualified medical professionals and must not be used for clinical care without proper oversight.
Developed and tested on Mac Studio M3 Ultra, 96GB RAM. We used Python 3.12.
Install Python 3.12+ from python.org or via your package manager.
The fastest path is the bundled launcher:
- Install Ollama
- Clone the repository:
git clone https://github.com/Friedrich-Lab/HemaGuide- Double-click
HemaGuide.command
It installs Python tools, pulls the required models, creates the virtual environment, starts the server, and opens the web interface at http://localhost:8000. The interface ships pre-built — no Node.js required. Double-click HemaGuide-Stop.command to stop it.
Processing cases also needs a .env file and a built knowledge base — see Step-by-step.
python3 -m venv HemaGuide_venv # Create virtual environment
source HemaGuide_venv/bin/activate # Activate it
pip install -r requirements.txt # Install dependenciesCreate a .env file with:
# Required (at least one LLM provider)
OPENAI_API_KEY=sk-... # OpenAI API
OLLAMA_API_KEY=... # Ollama Cloud (if using --llm-mode ollama-cloud)
# Required for PubMed
PUBMED_EMAIL=your@email.com # NCBI Entrez API requires valid email
# Optional
NCBI_API_KEY=... # Increases PubMed rate limit (3 → 10 req/sec)
ONCOKB_API_KEY=... # OncoKB API for molecular classification
CROSSREF_EMAIL=... # CrossRef API (falls back to PUBMED_EMAIL)The following step is mandatory as we calculate the embeddings ALWAYS locally.
For default mode local Ollama embeddings and --llm-mode ollama-local:
Download Ollama from ollama.com and run it, then:
ollama pull embeddinggemma:300m # Pull required modelsFor enhanced molecular variant classification, download COSMIC data:
- Register at COSMIC
- Download from COSMIC Downloads:
- File: Cosmic_CompleteTargetedScreensMutant_v103_GRCh38.tsv (~7GB)
- Place in
data/cosmic/:
mkdir -p data/cosmic
mv ~/Downloads/Cosmic_CompleteTargetedScreensMutant_v103_GRCh38.tsv data/cosmic/Without this file, hotspot criteria will use the cancerhotspots.org API only.
python build_kb.py # Build knowledge base
python process_query_input.py # Extract queries
python agent.py # Run agentcd backend && python main.pycd frontend && npm install && npm run devkb_input/
└── tumorboards/
└── *.docx ← Clinical Case Memory cases
query_input/
└── *.docx ← Query cases to process
results/
└── agent_decisions/
└── *.json ← Generated decisions (output)
This software is provided as proof-of-concept for research purposes only and is not intended for clinical use.
- We do not ship non-public data (flowcharts, COSMIC data) and offer a prebuilt UI for demonstration (frontend/dist/)
- All patient documents must be de-identified before processing online
- Generated clinical decisions require validation by qualified medical professionals
- Not approved for production clinical decision-making
- Users are responsible for ensuring compliance with local regulations and institutional policies