Skip to main content

A CLI research agent for AI-related paper search, code discovery, PDF collection, and bilingual reports.

Project description

PaperPilot

PyPI Python License Release CLI Reports Workflow

English | 中文 | Website

PaperPilot - AI literature review agent

PaperPilot is a CLI research agent for AI-related literature review.
It turns one user request into a traceable, evidence-based research workflow and generates bilingual reports (zh/en) in Markdown, HTML, and PDF.

✨ What PaperPilot does

PaperPilot is not a chatbot. It is an interactive scientific workflow:

  • Parse natural-language research requests
  • Build an explicit search protocol with inclusion/exclusion rules
  • Query multi-source literature APIs
  • Normalize, deduplicate, and screen papers
  • Verify URLs/PDF/code availability
  • Synthesize evidence and generate review reports
  • Output structured artifacts for reproducibility

Each run creates a dedicated folder under runs/ with full state, logs, and intermediate files.

🚀 Highlights

Core experience

  • Natural-language intake with LLM-assisted interpretation
  • Interactive shell with:
    • /model to manage LLM profiles
    • /sources to inspect search source/API status
    • /doctor for quick self-checks
  • Multi-source retrieval with source registry and diagnostics
  • Resume/inspect modes for reproducible research sessions

Retrieval and screening

  • Protocol-aware search using plan + diversified keywords
  • Canonicalized Paper schema and robust deduplication
  • Core/adjacent/excluded paper classification
  • PDF + code-link verification (no paywall bypass)
  • Optional full-text extraction from downloadable PDFs

Reporting

  • Canonical bilingual report model
  • Consistent [1][2][3] citation mapping
  • Method taxonomy and evidence matrix
  • Markdown + HTML + PDF outputs with aligned content

Quality controls

  • Quality gates and reflection workflow
  • Evidence ledger linking claims to corpus evidence
  • Review checks for citation compliance and source reliability
  • Event stream logs for auditability

🗂 Source stack

Default free sources:

  • arXiv
  • Semantic Scholar
  • OpenAlex
  • Crossref
  • OpenReview
  • PubMed / NCBI E-utilities
  • Europe PMC
  • bioRxiv / medRxiv
  • DBLP
  • ACL Anthology

Optional API-key sources:

  • DeepXiv / Agentic Data
  • CORE
  • Lens.org Scholarly API
  • IEEE Xplore
  • Springer Nature
  • Elsevier / Scopus
  • Dimensions

🛠 Installation

python -m pip install paperpilot -i https://pypi.org/simple

Local development:

git clone https://github.com/CHB-learner/PaperPilot.git
cd PaperPilot
python -m pip install -e .

⚙️ LLM + Source Configuration

PaperPilot requires OpenAI-compatible LLM settings for query understanding, planning, synthesis, and report generation.

On first run, it creates an editable configuration template at:

~/.paperpilot/config.json

Minimal default template:

{
  "active": "default",
  "profiles": {
    "default": {
      "api_key": "",
      "base_url": "",
      "model": "gpt-5.2"
    }
  },
  "sources": {
    "core": {"enabled": null, "api_key": "", "base_url": ""},
    "lens": {"enabled": null, "api_key": "", "base_url": ""},
    "ieee": {"enabled": null, "api_key": "", "base_url": ""},
    "springer": {"enabled": null, "api_key": "", "base_url": ""},
    "elsevier": {"enabled": null, "api_key": "", "base_url": ""},
    "dimensions": {"enabled": null, "api_key": "", "base_url": ""},
    "deepxiv": {"enabled": null, "api_key": "", "base_url": ""}
  }
}

Notes:

  • Leave optional source API keys empty if unavailable.
  • enabled: null means auto-enable once a valid key is provided.
  • ~/.paperpilot/config.json is not committed; edit it directly or use CLI commands.

CLI config commands

PaperPilot config set --base-url https://api.deepseek.com --model deepseek-chat
PaperPilot config import ./api.json
PaperPilot config list
PaperPilot config use deepseek
PaperPilot config show
PaperPilot --doctor
PaperPilot sources list
PaperPilot sources config core
PaperPilot sources config deepxiv
PaperPilot sources enable core
PaperPilot sources test core

Inside interactive mode, use /sources and /doctor.

🔑 API source keys references

Source Access page
CORE https://core.ac.uk/services/api
Lens.org https://docs.api.lens.org/
IEEE Xplore https://developer.ieee.org/getting_started
Springer Nature https://dev.springernature.com/
Elsevier / Scopus https://dev.elsevier.com/
Dimensions https://docs.dimensions.ai/dsl/api.html
DeepXiv / Agentic Data https://data.rag.ac.cn/api/docs

🧪 Quick Start

Interactive usage:

PaperPilot

Command mode example:

PaperPilot "RNA inverse folding sequence design" \
  --auto-confirm \
  --max-papers 50 \
  --since-year 2021 \
  --github-filter required \
  --sources auto \
  --mode apa \
  --quality balanced

