literature-review-toolkit
Scripts that let an LLM agent (Claude or another) run a literature review without
fabricating references. The agent decides what to search, how to group the
papers, and how to write them up. The scripts do the API calls, verification and
bookkeeping.
Version 2.10.0 · MIT license
📖 Documentation: https://gallantlab.org/literature-review-toolkit/. To run a
review, start with the tutorial
and the example requests.
To change the toolkit, start with
how it works and the
tools reference.
What it does
A review has two modes. Topic mode starts from a question and searches
outward. Lab mode starts from a lab's publications, derives its research
themes, and places them in the field. Both then run the same pipeline:
- Search in parallel lanes, plus a required antecedents lane for the
field's roots.
- Verify every citation against PubMed, PMC, CrossRef, DataCite and arXiv.
Without a duty to verify, search agents got about 1 in 4 citations wrong.
- Canonicalize every reference from its verified DOI into APA-7.
References with no DOI get a hand check.
- Count citations (OpenAlex, checked against Semantic Scholar), and check
every summary against its paper's abstract.
- Mine the corpus for papers the search missed: its reference lists, and
the papers that cite its landmarks.
- Offer the lineage timeline on every review. The agent proposes
theoretical families, and you use them, change them, or skip the
timeline. If you keep it, the toolkit renders an interactive timeline of the
families.
- Build the spreadsheet. It runs the full audit and refuses a table that
fails it.
- Optionally, write an AI-authored review article.
Each topic gets an annotated .xlsx bibliography and, unless you skip it, the
lineage timeline. PDF download is opt-in. Plan on hours, not minutes: in one
1,158-paper build the search lanes alone took about 1.5 hours.
What it needs
- Python 3 with
xlsxwriter and python-docx (requirements.txt).
- A contact email in
LITREVIEW_EMAIL. NCBI and CrossRef require one.
- Two free API keys.
OPENALEX_API_KEY
(get one) gives you your own
daily budget. Without it, every client on one IP address shares a single
budget, and a campus network can spend it before you start. S2_API_KEY
(request one)
avoids Semantic Scholar's heavy throttling of keyless use.
- Optional: poppler (
brew install poppler or
apt-get install poppler-utils) for the opt-in PDF step, and rsvg-convert
or Inkscape for PNG and PDF copies of the timeline.
Install
In the directory that will hold your reviews:
git clone https://github.com/gallantlab/literature-review-toolkit.git
cd literature-review-toolkit
pip install -r requirements.txt
export [email protected]
export OPENALEX_API_KEY=...
export S2_API_KEY=...
To keep the variables across sessions, add the export lines to your shell
profile.
Upgrading a project from 1.x
Version 2.0 enforces in code several steps that 1.x left to the agent. A project
started under 1.x needs these before its next build:
- Run
tools/preflight.py --project <dir> once. merge_lanes.py refuses to run
without the record it writes.
- Render lane briefs with
tools/lane_briefs.py; do not fill the template by hand.
- Move corrections typed into
apa into hand_fixes.json. Canon re-applies only
those, and the audit fails a fix that no longer matches its row.
- Give every row a summary. The audit now fails an empty one.
Upgrade an old corpus covers the rest. For a corpus
built well before 2.0, a fresh build is often quicker.
Start a review
Open Claude Code in the directory that holds your reviews and describe the
review:
i want a literature review on the anatomical connections between the visual
system and the cerebellum. any anatomy papers from primate or human, using any
tractography method. go back as far as the 1970s.
You can also say how big a search you want, in your own words:
| You say | You get |
|---|
| "a quick look at the key papers" | a scan, capped at about 15 papers per lane |
| "the core literature" | a focused search, capped at about 30 per lane |
| "about 300 papers" | a search capped at that total |
| "everything" | an exhaustive search, uncapped |
| nothing about size | the standard search: each lane's target is a floor, not a cap |