Skip to main content
Glama

Biofact

Every analysis leaves a biofact. Biofact records the evidence behind computational biology workflows — inputs, outputs, commands, versions — as content-hashed, replayable records. Make any analysis, including one run by an AI agent, auditable and reproducible.

CI Python 3.10+ License: MIT Paper


Why this exists

AI agents now run real biology: they call BLAST, run variant callers, filter tables, produce figures. But a July 2026 review of 109 agentic bioinformatics systems found the field has a trust gap:

"Planning and tool execution have advanced more rapidly than replayability, provenance, robust scientific assessment, and external validation." — Pham & Hy, arXiv:2607.27556

In plain terms: agents do the science, but nobody can prove what they did or redo it tomorrow and get the same answer. Biofact closes that gap with the smallest possible tool:

  • Record — one command wraps your analysis; every input/output gets a SHA-256 content hash, the command line, parameters, exit code, timing, and environment are captured.

  • Validate — check later: do the files still exist? Do the hashes still match? (Silent data drift detector.)

  • Replay — re-run the recorded commands; identical output hashes = proven reproducibility.

  • Report — a structured provenance summary you can cite in a manuscript's code-availability section.

  • Agent-native — ships an MCP server, so AI agents (Claude, Cursor, ...) record their tool use through Biofact automatically.

Related MCP server: repro-mcp

Install

pip install biofact          # once published on PyPI
# or, from source:
pip install git+https://github.com/biranjan01/biofact

Runtime dependencies: none beyond the Python standard library (plus mcp for the optional agent server). Provenance tooling should never break because a dependency changed.

60-second tour

Wrap any command:

biofact run --name qc-sample-1 --tool seqkit \
  --input reads.fastq --output clean.fastq \
  -- seqkit seq --min-len 50 reads.fastq -o clean.fastq

You get a provenance record. Later — tomorrow, next month, during review:

biofact check    qc-sample-1-<id>.run.json   # do hashes still match?
biofact replay   qc-sample-1-<id>.run.json   # does it still produce the same outputs?
biofact summary  qc-sample-1-<id>.run.json   # the methods-section report

Validate files on their own (catches truncation, FASTQ length mismatches, broken VCF headers, ragged tables):

biofact validate reads.fastq variants.vcf counts.csv

For AI agents (MCP)

Add to your MCP client config (Claude Desktop, Cursor, Claude Code):

{
  "mcpServers": {
    "biofact": {
      "command": "biofact-mcp"
    }
  }
}

Tools exposed to the agent:

Tool

What it does

record_step

Record one executed step; hashes all listed inputs/outputs

validate_file

Sanity-check a bioinformatics file's format

check_run

Verify recorded files still match their hashes

replay_run

Re-execute the recorded commands, compare output hashes

provenance_report

Human/agent-readable summary of a run

list_stored_runs

List everything recorded

Supported file formats (validators)

FASTA · FASTQ · VCF · BED · GFF/GTF · CSV · TSV · JSON — lightweight structural checks (record counts, header sanity, length consistency), not full spec compliance.

What gets recorded

Field

Meaning

inputs / outputs

Path, existence, size, SHA-256 content hash

command

Exact argv, replayable

params, exit_code

Configuration + success signal

started_at, ended_at, duration_s

Timing

stdout_tail, stderr_tail

Last 4 KB of output (debuggability)

environment

Python version, platform, machine, Biofact version

Roadmap

Phase

Deliverable

v0.1 (now)

Core recorder, replay, drift detection, format validators, MCP server

v0.2

Conda/environment capture, tool-version fingerprinting (samtools --version etc.)

v0.3

RO-Crate / PROV-O export; Jupyter notebook cell recording

v0.4

Benchmark: replay success rate on public workflows (BixBench-style)

v0.5+

Paper to JOSS after 6 months of public development

Relationship to existing standards

