Open-source toolkit
for biomedical AI.
Openbtk.ai builds the governed data layer between patient data and AI models. openbtk-core is a tested Python framework for clinical data ingestion, PHI de-identification, retrieval-augmented generation (RAG) and LLM guardrails, with an auditable provenance record for every pipeline run.
openbtk-core capabilities
Generally available in v0.7 on PyPI. Every capability is covered by automated tests in continuous integration (CI).
PHI de-identification
Rule-based detection of HIPAA Safe Harbor identifiers, optional NER for names and addresses, five transformation modes (redaction, tagging, hashing, surrogate substitution, date shifting) and k-anonymity for tabular data.
Clinical NLP preprocessing
Loaders for plain text, JSON Lines and MIMIC-style notes, section segmentation, and section-aware chunking that preserves clinical context such as Assessment and Plan.
EHR interoperability
FHIR R4, OMOP CDM and HL7 v2 ingestion into a unified longitudinal patient record, with timelines, cohort filters and embedding-ready text.
Model-agnostic LLM integration
OpenAI, Anthropic, Azure OpenAI, AWS Bedrock, Google Vertex AI, local Hugging Face models and any OpenAI-compatible endpoint, with a local-only policy that prevents data egress.
Grounded retrieval (RAG)
FAISS, Chroma and Qdrant vector stores, hybrid retrieval and reranking, with source attribution to the originating record.
Clinical guardrails
PHI leakage, terminology validity, groundedness, dosage plausibility, and EHR code and unit validation, reported as results rather than pipeline failures.
Provenance and lineage
Every pipeline run emits a RunManifest with record counts, components, guardrail outcomes and input digests. Provenance capture is always on.
Evaluation and orchestration
De-identification scoring, retrieval metrics, a CLI, and LangChain and LangGraph adapters.
processed end to end (ingest, de-identify, segment, chunk) at 0.074 GB peak memory
de-identification F1 with the default recognizer on a synthetic corpus
documented quick start executed on every change
Current limitations. openbtk-core is pre-1.0. Benchmarks use synthetic data and i2b2/n2c2 evaluation is pending. The default recognizer does not detect personal names; enable the NER recognizer where names are present. See the README for details.
Why healthcare AI stalls before production
Healthcare AI teams repeatedly rebuild the same data pipelines, and two questions gate deployment: has all PHI been removed, and can every output be traced to its source?
Privacy by design
PHI is de-identified before model inference, supporting compliance reviews under HIPAA, the DPDP Act and GDPR.
Audit-ready by default
Every pipeline run produces a verifiable provenance record for internal audit, regulators and procurement due diligence.
Clinically coherent context
Section-aware processing keeps history, assessment and plan intact, improving retrieval relevance and answer grounding.
From pilot to production
Streaming pipelines process millions of records in bounded memory, so proofs of concept reach production without re-engineering.
Use cases
What healthcare and life-sciences teams can deploy with openbtk-core today.
Available now with openbtk-core
Available- De-identification of clinical notes and structured records ahead of LLM inference
- FHIR, OMOP and HL7 v2 ingestion with unified patient records and cohort filtering
- Chart question answering with source-cited retrieval (RAG)
- Audit trails and data lineage for every AI pipeline run
Built in India, usable anywhere
An open, vendor-neutral platform engineered in India for healthcare organisations worldwide, deployable wherever patient data resides.
Open core
openbtk-core is licensed under Apache 2.0 and can be embedded in commercial products without copyleft obligations. Capabilities released in core remain open source.
Data residency by design
Deploy on a workstation, on-premises or in your private cloud. Each model provider declares whether it transmits data off-site, and a local-only policy blocks those that do.
Standards-based interoperability
Built on FHIR, OMOP and HL7 v2. Current defaults follow US conventions (HIPAA Safe Harbor, ICD-10-CM).
Deploy an auditable pipeline in minutes
Install the clinical-text extra, configure a pipeline over your notes, and retain the RunManifest from each run as audit evidence.
pip install "openbtk[text]"
from openbtk.data import clinical_text # registers clinical-text components
from openbtk.pipelines import Pipeline, Step
pipeline = (
Pipeline("clinical-rag")
.add(Step("load", "loader.clinical_text.plain_text", path="notes/"))
.add(Step("deid", "preprocessor.general.deidentify", mode="surrogate"))
.add(Step("segment", "preprocessor.clinical_text.section_segment"))
.add(Step("chunk", "chunker.clinical_text.section_aware", max_tokens=200))
)
manifest = pipeline.run() # every run emits a RunManifest
print(manifest.status)
Adapted from the README quick start, verified in CI.
Collaborate with Openbtk.ai
openbtk-core is developed in the open. We also work with healthcare organisations on pilots and integrations.
Contribute
Review the contributing guide, pick up an open issue, or propose a new loader, recognizer or guardrail.
Contributing guide →Report an issue
Report defects, missed identifiers or documentation gaps through GitHub Issues.
Open an issue →Partner with Openbtk.ai
Partnership opportunities:
- Pilot deployments
- Clinical validation sites
- Integration partners
- Healthcare IT and engineering services firms
For partnership enquiries, contact the maintainers through GitHub.
Openbtk.ai on GitHub →