PaperTeam
PaperTeam is a self-hosted AI workbench for academic writing. It searches real literature, grounds claims in verified evidence, drafts and reviews papers, compiles them to LaTeX/PDF — and when you already have a manuscript and reviewer comments, it revises the manuscript comment by comment without breaking your facts or citations, and tells you honestly when a decision belongs to you. It also benchmarks your paper against a target publication, reviews your figures and tables (deterministic checks plus optional vision model), and compiles publication-grade vector figures from your real datasets.



The thesis option is currently a UI selection only. Creating a thesis project or expanding an existing paper into a thesis is not implemented.
What you can do with it
1. Write a paper from a topic or research idea
Pick Create a new paper, choose a paper type, and PaperTeam runs the full loop:
- Survey / review paper — enter just a topic. PaperTeam plans the research, searches and selects literature, prepares full texts, builds a per-paper survey matrix and a cross-paper synthesis, waits for you to confirm the outline, then writes, reviews, revises, and compiles the survey to PDF. Verified end-to-end on real runs with zero fabricated citations.
- Research article — enter a research idea. The pipeline adds a feasibility assessment: if the target paper needs experiments you don't have, PaperTeam says so and produces the experiment list (purpose, datasets, baselines, metrics, ablations) instead of inventing results. You confirm the plan, then it proceeds through outline → section writing → citation verification → review → revision → quality gate → Draft/Final PDF.
- Thesis from your papers — register 1–3+ of your own papers, manuscripts, or
experiment reports as research inputs. PaperTeam extracts contributions (with
verbatim-quote anchoring), extracts and cross-checks scientific facts across
inputs, then asks you to decide scope, versions, unpublished-material policy,
and conflicting values — never the model. You confirm the storyline, two-level
outline, and chapter↔source mapping; chapters are written one by one with
author-confirmed facts as the only allowed numeric source (missing-experiment
chapters are written as stated limitations, never fabricated), reviewed with
provable coverage, gated by
published_facts_zero_drift, and compiled as a ctexbook thesis PDF (M14.2; generic template — no university-specific claims).
2. Revise an existing paper against reviewer comments
Import your existing paper (PDF or a LaTeX project zip), paste reviewer / editor / advisor comments, and PaperTeam:
- Rebuilds the manuscript into an editable, section-scoped draft and establishes a review baseline (including citation verification against Crossref / OpenAlex / arXiv).
- Pulls targeted evidence from your own materials for what the reviewers ask for.
- Plans the revision (you approve the plan), then a scoped Writer applies bounded patches — each patch is machine-validated against scope, fact preservation, citation preservation, and evidence.
- Reports per comment: handled / already satisfied / conflicts with your data / needs your decision — with a separate publication-readiness verdict, because a completed revision task does not automatically mean the paper is ready to submit.
You can also run a read-only Quick Review on any PDF: citation integrity + section-by-section review, exportable as a report, no changes to your paper.
3. Benchmark your paper against a target publication
Set a target profile (paper type, target venue, research field) and PaperTeam builds an empirical reference frame: venue-filtered, citation-ranked benchmark discovery (real OpenAlex source filtering) → an auto-selected set of 8–15 reference papers → frozen benchmark / profile / readiness artifacts. You get six readiness dimensions with four-tier verdicts (meets / partially meets / below target / insufficient evidence) and quantile bands from the real corpus — consumed as advisory context by feasibility, reviewer, and planner prompts.
Honest boundary: this is quality benchmarking against a reference corpus, not a promise of publication success. There is deliberately no numeric "score"; target stages are advisory-only and can never block or alter a workflow verdict; benchmark papers are role-isolated so they can never leak into your evidence pool.
4. Multimodal review of figures and tables
A visual review pass runs over the registered visual assets of your project — figures and tables from parsed PDFs, LaTeX environments, and generated figures. Six deterministic checks always run (label-reference resolution, duplicate labels, missing captions, unreferenced artifacts, table numeric consistency, caption-reference mismatch); when you configure a vision model, four more model-assisted checks run (figure-caption, figure-claim, legend-axis, diagram-method consistency).
Honest boundary: this reviews supported visual assets, not arbitrary PDF visual understanding — embedded PDF figures without an extractable image asset are reported as skipped, never guessed. Model observations are never auto-verified, and visual findings never enter blocking gates.
5. Compile academic figures from your real data
Upload a dataset (CSV/XLSX/JSON or a table block from a parsed source) and PaperTeam
compiles publication-grade vector figures: validated PlotSpec / DiagramSpec →
deterministic pgfplots/TikZ codegen → single-pass xelatex → vector PDF, with
content-addressed caching (same spec → same figure, byte-stable figId). Figures are
inserted into the manuscript through a controlled path (environment emitter +
whitelisted label + one controlled \ref), guarded by caption-truthfulness checks
that verify numeric claims in captions against the dataset itself.
Honest boundary: this is a deterministic figure compiler driven by your real data, not a generative image model — data must come from an anchored source block (or an explicitly-declared manual origin), tampering with the dataset is rejected at generation, and unverified caption claims require your confirmation before insertion. Coverage is 4 data-plot types + 2 diagram templates; arbitrary experiment-ZIP auto-recognition is explicitly not claimed.
Key features
| Area | What it does |
|---|---|
| Literature discovery | Multi-source academic search (OpenAlex, Semantic Scholar, arXiv, AMiner; optional SearXNG web search) with shared HTTP resilience; results stay candidates until you promote them |
| Library & retrieval | Five ingestion paths (PDF / DOI / arXiv / URL / BibTeX); deterministic chunking + BM25 + optional dense + RRF hybrid search — no vector database required |
| Evidence grounding | Retrieved ≠ Verified ≠ Grounded: candidate evidence passes verbatim-quote, authoritative-metadata, and semantic checks before any writer may cite it |
| Deterministic quality gates | 17+ explainable rules (citation integrity, fact preservation, feasibility, survey contracts, thesis zero-drift/mapping/structure/conflict); Build Gate (real LaTeX compile) is separate from Quality Gate |
| Revision safety | Scoped patches with immutable snapshots; fact/citation/evidence preservation guards reject unauthorized value changes, claim escalation, and citation loss |
| Human-in-the-loop | 15 decision points (outline, plan, feasibility, revision overflow, thesis scope/version/contributions/fact conflicts/missing material, …) that pause the run, persist with checkpoints, and survive refresh/restart |
| Model configuration | Per-role model assignment (Writer / Researcher / Reviewers / Planner), built-in and custom providers (3 protocols), Z.AI Coding-Plan vs pay-per-use channels, test-connection |
| Target intelligence | Venue-filtered benchmark discovery → frozen benchmark/profile/readiness artifacts; six-dimension × four-tier verdicts with quantile bands; advisory-only, benchmark papers isolated from evidence (M12.1) |
| Multimodal review | 6 deterministic + 4 optional vision-model checks over registered figure/table assets; model observations never auto-verified; findings never enter blocking gates (M12.2) |
| Academic figures | Deterministic chart generation from your real datasets (parsed CSV/XLSX/JSON/tabular sources → PlotSpec/DiagramSpec → pgfplots/TikZ → vector PDF), caption-truthfulness guards, controlled insertion into the manuscript (M12.3) |
| Output | Immutable Draft / Final artifacts; xelatex + bibtex explicit orchestration; revision history with compare and restore |
| Observability | Live per-stage progress over SSE, run history, token/cost attribution per agent × model |
Quick start
Verified on Windows 11 with Node 22/24/25; Linux is covered by CI and the Docker image (single-user).
git clone https://github.com/JiahongXu88/PaperTeam.git cd PaperTeam npm run install:all # backend + frontend npm run doctor # checks Node, deps, and the PDF toolchain npm run dev # backend :3000 + workbench :5173
Open http://localhost:5173, then configure a model under Settings → Model
Settings (provider, model, API key — the key is stored locally under
~/.paperteam, never echoed back). Without a model configured the app still runs;
agent calls fail with a structured error instead of pretending to succeed.
Optional dependencies (only when you need them):
| Dependency | Needed for |
|---|---|
Python 3.10+ with pymupdf |
Importing an existing paper PDF (pip install "pymupdf>=1.24") |
A LaTeX distribution (xelatex + bibtex, e.g. MiKTeX / TeX Live) |
Compiling Draft/Final PDF output; Quick Review works without it |
| Docling (optional) | Structured ingestion (layout/tables) of your materials; PyMuPDF fallback otherwise |
Docker (single machine, single user):
cp .env.example .env # optional: model key can also be set in the UI docker compose build && docker compose up -d curl -fsS http://localhost:8080/ready
More details: docs/getting-started.md · docs/deployment (Docker/Linux) · Linux server guide · dual-runtime (Windows local + Linux server) · docs/model-configuration.md · docs/network-settings.md
How it works
flowchart LR
T["Topic / Research idea"] --> R["Research &<br/>literature discovery"] --> E["Evidence grounding<br/>(verified only)"]
E --> F["Feasibility check"] --> O["Outline (confirm)"] --> W["Section writing"]
W --> RV["Review (3-way)"] --> G{"Quality gate"}
G -->|pass| P["Build → Draft → Final PDF"]
G -->|fail| V["Revision plan → scoped rewrite"] --> RV
flowchart LR
M["Existing paper<br/>(PDF / LaTeX)"] --> B["Baseline build & review"]
C["Reviewer comments"] --> S["Targeted evidence supply"]
B --> PL["Revision plan (confirm)"] --> SW["Scoped writer patches"]
S --> SW
SW --> PV["Patch validation<br/>(fact / citation / scope)"]
PV --> TG["Revision-task verdict"]
TG --> PR["Publication-readiness verdict"]
PR --> D["Revised Draft PDF"]
The key design choice: flow control is deterministic TypeScript, not an LLM. A small set of specialized agents (Researcher / Writer / Reviewers / Citation) run on an in-process runtime (Pi SDK), while orchestration, validation, and gates are ordinary code you can inspect and test. See docs/ARCHITECTURE.md (in Chinese).
Research honesty
PaperTeam is built around what it will not do:
- No fabricated experiments. A research article without real data stops at the experiment plan; the feasibility gate blocks Final for unreachable targets until you explicitly accept the risk.
- No fabricated citations. Only verified evidence enters the writing context; references are checked against external bibliographic databases.
- No fabricated figures. Figures are compiled deterministically from anchored real datasets; numeric claims in captions are verified against the data, and unverified claims need your confirmation before insertion. A figure is never treated as evidence.
- Revision success ≠ publication ready. Comment closure, deterministic guards, and full-manuscript readiness are reported separately, with author decisions surfaced instead of silently resolved.
- No silent rewriting. Revisions are scoped patches; unauthorized value changes and claim escalations are rejected by code, not by prompt.
Privacy & data
Self-hosted and local-first: projects, manuscripts, evidence, and artifacts live in
a projects/ directory on your machine; API keys are stored under ~/.paperteam
and never written to the repo or returned by any API. There is no telemetry.
Your paper leaves the machine only as model API calls to the provider you configure.
Documentation
| Doc | Contents |
|---|---|
| Getting started | Install, prerequisites, first run, troubleshooting |
| Product guide | Using the workbench: projects, tabs, HITL, revisions |
| Existing-paper revision | Reviewer-comment workflow, revision task vs publication readiness |
| Evidence & citations | Search → candidate → source → evidence → citation; why Source ≠ Evidence |
| Model configuration | Providers, per-role models, custom providers, key storage |
| Network settings | Optional proxy for academic search / metadata / OA full-text download only (never model APIs) |
| Architecture | System design and architecture red lines |
| Development | Dev setup, test layers, repository layout |
| Deployment | Docker / single-host Linux deployment |
| Linux server | Ubuntu 24.04 self-hosted guide (Docker / native, docling, backup) |
| Dual runtime | Windows local + Linux server, isolated credentials per machine |
| Project status | Current engineering status and milestone log |
| Research reports | Index of experiment / acceptance / audit reports |
| API contract | HTTP API / DTO / SSE contract |
| Decisions | Architecture decision records |
Docs are written in Chinese; translations are tracked as future work.
Project status
Alpha / MVP — active development. The two core workflows (topic-to-paper and
existing-paper revision) are implemented and validated on real runs: the revision
workflow completed a reliability program of 21 real runs with zero guard false
positives and zero fabricated-content leaks. The M12 line — target publication
intelligence, multimodal review, and deterministic academic figures — is feature
complete, verified with real GLM model calls on Windows and a real Linux server
deployment (Docker Compose; in-container xelatex figure compilation). Deterministic
components are covered by 3,281 backend + 334 frontend tests plus CI-verified Docker
smokes (scripted agent runtime — no model needed to run tests). M13 final closure
(2026-10-13): scientific-fact boundary guards (refutation stance for partial claims,
reviewer findings are not evidence, named-entity / unknown-citation-key fail-closed) and
bounded reviewer-variance confirmation are in production; a real Topic → PDF run reached
the Draft terminal on the production orchestrator — abstract-only corpora yield no formal
Evidence, so Final requires full text; verdict M13 PARTIAL (docs/research/M13_FINAL_CLOSURE.md).
Current limits, honestly: visual review covers registered assets only (embedded PDF figures without extractable assets are skipped); figure coverage is 4 data-plot + 2 diagram templates; PDF rebuild is text-level plus controlled figure insertion; browser E2E for the M12 features remains pending; the PaperTeam V2.1 workbench and new-paper UI screenshots are included above; single-user, no auth/multi-tenancy; some actions remain author decisions by design. Full list in docs/PROJECT_STATUS.md and docs/product-guide.md.
Contributing
See CONTRIBUTING.md. Bug reports and issues are welcome; please never post real API keys, unpublished manuscripts, or confidential review comments in issues.