Import local corpus and skip download:

PaperPilot "RNA inverse folding sequence design" \
  --auto-confirm \
  --user-corpus ./papers \
  --user-corpus references.bib \
  --no-download

Inspect/resume workflow:

PaperPilot inspect runs/<task-id>
PaperPilot resume runs/<task-id>

🧭 Workflow

PaperPilot follows this state-machine pipeline:

Intake -> Protocol -> Search -> Corpus -> Screening -> Verification -> Synthesis -> Review -> Report
flowchart LR
  U[User request] --> C[Run context]
  C --> QA[Query understanding]
  QA --> PL[Planning + Protocol]
  PL --> ST[Source Registry search]
  ST --> NB[Corpus normalization]
  NB --> SC[Core/adjacent screening]
  SC --> VF[Verification + PDF + code checks]
  VF --> SY[Literature matrix]
  SY --> QG[Quality gate + reflection]
  QG --> EL[Evidence ledger]
  EL --> RP[Report render (ZH/EN)]

📁 Run artifacts

runs/<task-id>/ will contain:

  • task.json / state.json / events.jsonl / manifest.json
  • query_understanding.md / plan.json / protocol.json
  • metadata.json / corpus.json / core_papers.json
  • adjacent_papers.json / excluded_papers.json / ranked_papers.json
  • verification.json / download_log.json / fulltext/ / paper_notes.json
  • literature_matrix.json / synthesis.json / quality_gate.json
  • evidence_ledger.json / review_agent_findings.json
  • report.canonical.json / report.zh.md / report.en.md
  • report.zh.html / report.en.html / report.zh.pdf / report.en.pdf
  • pdfs/ / source_diagnostics.json / registries.json / prompt_manifest.json

🧩 Code filter modes

  • any: keep all papers and annotate code availability
  • required: keep only papers with detected code repositories in final view
  • none: keep only papers without detected public code links

🧪 CLI options (important ones)

--max-papers INT                 maximum papers in final report view
--since-year INT                 preferred lower year bound
--github-filter any|required|none
--github-search-limit INT
--no-download                    skip PDF downloads
--pdf-limit INT                  maximum PDFs to download
--user-corpus PATH               repeatable local corpus path
--mode quick|apa|systematic
--interaction auto|gated
--quality fast|balanced|strict
--include-adjacent               include adjacent papers in appendices
--sources auto|all|core|biomed|cs|configured
--enable-source SOURCE           enable one source (repeatable)
--disable-source SOURCE          disable one source (repeatable)

See paperpilot --help for full options and Chinese/English output.

🧱 Development notes

  • Keep run outputs and generated artifacts out of source control.
  • Keep API keys out of git history.
  • Prefer .gitignore over manual cleanup.
  • Use semantic tags for releases and keep README + docs aligned.

🧭 Open source checklist

  • Ensure ~/.paperpilot/config.json, api.json, and .env with credentials are never committed.
  • Add/keep LICENSE and .gitignore.
  • Add source code and tags before publishing release assets.
  • Publish GitHub Pages from the main branch /docs.

Suggested first-publish flow:

git add README.md README.zh-CN.md pyproject.toml literature_agent tests paperpilot_agent_flow.html .github .gitignore LICENSE
git commit -m "Initial open source release"
git branch -M main
git remote add origin https://github.com/CHB-learner/PaperPilot.git
git push -u origin main
git tag v1.x.y
git push origin v1.x.y

PyPI release steps:

python -m pip install build twine
python -m build
python -m twine upload dist/*

📚 Citation note

If you use PaperPilot in your work, include the repository URL and version used so results are reproducible.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paperpilot-1.4.3.tar.gz (90.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paperpilot-1.4.3-py3-none-any.whl (90.1 kB view details)

Uploaded Python 3

File details

Details for the file paperpilot-1.4.3.tar.gz.

File metadata

  • Download URL: paperpilot-1.4.3.tar.gz
  • Upload date:
  • Size: 90.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for paperpilot-1.4.3.tar.gz
Algorithm Hash digest
SHA256 232d1c1934c3860295af9a821f335e6089c38dded25e45f828716ae677d124dc
MD5 bd0922efe2e5ef93a0b4c16e7a02e742
BLAKE2b-256 dd981ed3227d56a5ae14825aed7f5b1b57850a6bf9ad2c9ebe3bf76dbff56e83

See more details on using hashes here.

File details

Details for the file paperpilot-1.4.3-py3-none-any.whl.

File metadata

  • Download URL: paperpilot-1.4.3-py3-none-any.whl
  • Upload date:
  • Size: 90.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for paperpilot-1.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d7a8c8c00cf474dd3219a5deb322e7dcb6ef1a949f7395bca5ddec93cfe7a336
MD5 c8d4f0e64c5c54b7c2c314da3ceef43f
BLAKE2b-256 b373ddf65409529030cb7cc39f5e0d1ea633eae620a2812b835243d79a532e36

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page