Biofact is a floor, not a replacement: PROV-O, RO-Crate, and BioCompute Objects are richer, heavier standards. Anything Biofact records can be lifted into them later. Workflow engines (Nextflow, Snakemake, Galaxy) manage execution; Biofact is engine-agnostic evidence layered on top.

Paper

A methods paper is in preparation (paper/paper.md); planned submission to the Journal of Open Source Software after the required 6 months of open development history. Pre-1.0 software — not yet peer reviewed. Cite via CITATION.cff.

Development

git clone https://github.com/biranjan01/biofact && cd biofact
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest -q            # or: python tests/test_core.py
ruff check src tests

Contributions welcome — especially: replay adapters for common tools, environment capture backends, and benchmark datasets of real workflows.

License & disclosure

MIT. Developed with AI assistance under human direction; all design decisions, testing, and validation are human-owned (disclosed per JOSS AI-usage policy).

Disclaimer: Biofact is a research/reproducibility tool. It does not interpret biological results and must not be used as the sole evidence base for clinical decisions.

Available Tools

6 tools
check_runB

Verify a run record: do the recorded files still exist, and do their hashes still match what was recorded? Detects silent data drift.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_fileYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses that the tool reads recorded files and compares hashes (implying a non-destructive verification), but says nothing about cost on large files, required permissions, or what happens on mismatch beyond the generic 'detects drift'.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences that front-load the core action and then the payoff ('Detects silent data drift'). No filler or redundancy, though the question-style phrasing is slightly informal for a tool definition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained. What remains missing is any annotation substitute (safety/read-only profile) and any documentation of the run_file parameter's format, leaving the agent to guess how to supply the identifier.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% for the single required parameter 'run_file', so the schema contributes nothing. The description indirectly frames it as 'a run record', hinting at what the parameter identifies, but gives no format, path convention, or source for the value.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb (verify) and resource (run record) and spells out the two concrete checks it performs: file existence and hash match. However, it does not distinguish itself from the close sibling validate_file or from provenance_report, so an agent must infer the boundary from names alone.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied: the phrase 'Detects silent data drift' suggests a post-hoc integrity check, but there is no explicit when-to-use, when-not-to-use, or alternative tool named. With validate_file and provenance_report as siblings, the absence of routing guidance is a real gap.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_stored_runsA

List all recorded runs in the Biofact store (newest first).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden, and it does disclose two useful behaviors: the scope ('all recorded runs') and the sort order ('newest first'), and 'List' implies a read-only operation. However, it says nothing about pagination, result limits, or how many runs are returned, which matters for a store-backed listing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence with no filler, front-loading the verb and resource and appending the ordering constraint where it best fits. Nothing can be trimmed without losing information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is unnecessary, and a no-argument list tool needs little prose. The description covers scope and ordering, but omits whether results are bounded or paged, a minor gap for a listing over a persistent store.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool takes zero parameters, so the baseline is 4. There is nothing for the description to clarify beyond what the empty schema already conveys.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb ('List') and resource ('recorded runs in the Biofact store'), plus the ordering ('newest first'). It clearly differs from siblings like replay_run, record_step, and validate_file, which are distinct verbs. It does not explicitly contrast itself with check_run or provenance_report, which are the closest related read tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit when-to-use guidance, no prerequisites, and no mention of alternatives such as check_run (single run) or provenance_report (lineage detail), which an agent would plausibly consider for related queries. Usage is only implied by the word 'List'.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

provenance_reportB

Print the provenance report for a run: steps, tools used, files hashed, environment, timings. Cite this in a manuscript's methods/availability.

