Science Agent
Verify what AI writes about science — citations, claims, and cross-file consistency.
A README linked to PMID 12078741 as the foundational paper on Restricted Focus Viewers in vision science. The actual paper at that ID? "Determination of true ileal amino acid digestibility... in barley samples for growing-finishing pigs." The correct PMID was 12723780 — off by 645,039.
Try it now
npx github:andyed/science-agent audit ./docs --bibtex=./refs.bib
audit verifies every DOI-bearing BibTeX entry against Crossref by default,
then compares canonical title, complete author list, publication year, volume,
and pages. Use --offline only when you intentionally want the local
author/year-to-BibTeX scan without that metadata guarantee.
Set SCIENCE_AGENT_CROSSREF_MAILTO if you want requests to opt into
Crossref's contact-identified polite pool. No email address is sent by default.
Or verify a single DOI against CrossRef:
npx github:andyed/science-agent verify 10.1038/nn.2889
No install, no clone — runs straight from this repo.
Want it on your $PATH instead of refetching each run? Install the CLI globally from GitHub (wires up the science-agent bin):
npm install -g github:andyed/science-agent
science-agent audit ./docs --bibtex=./refs.bib
What it does
Citation Verification (shipped)
Catches AI-confabulated academic citations before they ship. Verifies inline references against BibTeX and CrossRef:
| Pattern | How |
|---|
| Wrong title | Fuzzy title matching against BibTeX + CrossRef |
| Fabricated co-authors | CrossRef author list verification |
| Wrong DOI | CrossRef DOI resolution — checks that the DOI points to the claimed paper |
| Compound confabulation | CrossRef + title search detects merged citations |
| Ambiguous citation | Surname+year collision detection across BibTeX entries |
| Duplicate citation key | A key defined more than once keeps its first entry, as BibTeX does; the repeat is reported (duplicate_key), as an error when the entries differ |
| Orphan citation | Inline reference with no BibTeX entry |
Notebook Claim Verification (shipped)
Research notebooks produce numbers. Papers and READMEs cite those numbers. Over time, numbers drift — a notebook gets re-run with new data, but the prose still quotes the old value. Science Agent makes this auditable.
The idea: Each notebook declares its load-bearing results in a ## Key Claims table. Prose references them as [NB14:K3] (notebook 14, claim 3). Science Agent verifies every reference resolves to a real claim with a real value.
## Key Claims
| ID | Claim | Value | Verified |
|----|-------|-------|----------|
| K1 | Sample size after exclusions | N = 2,719 trials | 2026-04-09 |
| K2 | Main effect | ρ = −0.618, p = 0.0426 | 2026-04-09 |
Then in your paper or README:
The position × cognitive load correlation [NB14:K2] suggests...
Audit it:
# Generate aggregate from notebooks (one-time setup)
science-agent aggregate ./notebooks/ -o docs/notebook-key-claims.md
# Audit all claim references in prose
science-agent notebook-audit ./docs \
--aggregate=./docs/notebook-key-claims.md \
--notebooks=./notebooks/ \
--cross-repo=../downstream-repo
Detects:
- Dangling references —
[NB14:K3] cited in prose but K3 doesn't exist in NB14
- Missing Key Claims blocks — notebook is cited but has no auditable claims table
- Stale cross-repo values — downstream repo quotes pre-fix numbers from upstream
If you don't use notebooks or don't need claim tracking, ignore this — audit and verify work standalone. If you do, see the full setup guide: docs/notebook-conventions.md
Figure Caption Verification (shipped)
A figure gets regenerated; its caption keeps the old numbers. figure-audit reads an INDEX.md, finds each figure's summary.json sidecar, extracts the numerics from the caption prose, and reports each as matched, unverified, or mismatched against the stats dump.
science-agent figure-audit ./figures/INDEX.md
Reproduction Gates (shipped)
The audits above are consumer-side: they check prose against what a producer wrote. None of them sees a script that computes a new number on a code path that can no longer reproduce its already-published one. The prose then quotes a wrong value faithfully and every other audit passes.
A gated producer recomputes a shipped number on the same inputs before reporting anything new, aborts if it does not come back, and records the outcome in its summary.json:
"gate": {
"status": "ok",
"shipped": 0.691, "reproduced": 0.691, "delta": 0.0, "tolerance": 5e-4,
"source": "scripts/output/m4_cursor_only_downstream/summary.json",
"source_path": "section_4_3.deployable_M4_7.pooled_auc"
}
repro-audit reads those blocks across an output tree: