Overview

BioOKF is a format and toolchain for turning any biomedical source (a paper, preprint, bench note, slide deck, CSV, figure, or tweet) into a structured, interlinked, version-controlled knowledge base that compounds over time and can be queried as a graph.

It is a biomedical profile of Google Cloud's Open Knowledge Format (OKF), itself a formalization of Andrej Karpathy's LLM Wiki pattern. BioOKF keeps OKF's portable substrate, a Git-shippable tree of Markdown with YAML frontmatter, and adds the one thing OKF leaves open: a closed, controlled universe of meaning, with 28 node types, 35 edge predicates, and node-based provenance on every claim.

The repository ships both the format (the spec) and the toolchain that implements it: a Rust core, the bokf CLI, the bokf-mcp server, and the BioOKF Studio desktop visualizer, distributed as a notarized app plus Claude Code and Codex plugin manifests.

Three surfaces, one engine. The CLI, the MCP server, and the Studio GUI all delegate to bokf-core and share an active-base pointer, so a script, an agent, and a human can curate the same base.

Install

Install the notarized Studio first, then add the plugin to Claude Code or Codex. You never compile anything. BioOKF Studio 0.3.1 is published as BioOKF.Studio_0.3.1_aarch64.dmg for Apple Silicon and BioOKF.Studio_0.3.1_x64.dmg for Intel Macs. The first time a tool runs, the shared launcher downloads any missing prebuilt binaries for your platform and caches them under ~/.local/share/biookf.

# in Claude Code, run both, then restart /plugin marketplace add Broccolito/BioOKF /plugin install biookf@biookf # in Codex, install from a marketplace entry pointing at plugins/biookf codex plugin add biookf@<marketplace-name> # the bokf_* tools are now available; launch the app with bokf_studio_open

Requirements. Claude Code or Codex, plus curl and tar, on macOS (Apple Silicon or Intel), where a self-contained .app is downloaded for you. Linux and Windows builds are produced by the release pipeline as they become available; until a prebuilt asset exists for your platform you can build from source and point the plugin at your binary with BIOOKF_MCP_BIN.

Override the version, cache location, or download source with BIOOKF_VERSION, BIOOKF_HOME, and BIOOKF_REPO.

The bundle

A BioOKF bundle is a Git-shippable directory tree of Markdown.

PathWhat it holds
raw/Immutable ingested sources. You never edit these; they anchor provenance to bytes.
knowledge/<type>/<slug>.mdThe typed concept documents you author. These are the graph.
index.mdThe catalog: identifier registry, by-type list, and subtypes in use.
log.mdNewest-first dated change history.
SCHEMA.mdThe agent-facing operating doc, dropped at the bundle root.

Each concept document is YAML frontmatter plus a Markdown body. Only type and identifier are mandatory. An agent-coined subtype carries finer granularity and is never validated against a fixed list. Three rules make it BioOKF rather than plain OKF: a closed set of node types, a closed set of edge predicates, and node-based provenance on every edge.

Node types (28)

Every document's type is exactly one of 28: twenty biomedical entity types plus eight provenance and context types, with Other as the closure. Studio colors each node by its type. Definitions follow SPEC.md section 5.

Genomic
GeneA heritable genomic locus: protein-coding, ncRNA, or miRNA. The fundamental unit of heredity.
VariantA deviation from the reference sequence (SNV, SNP, indel, CNV, structural variant, allele, genotype, haplotype, fusion, or STR). The encoded consequence is an attribute, not its own node.
SequenceFeatureA region of the reference sequence (enhancer, promoter, silencer, transcription-factor binding site, CpG island, open chromatin, transposon, or UTR) when it is itself the object of study.
StructureA resolved or predicted three-dimensional atomic-coordinate structure of a macromolecule, distinguished by method (X-ray, cryo-EM, NMR, predicted) and optionally resolution.
Molecular and process
MoleculeA single chemically-defined entity: protein, peptide, antibody, enzyme, complex, small molecule, drug, metabolite, lipid, ion, cofactor, nutrient, or RNA species.
MolecularClassA grouping of molecules rather than a single molecule: pharmacologic class, protein family or domain, gene set, or chemical class. Members attach with member_of.
BiologicalPathwayA process: pathway, reaction, signaling cascade, GO biological process, physiologic or pathologic process, or behavior.
BiologicalFunctionAn elemental molecular activity per the GO molecular-function aspect: catalytic, binding, or transporter activity of a gene product.
Anatomy and organism
AnatomyA body region, organ, organ system, tissue, gross structure, subcellular component, organelle, or body fluid. Kept distinct from cell type.
CellTypeA cell type, cell state, cell line, or organoid. Organelles are typed as Anatomy, not CellType.
OrganismA species, strain, taxon, pathogen, microbe, model organism, or host. Distinct from a Population, which is a group of people.
Clinical
DiseaseA diagnosable condition state: disease, syndrome, disorder, neoplasm, infection, injury, or congenital or acquired abnormality. Not a manifestation or a measurement.
PhenotypeAn observable manifestation: symptom, sign, side effect, qualitative trait, or morphologic or behavioral feature. Not the disease itself or a measured value.
BiomedicalMeasureA named measurable variable: lab test, vital, score, scale (BMI, PRS, TNM), biomarker or omics readout, or imaging finding. Its unit or value rides on an edge.
MethodOrProcedureA clinical procedure, or independently a lab assay, technique, computational pipeline, tool, software, statistical method, model, algorithm, or protocol.
Exposome
ExposureA behavioral, environmental, occupational, or dietary-pattern exposure. A defined chemical exposure is a Molecule; a social determinant is a SocialFactor.
SocialFactorA social determinant of health: income, education, housing, employment, food security, access to care, or social support.
FoodA food item, food group, or dietary product. Distinct from a dietary-pattern exposure or a nutritional molecule.
Physical
DeviceAn engineered artifact: medical device, implant, prosthesis, graft, mesh, drug-delivery device, research instrument, reagent, or kit.
MaterialSampleA biospecimen or physical sample: serum, biopsy, aliquot, tissue block, or cell-line stock. The tangible material derived from or representing an organism.
Provenance and context
PublicationA document or artifact: journal article, preprint, book, patent, drug label, guideline, abstract, poster, slide deck, blog, tweet, thread, lab-notebook entry, or meeting note. The substrate of raw sources.
StudyA designed investigation: clinical trial, cohort, case-control study, RCT, GWAS, observational study, registry, or screen.
DatasetA data artifact: dataset, data file, table, CSV, XLSX, omics matrix, image collection, or knowledge base.
AgentAn entity capable of authorship or action: a person, lab, consortium, organization, company, regulator, funder, software agent, or online handle.
PopulationA group of people: cohort, study population, ancestry group, or demographic group. Distinct from Study (the investigation) and Organism (a taxon).
GeographicLocationA country, region, or place. A spatial anchor for observations or interventions.
ConceptAn abstract concept, attribute, classification system, unit, ontology term, or score definition not better typed as one of the substantive types.
OtherThe explicit escape hatch for a biomedical concept that fits none of the 27 substantive types. It must carry a note field explaining why.
External is a state, not a type. An entity referenced by an edge but with no concept document yet is External. Studio draws it as a light, dashed swatch External so you can see what is referenced but not yet documented.

Edge predicates (35)

Relationships are first-class frontmatter edges: entries: 24 positive predicates (forward-only, no inverses) plus 11 negative not_<X> predicates for the negatable effect predicates. Direction is always this-document to object. Definitions follow SPEC.md section 6.

24 positive predicates