ParametersJSON Schema
NameRequiredDescriptionDefault
run_fileYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. 'Print' implies a non-mutating read and the enumerated contents disclose what the report surfaces, which is useful, but nothing is said about permissions, behavior on a missing or invalid run file, or whether the run must already be stored.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences, front-loaded with the action and artifact, then the content list, then the usage note. No filler or repetition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return formatting is properly out of scope, and the description covers purpose, contents, and usage context. The main residual gap is input specification for run_file and error/edge behavior for a single-parameter tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The single parameter run_file has 0% schema description coverage, so the description must compensate. 'For a run' gestures at the input but never states the expected form (path, ID, extension) or where such a file comes from, leaving the parameter effectively undocumented.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description gives a specific verb and resource ('Print the provenance report for a run') and enumerates exactly what the artifact contains (steps, tools, files hashed, environment, timings). It is clearer than check_run or list_stored_runs would be from name alone, though it never explicitly contrasts itself with those siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Cite this in a manuscript's methods/availability' supplies a real usage context that implies this is the reporting/summary tool rather than a validation or replay tool. However, there are no when-not conditions and no named alternative among replay_run, check_run, or list_stored_runs, so routing remains inferential.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

record_stepA

Record one executed analysis step under a named run.

Hashes (SHA-256) every listed input/output file. Use this AFTER running a tool so the agent's work becomes auditable and replayable. The first call for a run_name creates the run; later calls append steps.

ParametersJSON Schema
NameRequiredDescriptionDefault
toolNo
notesNo
inputsNo
commandNo
outputsNo
run_nameYes
exit_codeNo
step_nameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full disclosure burden and delivers real behavioral facts: SHA-256 hashing of every listed input/output file, first-call-creates-run semantics, and append-on-subsequent-calls behavior. It omits failure behavior, missing-file handling, and whether run_name reuse is safe, so it is strong but not complete.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core action is front-loaded in the first line, with scoping ('one step under a named run'), then behavior (hashing), then timing guidance, then run-creation semantics. Every sentence contributes; the layout is easy to scan.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return values need not be explained, and the description covers creation/append semantics and file hashing. However, for an 8-parameter mutation tool with zero annotation coverage and zero schema description coverage, gaps around error handling, run_name collisions, and the meaning of undocumented parameters leave an agent partially guessing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 8 parameters, so the description must compensate and largely does not. It implies run_name and the inputs/outputs file lists, but 'tool', 'command', 'notes', and 'exit_code' — including the default-of-0 semantics — are left entirely undocumented anywhere.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Names a specific verb and resource: 'Record one executed analysis step under a named run.' Combined with 'first call creates the run; later calls append steps,' an agent can distinguish this write path from replay_run, check_run, list_stored_runs, and provenance_report. It stops short of explicitly naming a sibling to route against, so it is clear but not fully differentiated.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Use this AFTER running a tool so the agent's work becomes auditable and replayable' gives an explicit temporal/contextual trigger, which is genuinely useful routing guidance. No alternatives or explicit when-not-to-use conditions (e.g., versus provenance_report) are given, keeping it below a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

replay_runB

Re-execute every recorded command in a run and compare output hashes.

Returns per-step reproduction status. True reproducibility = same exit codes AND identical output content hashes.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdNo
run_fileYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It does disclose the important behavior that commands are actually re-executed and that success is defined as matching exit codes plus identical output hashes, which is genuinely useful. However, it omits side-effect/permission warnings (re-executing arbitrary recorded commands can mutate state) and any sandboxing or auth context, which matters most for a re-execution tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and then the success criterion; no filler. The 'True reproducibility = ...' line earns its place by pinning down the pass condition.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so per-step return details need not be restated. Still, for a tool that re-executes recorded commands, the description should cover the run_file prerequisite, cwd role, and side-effect expectations; those gaps leave an agent under-informed about a potentially stateful operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across 2 parameters, so the description must compensate and does not: run_file is never identified as a path to a recorded run, and cwd (with its default) is not mentioned at all. Nothing is added beyond the bare schema property names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb (re-execute) plus resource (every recorded command in a run) and adds the comparison mechanism (output hashes). It is clear what the tool does, but it does not differentiate itself from the sibling check_run or provenance_report, which plausibly overlap in the reproducibility-check space.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to prefer replay_run over check_run, provenance_report, or the record_step/list_stored_runs pair. Usage is only implied by the verb; no prerequisites (e.g. that a run must first have been recorded) or exclusions are given.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

