Demonstration of TrialGPT agents using BioMCP.
- Github repository: https://github.com/genomoncology/biomcp-trialgpt/
- Documentation https://genomoncology.github.io/biomcp-trialgpt/
First, create a repository on GitHub with the same name as this project, and then run the following commands:
git init -b main
git add .
git commit -m "init commit"
git remote add origin git@github.com:genomoncology/biomcp-trialgpt.git
git push -u origin mainThen, install the environment and the pre-commit hooks with
make installThis will also generate your uv.lock file
Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run:
uv run pre-commit run -aLastly, commit the changes made by the two steps above to your repository.
git add .
git commit -m 'Fix formatting issues'
git push origin mainYou are now ready to start development on your project! The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release.
To finalize the set-up for publishing to PyPI, see here. For activating the automatic documentation with MkDocs, see here. To enable the code coverage reports, see here.
- Create an API Token on PyPI.
- Add the API Token to your projects secrets with the name
PYPI_TOKENby visiting this page. - Create a new release on Github.
- Create a new tag in the form
*.*.*.
For more details, see here.
A demonstration of TrialGPT agents using BioMCP for clinical trial matching.
Before running the application, ensure you have:
- Python 3.9 or higher installed
- The following API keys:
OPENAI_API_KEY- Required for all agent frameworksANTHROPIC_API_KEY- Required for Claude modelsGEMINI_API_KEY- Required for Google Gemini models
-
Clone the repository:
git clone https://github.com/genomoncology/biomcp-trialgpt.git cd biomcp-trialgpt -
Create and activate a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows, use: .venv\Scripts\activate
-
Install the package and dependencies:
pip install -e .
-
Set the required API keys as environment variables:
# On macOS/Linux export OPENAI_API_KEY="your-openai-api-key" export ANTHROPIC_API_KEY="your-anthropic-api-key" export GEMINI_API_KEY="your-gemini-api-key" # On Windows (Command Prompt) set OPENAI_API_KEY=your-openai-api-key set ANTHROPIC_API_KEY=your-anthropic-api-key set GEMINI_API_KEY=your-gemini-api-key # On Windows (PowerShell) $env:OPENAI_API_KEY="your-openai-api-key" $env:ANTHROPIC_API_KEY="your-anthropic-api-key" $env:GEMINI_API_KEY="your-gemini-api-key"
-
Run the Streamlit application:
streamlit run src/biomcp_trialgpt/streamlit_app/main.py
-
The application will open in your default web browser at
http://localhost:8501
- Enter a clinical note in the text area on the sidebar
- Select an extraction model (GPT, Claude, or Gemini)
- Configure trial filtering options (optional)
- Click "Submit" to process the note and find matching clinical trials
- View the results in the expandable sections for each step of the process
The application supports multiple agent frameworks:
- LangGraph Agent: Uses LangGraph for workflow orchestration
- If you encounter errors about missing API keys, ensure all three keys are properly set as environment variables
- For model-specific errors, check that you have access to the selected models in your API accounts
- If the application fails to start, verify that all dependencies are correctly installed
Repository initiated with fpgmaas/cookiecutter-uv.