is_aSubject is a more-specific kind or instance of object. The ontology backbone for type hierarchy and inheritance.
part_ofA structural or compositional part relationship. Structural genomic partonomy (exon, intron, CDS, codon to gene) lives here.
member_ofSubject belongs to a class, family, or group. Typical for molecule to drug-class, gene to gene-set, protein to family.
derives_fromMaterial or data lineage: sample from donor, cell from tissue, metabolite from parent, dataset from study, structure from molecule.
located_inSubject is positioned or found in object: anatomically (disease in organ), genomically (variant in gene), or geographically.
expressed_inA gene or molecule is expressed, abundant, or present in an anatomical or cell context. Carries optional direction, effect_size, p_value.
encodesA gene encodes, or is transcribed and translated into, its product. Forward-only, with no encoded_by inverse.
interacts_withA physical or functional interaction (protein-protein, gene-gene, drug-drug, host-pathogen). Symmetric.
bindsDirect binding with measurable affinity (drug-target, transcription-factor to DNA, antibody-antigen). Carries optional Kd, Ki, or IC50.
regulatesSubject increases or decreases the activity, abundance, or expression of object. Requires a direction, optionally an aspect.
catalyzesAn enzyme or complex catalyzes a reaction. Subject is the catalyst; object is the reaction.
converts_toSubject is chemically transformed or metabolized into object. A molecule-to-molecule conversion.
participates_inSubject takes part in, enables, or is an input or output of a pathway, process, or function.
causesSubject brings about, induces, or drives object: etiology (pathogen to disease), somatic drivers, drug to adverse event.
predisposes_toSubject raises the risk or likelihood of object without being a sufficient cause. Carries odds_ratio, hazard_ratio, or relative_risk.
treatsSubject (drug, procedure, device, intervention) cures, manages, ameliorates, or palliates the object condition. Carries optional clinical_phase.
preventsSubject stops, hinders, or reduces the onset risk of the object condition.
contraindicated_inSubject (drug or procedure) must not be used in the object condition or context.
affects_response_toSubject (gene, variant, biomarker) modulates response, sensitivity, resistance, or metabolism of the object drug. The pharmacogenomics edge.
has_phenotypeSubject (disease, organism, variant) presents or manifests the object phenotype, sign, or symptom. Carries optional frequency, onset, severity.
measuresSubject ascertains the value of, or is diagnostic for, object. Includes diagnoses. Carries optional sensitivity, specificity, auc, unit.
associated_withA statistical or co-occurrence association that is neither causal nor mechanistic (GWAS hit, eQTL, correlation, comorbidity). Symmetric. The quantitative umbrella edge.
reported_inThe universal provenance edge. The subject node, or a reified claim, is reported, curated, or evidenced in a Publication, Study, Dataset, or Agent.
used_to_studyAn investigative resource (method, study, dataset, device, model organism, cell type, sample) is used to study, model, or probe the object entity.

11 negatable predicates

For the negatable effect predicates, a not_<X> form records a refuted relationship. Studio renders these struck-through and reddish, so a contradiction reads at a glance.

not_bindsA refuted binding claim: subject does not bind object with measurable affinity.
not_interacts_withA refuted interaction: subject has no physical or functional interaction with object. Symmetric.
not_causesA refuted causation: subject does not bring about object.
not_predisposes_toA refuted risk claim: subject does not raise the likelihood of object.
not_preventsA refuted prevention: subject does not reduce the onset risk of object.
not_treatsA refuted treatment: subject does not cure, manage, ameliorate, or palliate object.
not_affects_response_toA refuted pharmacogenomic claim: subject does not modulate response to the object drug.
not_associated_withA refuted association: no statistical or co-occurrence link between subject and object. Symmetric.
not_expressed_inA refuted expression claim: the gene or molecule is not expressed in the anatomical or cell context.
not_regulatesA refuted regulation: subject does not change the activity, abundance, or expression of object.
not_has_phenotypeA refuted phenotype claim: subject does not present or manifest the object phenotype.
How negation works. A not_<X> edge records a negative finding stated in the source, for example "drug A does not bind target B". It is the only canonical way to negate. Asserting both <X> and not_<X> for the same subject and object is a contradiction the linter flags. Structural and provenance predicates (is_a, part_of, encodes, measures, reported_in, used_to_study) cannot be negated.

Provenance model

Quantitative claims go on edges, never prose, and every edge says where it came from.

Each edge carries three provenance fields:

FieldValues
knowledge_levelknowledge_assertion · statistical_association · prediction · observation · not_provided
agent_typemanual_agent · automated_agent · text_mining_agent · data_analysis_pipeline · computational_model · not_provided
primary_sourceNames a source node by its identifier (a Publication, Study, Dataset, or Agent in the bundle), never a bare CURIE, plus a reported_in edge.

Ingested-document sources anchor to the immutable bytes under raw/ via raw_source; external references record their CURIE in xref. The full normative format is in the spec; the agent-facing operating doc (conventions plus the ingest, query, and lint workflow) is in the schema.

BioOKF Studio

Studio is a Tauri desktop app and a pure visualizer; every operation delegates to bokf-core.

Registry-driven sidebar

Knowledge bases are tracked by a registry of links, so a bundle can live anywhere on disk; there is no fixed directory. Each entry shows its name, node and edge counts, and last-updated date. Delete or move a folder and it drops from the sidebar; register one elsewhere and it appears, with no restart. + New base opens a native folder picker that validates the folder as a real BioOKF bundle before registering it.

Interactive graph canvas

A force-directed, type-colored graph with pan, zoom, drag, fit-to-view, hub emphasis, hover tooltips, and neighbor-focus dimming. The lower-right graph controls provide zoom in, zoom out, fit-to-view, and export to a self-contained HTML graph with embedded data and clickable details. Negative not_<X> edges render struck-through; synthesized provenance edges render faint; symmetric edges are styled distinctly. A type-family legend covers all 28 types plus the light "External" swatch.

Detail panels

Click a node for its type badge, frontmatter (subtype, xref, synonyms, tags chips, raw_source, description, notes), outgoing edges grouped by predicate, incoming "referenced by" edges, the rendered Markdown body, and, for source nodes, a Source and Provenance block with credibility tier, venue, DOI, PMID, or arXiv links, and ingested figures. Click an edge for its provenance triplet, direction, publications, and quantitative attributes. Citations open a side preview of the cited source.

In-app editing and terminal

Edit a concept doc's full Markdown, a per-node notes section, or a per-edge note. Each writes live to disk and appends a dated log.md entry; a reveal-in-Finder button opens the file. A multi-tab real PTY terminal (xterm.js) runs your $SHELL in a resizable panel, so you can drive bokf without leaving the app. A toolbar lint pill opens a grouped findings popup; the search box filters and highlights the graph live (Cmd-K or Ctrl-K); the change-log drawer renders log.md.

The live loop

The CLI, the MCP server, and the GUI are wired together so an agent and a human can work on the same base at the same time.

  • One active base, shared. All three surfaces read and write a shared .active-kb pointer and a registry.yaml of bundle links. Selecting a base in the GUI updates the pointer for the agent; an agent changing the pointer is mirrored back into the GUI as a focus marker, without yanking your view.
  • The agent drives the GUI. The bokf_studio_* tools open the Studio and steer it: select, search, and reload navigate the graph, state and graph observe it. The control channel is a Unix socket that only listens when BIOOKF_STUDIO_CONTROL=1, set automatically when the agent opens the app.
  • Status without screenshots. bokf_studio_state returns the GUI's complete status as structured JSON (active base, counts, search query, current selection, which panels are open, lint summary, and the last agent action), so an agent reads what the app is doing instead of interpreting a screenshot.
  • The human sees the agent work. Every agent action is narrated in real time in an in-app activity banner, and bokf_studio_narrate lets the agent post a custom status line.

CLI commands

