Clinical reasoning agent powered by OpenMedicine — fangs of the healing serpent
Project description
Fangbot
Clinical reasoning agent powered by OpenMedicine — fangs of the healing serpent.
This is NOT a diagnostic tool — it is a research platform for validating LLM-based clinical tool orchestration.
What it does
Fangbot connects to the OpenMedicine MCP server to perform deterministic, auditable clinical calculations via a ReAct (Reasoning + Acting) loop. It supports multiple LLM providers for benchmarking.
Critical constraint: The agent always calls OpenMedicine's MCP tools for clinical calculations — it never computes scores from its own knowledge.
Install
# Recommended: install as a global CLI tool
pipx install fangbot
# Or with uv
uv tool install fangbot
# With OpenAI support
pipx install "fangbot[openai]"
Quick start
# Interactive setup — configure provider, API key, test MCP connection
fangbot init
# Start a clinical reasoning session
fangbot chat
Usage
fangbot init # First-time setup wizard
fangbot chat # Interactive clinical reasoning session
fangbot run studies/chadsvasc/config.yaml # Batch evaluation against gold standard cases
fangbot report studies/chadsvasc/results/ # Generate cross-provider comparison report
Chat commands
Inside fangbot chat, use slash commands:
| Command | Description |
|---|---|
/help |
Show all commands |
/status |
Current provider, model, session info |
/claude [model] |
Switch to Claude |
/openai [model] |
Switch to OpenAI |
/model [name] |
Interactive model picker |
/models |
List all available models |
/clear |
Clear conversation history |
/history |
Show message count and tool calls |
/compact |
Compress conversation history |
quit |
End the session |
Configuration
Fangbot stores config in ~/.fangbot/:
~/.fangbot/
├── .env # API keys and settings
└── logs/ # JSONL audit trail
Environment variables (prefix FANGBOT_):
| Variable | Default | Description |
|---|---|---|
FANGBOT_PROVIDER |
claude |
LLM provider (claude, openai) |
FANGBOT_MODEL |
claude-sonnet-4-20250514 |
Model to use |
ANTHROPIC_API_KEY |
— | Anthropic API key |
OPENAI_API_KEY |
— | OpenAI API key |
Supported providers
| Provider | Models | Status |
|---|---|---|
| Anthropic Claude | Opus 4.6, Sonnet 4.6, Haiku 4.5, Sonnet 4, Opus 4 | Supported |
| OpenAI | GPT-5, GPT-4o, GPT-4.1, o3, o4-mini | Supported |
| Google Gemini | — | Planned |
| Ollama (local) | — | Planned |
Architecture
Gateway (CLI) → Brain (ReAct loop) → Skills (MCP tools) → Memory (audit trail)
→ Evaluation (batch runner, metrics, reports)
- Gateway — CLI interface with typer + rich
- Brain — ReAct loop engine, LLM providers, clinical guardrails
- Skills — MCP client connecting to OpenMedicine server via stdio
- Memory — Session context, JSONL audit logger
- Evaluation — Batch runner, gold standard comparison, metrics engine, Markdown report generator
Evaluation
Fangbot includes a batch evaluation framework for benchmarking LLM providers against gold standard clinical cases.
# Run all CHA2DS2-VASc cases through the agent
fangbot run studies/chadsvasc/config.yaml
# Generate a comparison report from saved results
fangbot report studies/chadsvasc/results/ --config studies/chadsvasc/config.yaml
Gold standard cases are YAML files with expected scores, risk tiers, and tool calls. The evaluation engine computes:
| Metric | Description |
|---|---|
| Accuracy | Exact score match rate |
| MAE | Mean absolute error |
| Cohen's Kappa | Inter-rater reliability |
| Sensitivity/Specificity | Per risk tier (low/moderate/high) |
| Protocol adherence | Did the agent call the required MCP tools? |
| CoT quality | Was reasoning auditable with chain-of-thought? |
Development
See CONTRIBUTING.md for development setup and guidelines.
git clone https://github.com/RamosFBC/fangbot.git
cd fangbot
uv sync --extra dev --extra openai
uv run python -m pytest -v
License
MIT — Copyright (c) 2026 RamosFBC
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fangbot-0.4.0.tar.gz.
File metadata
- Download URL: fangbot-0.4.0.tar.gz
- Upload date:
- Size: 141.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
faf34911c0fca09100b02e5930373656311b0882073dc8e542cd8e4efa1589d2
|
|
| MD5 |
20255399c52df3e364ef62a8e82c6313
|
|
| BLAKE2b-256 |
2c139c7a075523be282d580072f14dadd70e8fb843153a97a4b833c84a9b472b
|
Provenance
The following attestation bundles were made for fangbot-0.4.0.tar.gz:
Publisher:
publish.yml on RamosFBC/fangbot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fangbot-0.4.0.tar.gz -
Subject digest:
faf34911c0fca09100b02e5930373656311b0882073dc8e542cd8e4efa1589d2 - Sigstore transparency entry: 1097357806
- Sigstore integration time:
-
Permalink:
RamosFBC/fangbot@f8f7411023d864d5ae31b3da4880c01322764ad8 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/RamosFBC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8f7411023d864d5ae31b3da4880c01322764ad8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file fangbot-0.4.0-py3-none-any.whl.
File metadata
- Download URL: fangbot-0.4.0-py3-none-any.whl
- Upload date:
- Size: 86.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
75b3c06e52ebb93357ad3cfe0ffb3245d81612e2663e943750ef8e1e7fc8a217
|
|
| MD5 |
54d18698a1710105c9d7c70c63578e7d
|
|
| BLAKE2b-256 |
a2f1c9050a3d4738c91aa586b4234125a6cbea239a7143fb93ab3a23e352ac57
|
Provenance
The following attestation bundles were made for fangbot-0.4.0-py3-none-any.whl:
Publisher:
publish.yml on RamosFBC/fangbot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fangbot-0.4.0-py3-none-any.whl -
Subject digest:
75b3c06e52ebb93357ad3cfe0ffb3245d81612e2663e943750ef8e1e7fc8a217 - Sigstore transparency entry: 1097357819
- Sigstore integration time:
-
Permalink:
RamosFBC/fangbot@f8f7411023d864d5ae31b3da4880c01322764ad8 -
Branch / Tag:
refs/tags/v0.4.0 - Owner: https://github.com/RamosFBC
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@f8f7411023d864d5ae31b3da4880c01322764ad8 -
Trigger Event:
push
-
Statement type: