Skip to main content

OpenBTK — Open Toolkit for Biomedical AI

License

The open-source layer between biomedical data and modern AI.

OpenBTK turns EHR and clinical text into model-ready, de-identified, auditable inputs — and wraps model outputs in clinical guardrails. It runs on your laptop or behind your firewall, works with any LLM provider, and emits the audit trail your regulator and your IRB will ask for.


🚧 Status: pre-implementation

0.0.1 on PyPI is a placeholder. It installs and imports; it does nothing. It exists to reserve the name and to exercise the release pipeline. Do not build on it.

The project is being rebuilt from scratch. A previous attempt produced ~5,200 lines that were never executable — three conflicting package names coexisted in one repository, and no test was ever run against an installed dependency. That code is preserved on the legacy/v1-snapshot branch.

Specification, architecture and planning are complete; the core framework is next. This README will list features when features exist, and not before. See CHANGELOG.md.


Why

Building a clinical RAG pipeline in 2026 means six weeks of undifferentiated plumbing: a note parser, a PHI de-identifier that actually catches MRNs, chunking that doesn't split the Assessment from the Plan, entity linking, code validation, and an audit trail you'll be asked for later. Every team rebuilds it. Most get de-identification wrong, or pay a vendor.

The existing tools each solve one slice. MONAI owns imaging. medspaCy owns rule-based clinical text. PyHealth owns predictive modelling over EHR. LangChain owns orchestration but treats a FHIR bundle and a blog post as the same thing. Commercial platforms solve most of it, behind a licence that excludes academia and early-stage teams.

Nothing joins them, and nothing open-source addresses the two things that actually gate deployment: is the PHI really gone, and can you prove what happened.

Those two are what OpenBTK is for.

Design commitments

  • Domain-aware by default — chunking that respects clinical sections, retrieval that knows two strings can be the same SNOMED concept.
  • Wrap, don't reinvent — thin, consistent adapters over medspaCy, scispaCy, presidio, fhir.resources; net-new code only where nothing adequate exists.
  • Streaming by default — memory is O(batch), not O(corpus). Target: stream 10M notes in under 4 GB RSS.
  • Light core — six dependencies, no ML framework. Reading a clinical note should not require installing PyTorch.
  • Safe and provable by construction — de-identification, guardrails and a run manifest are structural, not optional middleware.

Planned scope

v1 — clinical text and EHR/FHIR, taken to production quality. Loading, de-identification, section-aware chunking, entity linking, terminology resolution, embedding and LLM providers, retrieval with concept reranking, clinical guardrails, evaluation harness, run provenance, config-driven pipelines, CLI.

v2 — imaging, biosignals, genomics, video, audio. These will wrap MONAI, wfdb, MNE, pysam and librosa rather than compete with them, and are gated until v1 ships with published benchmarks.

Never — a model zoo, a serving platform, a clinical decision-support system, or a dataset distributor.

Documentation

Design documents — market research, PRD, architecture, API contract, security and compliance, test charter, roadmap and ADRs — are maintained outside this repository and are not published here. Public documentation ships with the v0.1 release.

Contributing

Not yet open for contributions — the foundation is still being laid. Contributions open at v0.1.

License

Apache 2.0 — see LICENSE.

Disclaimer

OpenBTK is a software toolkit. It is not a medical device, not a clinical decision-support system, and provides no medical advice. It does not make its users HIPAA- or EU AI Act-compliant — it provides technical controls supporting a compliance programme its users own.

Datasets requiring credentialed access (MIMIC, eICU, n2c2, TCGA) are not bundled. Users must obtain their own authorized access.

Metadata

Release files for openbtk 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openbtk 0.0.1
File Size Uploaded Provenance Actions
openbtk-0.0.1.tar.gz 13.9 kB With provenance Details for openbtk-0.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for openbtk 0.0.1
File Interpreter ABI Platform Actions
openbtk-0.0.1-py3-none-any.whl Python 3 none any Details for openbtk-0.0.1-py3-none-any.whl

Total release size: 27.5 kB

Release files / openbtk-0.0.1.tar.gz

Download URL openbtk-0.0.1.tar.gz
Size 13.9 kB
Tags Source
SHA-256 checksum
How to use checksums
81a4d3e84c0e7280f4bcfcdf99e495c5e0fcfdf1b8f4e918668c6eaffea9af12
BLAKE2b-256 checksum
How to use checksums
7954fe12d24a008ab981473439a80a2c6e88faf6d91317bcef179354bed572df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Release files / openbtk-0.0.1-py3-none-any.whl

Download URL openbtk-0.0.1-py3-none-any.whl
Size 13.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
38d7e856d1e7d7a7db04209053e6740475dc960588cea7acd9c8fc21237e0bc3
BLAKE2b-256 checksum
How to use checksums
3afca2e32ee5f3aeed75f9a868db903524056a31e9231235eff76d7a720ecc08
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

Security for openbtk 0.0.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for openbtk-0.0.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 13, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page