validate_fileB

Validate a bioinformatics file (FASTA, FASTQ, VCF, BED, GFF, CSV, TSV, JSON).

Returns validity, record count, and up to 5 issues. Catches truncation, FASTQ length mismatches, broken VCF headers, ragged tables.

ParametersJSON Schema
NameRequiredDescriptionDefault
pathYes
formatNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full behavioral burden, and it does disclose the return content (validity, record count, up to 5 issues) and the failure classes it detects (truncation, FASTQ length mismatch, broken VCF headers, ragged tables). It omits other operational traits such as behavior on very large files, read scope, or whether the file is read fully or streamed, so the burden is only partly met.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three short sentences, front-loaded with the action and scope, then the return shape, then concrete failure modes. No filler and nothing buried.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return formatting needn't be spelled out, and the description still usefully names the key result fields and detected error classes. The remaining gap is guidance about scale and the format parameter's role, which an agent would need to call this confidently.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate, and it does not. The format list hints at accepted values for the format parameter but never explains whether format is an optional override, whether it is auto-detected (the schema default is an empty string), or why the caller would set it; the required path parameter is completely unexplained.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb (validate) plus resource (bioinformatics file) with an explicit format list, so the agent knows exactly what it does. It is implicitly distinct from the run-oriented siblings, but the description never acknowledges the nearest neighbor, check_run, so the reader must infer the file-vs-run distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description states what the tool does but never says when to reach for it instead of check_run or the other run tools. There is no stated precondition, no exclusion, and no alternative named, so the agent gets no routing guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 6 tool updatesv0.1.0
    • First observedcheck_run
    • First observedlist_stored_runs
    • First observedprovenance_report
    • First observedrecord_step
    • First observedreplay_run
    • First observedvalidate_file

TDQS

A3.6/5.0

Scored across 6 tools

Disambiguation4/5

Each tool targets a distinct action on the run/provenance domain: record_step writes, list_stored_runs enumerates, check_run verifies file hashes, replay_run re-executes for reproducibility, provenance_report summarizes, and validate_file inspects file format. The verification-flavored tools (check_run vs replay_run vs validate_file) could be momentarily confused, but their descriptions clearly separate drift-checking, re-execution, and format validation.

Naming Consistency4/5

Mostly consistent verb_noun: replay_run, record_step, validate_file, check_run, list_stored_runs. The only deviation is provenance_report, which is a noun_noun form rather than a verb-led name, but it remains readable and predictable.

Tool Count5/5

Six tools is well-scoped for a provenance/reproducibility server, with each tool earning its place along the record-list-check-replay-report-validate axis. No redundant or trivial tools, and no padding.

Completeness4/5

The run lifecycle is well covered: recording, listing, integrity checking, replay, reporting, and file validation. Minor gaps exist, such as no delete/prune run, no export/import, and no way to amend or annotate a recorded step, but agents can work around these.

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Document verification MCP server enabling AI agents to verify file authenticity by computing SHA-256 fingerprints locally and checking Bitcoin-anchored proofs via OpenTimestamps.
    5
    5 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that logs AI-assisted scientific computing sessions, capturing prompts, responses, decisions, and environment snapshots to human-readable markdown files for reproducibility.
    MIT
  • A
    license
    B
    quality
    B
    maintenance
    An MCP server that enforces fail-closed deterministic checks, independent refute-first review, and tamper-evident hash-chained receipts for AI agent outputs before claiming completion.
    4
    3
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Tamper-evident audit logging for AI agents. Append-only, hash-chained, optionally Ed25519-signed log. The MCP server lets an agent keep and verify a record of what it actually did.
    9
    MIT