Multi-agent system that researches, drafts, verifies, typesets, and exports academic papers across 7 formats.
Architect -> Researcher -> Synthesizer -> Reviewer -+-> Typesetter -> Export
^ |
+------ feedback -----+
The Reviewer routes back to the Researcher (missing evidence) or Synthesizer (writing issues) until verification passes, capped at 3 revisions.
python -m venv .venv
.venv\Scripts\activate # Windows PowerShell/cmd
# source .venv/bin/activate # macOS/Linux
pip install -r requirements.txt
playwright install chromiumSystem dependencies for exporters:
- WeasyPrint (PDF) — GTK 3 runtime on Windows: https://weasyprint.readthedocs.io/en/stable/install.html
- pdf2image (JPG/PNG) — Poppler binaries: https://github.com/oschwartz10612/poppler-windows
Copy .env.example to .env and set:
ANTHROPIC_API_KEY— requiredTAVILY_API_KEY— required for web searchSEMANTIC_SCHOLAR_API_KEY— optional (higher rate limits)
python main.py run "Survey of CRISPR delivery vectors" --out output/crisprGenerates output/crispr.md, .txt, .docx, .pdf, .pptx, .xlsx, and output/crispr_page_N.png.
Pick specific formats:
python main.py run "Quantum error correction overview" -o out/qec -f pdf -f docxpytest -vacademic_engine/
├── state.py # GlobalState TypedDict
├── config.py # Env-driven Config dataclass
├── llm.py # Anthropic SDK wrapper with prompt caching
├── graph.py # LangGraph wiring + reviewer routing
├── pipeline.py # run_pipeline orchestrator
├── agents/ # 5 agent nodes + system prompts
├── tools/ # Semantic Scholar, ArXiv, Tavily, web scraper
└── exporters/ # 7 export formats + universal facade
main.py # Typer CLI entry point
tests/ # Full pytest suite (40+ tests)
This repo is also a Claude Code plugin. It ships a single skill (academic-engine) that teaches Claude how to drive the CLI from inside a Claude Code session.
claude plugin install "<path to this repo>"
claude plugin list # verify "academic-engine" appearsANTHROPIC_API_KEY(required)TAVILY_API_KEY(required for web search)SEMANTIC_SCHOLAR_API_KEY(optional — higher rate limits)
Set these in the shell that launches Claude Code; the plugin reads them at run time.
- PDF export needs WeasyPrint GTK runtime.
- PNG/JPG export needs Poppler.
- MD / TXT / DOCX / PPTX / XLSX have no system dependencies.
Ask Claude Code something like: "Write me a literature review on X, export as DOCX and PDF." The skill activates automatically, bootstraps the venv if needed, verifies API keys, runs the test suite, then invokes python main.py run … and reports the output files.
See PLUGIN_QUICKSTART.md for the full 60-second walkthrough.