The same operations the agent runs are available as the bokf CLI (23 subcommands) and as MCP bokf_* tools.

CommandWhat it does
scaffoldCreate an empty bundle; commit, register, activate.
convertConvert a file, folder, or zip, --text, or --url(s) into raw Markdown under raw/.
validateValidate a single concept-document file without writing it.
getLook up a node by exact identifier.
indexRegenerate index.md, or --check it.
lintLint against the BioOKF v0.5 conformance rules (--json).
verifyDeterministic gate: lint plus structure checks; exits 1 on any error.
graphDerive the render-ready graph (nodes plus directional edges).
searchBM25 full-text search over concept documents.
statsNode and edge counts by type and predicate.
predicatesPrint the controlled vocabulary (28 types, 35 predicates, enums).
exportExport a self-contained bundle JSON (graph plus per-node detail) for the GUI.
log-syncAppend a dated log.md entry and commit, atomically.
commitLower-level stage-all plus commit (a non-logged lifecycle commit).
logShow commit history, newest-first.
restoreForward-only restore to a prior commit.
registerRegister, --list, or --unregister a known bundle under a root.
set-active / get-activeSet or read the active base under a root.
merge-rawRelocate a secondary base's raw/ into a main base's raw/ (dedup by content).
merge-snapshotSnapshot the main base before a merge, or --verify after.
name-figureRename a provisional figure to a content caption and rewrite every reference.
install-pdfiumInstall PDFium so PDF pages render to images for vision (one-time).

A typical curation workflow

# scaffold, convert, ingest, log, verify, query bokf scaffold ./mykb --name "My knowledge base" bokf convert ./paper.pdf --into ./mykb bokf validate ./mykb/knowledge/gene/il6.md bokf index ./mykb bokf log-sync ./mykb --kind ingest --summary "ingested IL6 review" bokf verify ./mykb --workflow ingest bokf search ./mykb "interleukin cytokine"

MCP tools

bokf-mcp exposes 33 tools in three groups. It ships an operating brief on initialize, so an agent knows the BioOKF rules before it acts.

Curation, 17 tools

bokf_list_basesbokf_scaffold bokf_set_activebokf_get_active bokf_list_pagesbokf_read_page bokf_write_pagebokf_validate_page bokf_append_logbokf_log_sync bokf_logbokf_restore bokf_convertbokf_name_figure bokf_indexbokf_merge_raw bokf_merge_snapshot

Analysis, 6 tools

bokf_lintbokf_verify bokf_graphbokf_search bokf_statsbokf_predicates

Studio GUI control, 10 tools

bokf_studio_openbokf_studio_close bokf_studio_statusbokf_studio_state bokf_studio_graphbokf_studio_select bokf_studio_reloadbokf_studio_search bokf_studio_screenshotbokf_studio_narrate
Read the GUI, do not screenshot it. bokf_studio_state returns the complete GUI status as JSON, the recommended way for an agent to know what the app is showing.

Build from source

The toolchain is a Cargo workspace under app/ (the Studio desktop source is in app/studio/). For development, or for a platform without a prebuilt release:

cd app cargo build --release -p bokf-cli -p bokf-mcp # the CLI and MCP server cargo install tauri-cli --version "^2" # one-time, for the Studio app ( cd studio/src-tauri && cargo tauri build --bundles app ) # BioOKF Studio.app cargo test --workspace # backend and integration tests

Binaries land in app/target/release/, and the app under app/target/release/bundle/. To make the plugin use a local build instead of downloading a release, set BIOOKF_MCP_BIN=/path/to/app/target/release/bokf-mcp.

Repo dev plugin. The repo also ships a developer-facing Claude Code extension at app/.claude-plugin: 8 biookf-* curation skills plus 4 guardrail hooks. Add app/ as a marketplace to use them while working inside the repository. The published plugin at plugins/biookf includes side-by-side Claude Code and Codex manifests over the same MCP launcher.

Full source, spec, and issues on GitHub