Paperful workbench¶
A local GUI over the same verbs as the CLI. docker compose up (or
paperful serve) binds http://127.0.0.1:8765. Zotero remains the catalogue
and reader. Grab fetches to out/. Attach writes the library — you press
it (manual, the default) or Grab does it (automatic, Settings) when the
library can be written.
Status: shipped. Ask is on the default nav (/ask;
opt-in [rag] + [llm]). An optional unsigned
Firefox add-on saves the page you are reading into out/.
The Zotero Connector stays the way to save into Zotero. Hosted SaaS stays
later — see ROADMAP — Product split.
Jobs, with screenshots: Walkthroughs (first fill, grow, tidy). Tool catalog: What it does.


Product framing¶
Three jobs sit on the default nav:
Nav |
CLI verbs |
Job |
|---|---|---|
Wanted |
|
See missing PDFs, preview fetch, grab to |
Discover |
|
Find new works (topic, person, or web grey hits), review, add metadata parents |
Ask |
|
Cited answers from PDFs already copied to disk ( |
Library, Activity, and System support the loop. Repair, Mirror, Index (ingest / search / extract; Briefs is reached from it), Peer review, Suggest edits, Stuff, and Settings appear only when Advanced is on (reveal only; does not enable Scholar, Sci-Hub, or LLM).
Browser ──HTTP──► paperful serve ──► paperful.* (same as CLI)
│
├── LibraryBackend (Zotero / …)
└── Ledger: out/ + state/
CLI / MCP ─────────────────┘
Control rules match the CLI: dry-run before bulk fetch, Preview → Grab with a review token (refuse if the library changed), opt-in Scholar / Sci-Hub / LLM / browser-agent. No built-in scheduler — Check again on Discover, not cron.
Shell chrome¶
Control |
Role |
|---|---|
Logo |
Product lockup (box + Nunito wordmark) links to Wanted; fonts match the public site (Fraunces / Nunito / Source Sans 3), self-hosted under |
Collection chip |
Scoped collection (remembered in a cookie) |
Preset chip |
Open access ( |
Health dot |
Worst cached |
Advanced toggle |
Cookie only; reveals extra nav and form fields |
Cookies |
|
Row actions |
Icon buttons (detail drawer, set collection scope) with the action name as the tooltip; one shared |
Help tips |
|
Apply buttons |
Any button that posts a review token (Add selected, Apply inbox, Attach held, Recover, Apply ingest-dois, Apply add) is disabled until its Preview has finished |
Long lists |
Discover uses tabs (Explore / Topic / Grow / People / Web / Queue / Following); Queue paginates. Ask threads and batches, Briefs archives, Wanted Advanced and Waiting-from-Discover, and the Repair queue fold into collapsible sections |
Errors |
Browser navigations get an HTML error page (404, 403, 409 stale preview, 500 with the one-line cause and links back); API paths keep JSON |
Layout |
Reflows at 1000 px (nav wraps) and 720 px (forms stack, tables scroll inside their panel); |

Layout: table-first rows, native <dialog> drawer (no embedded PDF viewer).
Long jobs return a command id; Activity subscribes to GET /v1/runs/{id}/events (SSE), with JSON poll fallback via GET /v1/runs/{id}.
Bind 127.0.0.1. docker compose up publishes 127.0.0.1:8765:8765 only.
Non-loopback bind (--host 0.0.0.0) requires --allow-remote-bind and is
unauthenticated unless PAPERFUL_UI_TOKEN or serve --ui-token is set
— see SECURITY.md.
compose.gui.yaml is a no-op shim for older -f compose.gui.yaml --profile gui invocations.
Simple loop¶
Wanted — first nav item, and
GET /lands here. With no collection, or when the library is down, an amber coach line points at System. Missing rows use miss-surface icons (hover forMISS_SURFACE_PLAIN). Held / Have use the same icon+tooltip pattern for PDF verification (doi_match,doi_mismatch,unverified,snapshot; not “% complete”). A Found stamp appears only ondoi_match(the PDF’s DOI equals the library item’s); every other file on disk gets a Check stamp. Each Missing row prints its one-line reason under the title (the sameMISS_SURFACE_PLAINtext as the tooltip). Report (GET /wanted/report,format=md|json|csv) uses the same stamps, so “N found” equals the number of Found stamps;csvis themisses.csvshape for the cleaning service. A library PDF flag with no file on the mirror (verificationmissing, “No PDF file on disk”) lands on Missing with the missing-file icon. The default tab is the first non-empty bucket (Missing → Held → Have). Waiting from Discover (panel above the tabs) lists kept queue rows and watch / keepup / authorwatch inbox rows that are not yet in the collection; each row can show a Why suggested line from the candidate’swhy. Preview add → Apply add creates metadata parents in this collection (DOI rows only); they then appear under Missing. Title-only rows still need Discover. Preview → Grab (fetch to theout/folder on this computer; selected vs all; Grab passes the sameitem_keysas the preview token). Manual (default): Attach writes attachable pending PDFs into Zotero (doi_matchand hand-ticked rows on Held with a pending file). The main button skips DOI mismatches and short PDFs (use Advanced Attach to override). CLIpaperful runstill attaches mismatches unless you pass--strict-pdf-doi. The label reads Attach N PDFs to Zotero when N are pending, Attach selected PDFs once rows are ticked, and Attach PDFs to Zotero (disabled) when N is 0 and no attachable rows are ticked (mismatch/short ticks alone stay disabled on the main button). Attach needs Zotero 10 or newer; on 7–9, attach files in Zotero. Automatic (Settings → After Grab, shown only after at least one successful Attach): Grab also attaches when the library supports write. Zotero 7–9 never receives the file from Paperful. DOI mismatch and short PDF still wait for Attach.Discover — Tabs: Explore, Topic, Grow (Advanced), People, Web, Queue (map + paginated candidates), Following. Explore: paste a DOI or a title and Open map (an ambiguous title offers a picker and Open map for selected) to land on Queue with a citation map seeded from that one paper. Topic: keyword search (
snowball searchdry-run queue), then open Queue for per-row Keep/Skip and Preview apply → Add selected (snowball apply, metadata only). Queue rows show Why suggested when the candidate carries awhyline. Advanced Topic can also set OpenAlex study designs and listed in (trusted journal lists such as DOAJ or MEDLINE). Membership is the maintainer’s list, not a quality score; works with no journal list never match. Map (on Queue) draws that queue before you open a PDF: older + highly cited is foundational, recent + highly cited is influential, recent + fewer citations may be emerging. OpenAlex study designs (RCT, meta-analysis, …) appear as category badges and filter chips on top of those roles. Click a paper to Keep/Skip or expand one hop (references, or papers that cite it). When a stopping rule is on, Next hop scores those marks and fetches one more hop (snowball continue). Fill PDFs opens Wanted. Briefing / Digest (buttons on Topic once a run exists) writebriefing.md/digest.mdon the queue (shown on Queue; digests are not auto-created). Search itself redirects to Queue. Advanced can tick File collection note (--apply+ collection chip) to file a Zotero collection note taggedpaperful:frontier-briefing. Keep an eye on this (on Queue) saves a topic watch only when a snowball profile is chosen; with no saved profile the click returns an error banner — save one on Advanced Topic first. People: create/delete a list, Follow (ORCID + optional backfill), add/edit/remove, resolve, Run list, Get suggestions (method + limit + collection) → tick rows → Accept selected (+ optional Initial seed from date), import CSV/JSON/ORCID or saved social HTML, people briefing (inbox plus OpenAlex recent works / co-authors for pollable members; same markdown as CLIauthorwatch briefing); Network panel (ORCID ego co-authorship map, phase slices, D3;[ui].coauthor_networkor the Settings checkbox Co-author network on People); inbox uses the same Preview → apply pattern (authorwatch apply). Web: SearXNG grey query (hosts, filetype, max); hit table; Preview apply → Add selected creates metadata parents (paperful search --apply). Save watch / Run stores a URL poll (search watch; you still cron it). Hide with[ui].web_search = "off"or the Settings checkbox Web search on Discover. Unset SearXNG shows an amber hint (no enqueue). PDFs still need Wanted. Check again re-runs a saved topic watch or person list. Topic watches also offer Preview apply / Apply inbox (snowball watch apply). Advanced topic watches offer Watch briefing / Watch digest (same optional collection note). Cron alert loop:keepup.

Library — Nested collection collapsibles with item / missing-PDF counts; target icon sets scope (collection chip) and lands on Wanted. Counts are cached for ten minutes per process (Refresh counts or
POST /library/refreshrecomputes). Scoped items paginate (default 50 per page; sizes in[ui]— seeconfig.example.toml).
Activity — Command history (started, verb linking back to its page, status dot, duration, result summary or error text) + trust line from
last-run.json. Queued and running rows keep polling until they finish (SSE, three reconnects, then JSON; rows older than 30 minutes are left alone). Records leftqueued/runningby a previous process are markedfailed(“server restarted before this job finished”) when the workbench starts. The GUI queue holds at most 20 pending jobs; a form submitted past that limit fails (too many queued jobs) rather than silently queueing.?all=1shows up to 500 rows.
System —
doctorrows with a status dot; amber/red rows show the next step, green rows show the detail. The first visit runs doctor inline; later visits render from the process cache (“Checked 3 min ago”, stale after ten minutes) and Re-check (POST /system/recheck) runs doctor as a background job, so a slow Camofox or GROBID probe no longer blanks the page.
Advanced surfaces¶
Same shell; extra verbs call the same domain entrypoints as the CLI. Discover
adds snowball kinds (hybrid/doi/orcid/collection), crawl knobs (including
Prioritize hop-0 recency / popular / historical,
stop rule, stop eps, stop k, stop max screened, and
Twenty writeback → cfg.twenty_writeback_listings), profile save/run,
resume, briefing, frontier digest, refs gap, ingest-dois
(Preview → Apply token), authors, and packs promote.
Wanted adds attach overrides (Allow DOI mismatch / Allow short PDF →
Preview attach → Attach held PDFs), Preview recover / Recover
(from last run: browser_agent_miss, missing, browser_agent_not_found —
same as recover --from-last-run-mode), Handoff, Drain inbox,
Reachout,
plus Grab filters (year / type / retry / try-all / browser-agent / upgrade).
Repair Preview runs dry-run then Apply writes: lint (read-only report),
fix-metadata, dedupe (Phase select + Include title+year merges),
versions, attachments (Fix broken / Merge files / Rename /
Link (personal library)), ocr, and screen (retractions, PubPeer,
tortured phrases; Apply adds the tag and child note). Apply appears only
after a successful Preview of that same verb.
Mirror Preview/Apply: sync, snapshot, restore, cache clean.
Ask: cited Ask when [rag] and [llm] are on and the index has rows.
Mode (simple / advanced) starts at [rag].ask_mode; a change is this
run only (Settings does not write it). After an advanced answer the page
shows how many passages were scored and kept. Batch Ask (state/ask-batch/)
is on the same page when Advanced is on (same Mode select). Focus presets
(including conflict), custom prompts (inline, upload, path, or saved under
state/prompts/), item keys, types, years, and top-k; batch adds --force
and a questions file upload. If the index is empty, Ask offers a compact
ingest. Details: rag.md. Index (Advanced): rag ingest / search when
[rag] is on; Extract questions (rag questions) and Already answered?
(rag answered, state/rq-answered/) use the same scope. Collection chip is
the scope. Synthesize on Index when [llm] is on (Preview / Write
report; Briefs labels the same pair Dry-run / Write report). Extract sections
(extract-sections → state/sections/) is on Index too — mirror PDFs, no
[rag].enabled required; optional GROBID checkbox. See
rag.md and GROBID.


Briefs: collection summarize / synthesize when [llm] is on.
Synthesize has a Layout control (default, conflict, review; CLI
--layout). Ask --focus stays on /ask.
Per-item Summarize this / Summarize in Wanted (Held / Have rows) and
Library (rows with a PDF) drawers, Advanced and [llm] on.
Settings writes config.toml; it does not enable [rag] or [llm].
Fields: Unpaywall email, out/ path, Preset (Open access / Campus),
After Grab (Manual / Automatic; shown after the first Attach), Citation
map edits (Both / Sidebar only / Popup only / Off), Auto-search PDF after
Add to library, Co-author network on People, Web search on Discover.

Peer review (Advanced): pick a collection item or drop a draft
(pdf/docx/odt/html/rtf/txt/md/pptx, 40 MB). Writes state/peer-reviews/ (pack.md).
Uploads stay under state/peer-reviews/uploads/ and are not imported to out/
or Zotero. Optional review lanes need [llm] (item form also has force-LLM
and write-child-note). Checkboxes are labeled by what they return (independent
reviewer notes; experiments/clarity/impact; argue against conclusions; review
as an outline; claims this text supports, plus held cited-PDF locators when
state/rag/text exists; section gaps; compare with this
library, three retrieve rounds; compare with published work, goes online). Tooltips hold the lane ids (reviewers, marg,
adversary, outline, claims, verify — not a truth check, context,
context-web). Checkboxes are independent and pre-check from
[peer_review].lanes (or the llm/advanced shims). GROBID sidecar is for MARG-S /
claims / verify PDF chunks (pre-checked from [grobid].enabled; ticking it is
--grobid even when that setting is false). Optional AI-model checkbox
requests a Binoculars extra (git overlay; not installed by default). Optional Vale checkbox
runs house-style lint when vale is on PATH. The box is not pre-checked;
[peer_review].vale = true still runs the pass. Optional Forensics (PaperGuard)
checkbox runs paperguard scan when that binary is on PATH
([peer_review].forensics = true still runs the pass). Show-dismissed is
item-only. Not a score. See peer_review.md.

Suggest edits (Advanced; /rewrite, CLI paperful rewrite): pick a
recent peer-review pack, optional replacement draft if the file moved,
area/output/comments controls. Writes state/rewrites/ (edit plan, optional
sidecar, tracked-changes Word / OpenDocument / PDF). Never overwrites the source. Empty state:
Run Peer review first. Style glossary/Vale swaps run with [llm] off. See
rewrite.md.

Review (Advanced route /review, not in the nav; CLI paperful sr) records include / exclude / maybe against a protocol. Apply stays disabled until Preview. See sr-mode.
Stuff (Advanced; /stuff, CLI paperful stuff): pick a collection item
or drop a draft. Extra library cites per sentence (manuscript) or
outline section. Writes state/stuff/ (pack.md / pack.json). Needs
[rag] and a built index; does not need [llm]. Never writes Zotero.
--apply stays later. See stuff.md.

Stays CLI (no GUI control): session login, doctor --guide, mid-run
EZProxy re-login, snowball approve-each, collections add, Sci-Hub source
toggles; Ask TTY multi-turn, --show-context, named run profiles,
ask --claim-check, paperful evidence, and summarize --receipts
(Briefs summarize does not turn receipts on).
paperful all / named run configs stay workflows.
HTTP capability API (P0 + GUI)¶
JSON capability routes live on paperful serve (serve.py). HTML + form POSTs
are mounted by paperful.ui (mount_ui).
Method |
Path |
Behaviour |
|---|---|---|
GET |
|
|
GET |
|
Same as |
GET |
|
Collection tree |
GET |
|
|
GET |
|
GUI command record under |
POST |
|
Enqueue |
POST |
|
Drop collection-count + scope caches; redirect |
GET |
|
SSE |
POST |
|
Dry-run |
POST |
|
Same as MCP |
POST |
|
Smoke / readiness for the GUI process |
GET |
|
Read-only stamp cards for the scoped collection (`format=md |
POST |
|
Review token for Grab (Advanced: year/type/retry/… flags) |
POST |
|
Consume token; fetch to |
POST |
|
Review token for held PDF attach |
POST |
|
Selected keys or all attachable pending in scope (no mismatch/short on the main button). |
POST |
|
Review token for browser-agent recover |
POST |
|
Consume token; |
POST |
|
|
POST |
|
One-shot inbox drain |
POST |
|
Review token: add Waiting-from-Discover DOIs (metadata only) |
POST |
|
Consume token; create parents → Missing |
POST |
|
Export contact rows; optional RG tabs |
POST |
|
Enqueue single-item |
GET |
|
Per-item HTML under |
POST |
|
Resolve a DOI or title into an explore queue; open Map (picker when title is ambiguous) |
POST |
|
Enqueue snowball kind (Advanced) or keyword search; redirect |
POST |
|
Next hop: score Keep/Skip marks and fetch one more hop ( |
POST |
|
Save snowball profile from the topic form |
POST |
|
Dry-run refs gap pack for the collection chip |
POST |
|
Classify DOIs / refs-gap pack; review token |
POST |
|
Consume token; create parents |
POST |
|
Authors frequency (optional |
POST |
|
Promote a proposed field author pack |
POST |
|
Follow ORCID into a list ( |
GET |
|
Citation map JSON for |
GET |
|
Collections/tags plus |
POST |
|
One OpenAlex hop ( |
POST |
|
Re-link rows to hop-0 seeds via OpenAlex (Keep unchanged) |
POST |
|
Library neighbours as ghost overlay (mirror DOIs; not queued) |
POST |
|
Stage tags / note / collection on a queue node (live when already in library) |
POST |
|
Add one new candidate to the library; optional Find PDF when |
POST |
|
Grab PDF for one |
POST |
|
Trash library item for a map node ( |
POST |
|
Mark a queue DOI keep/skip (form POST reloads; |
POST |
|
Re-run topic watch or person list |
POST |
|
Enqueue |
POST |
|
Enqueue snowball from a named profile |
POST |
|
Write queue |
POST |
|
Write queue |
POST |
|
Watch inbox briefing; optional collection note |
POST |
|
Watch digest; optional collection note |
POST |
|
|
POST |
|
Review token for snowball/authorwatch apply |
POST |
|
Consume token; |
POST |
|
Create authorwatch list |
POST |
|
Add ORCID (optional display name / affiliation) |
POST |
|
Remove person from list |
POST |
|
Enqueue |
POST |
|
Enqueue |
POST |
|
Enqueue |
POST |
|
Enqueue accept checked suggestions (+ optional seed date) |
POST |
|
Update member display name / affiliation |
POST |
|
Delete list ledger ( |
POST |
|
CSV/JSON/ORCID/saved social HTML upload → list ( |
POST |
|
Write list |
GET |
|
Saved ORCID ego-network runs ( |
GET |
|
Graph + metrics for |
POST |
|
Enqueue |
GET |
|
Saved web-search runs ( |
GET |
|
Candidates + summary for |
POST |
|
Enqueue |
POST |
|
Preview (review token) or apply selected URLs ( |
POST |
|
Save a grey watch (query / hosts / interval) |
POST |
|
Enqueue |
POST |
|
Toggle Advanced cookie |
POST |
|
Remember collection chip cookie |
POST |
|
Write allowed |
GET |
|
Advanced Peer review: item picker, upload, last pack |
POST |
|
Enqueue |
GET |
|
Advanced Suggest edits: recent peer-review packs, optional draft, area/output/comments; empty state Run Peer review first |
POST |
|
Enqueue |
GET |
|
Download |
GET |
|
Advanced Stuff: item picker, upload, lane/k, last pack |
POST |
|
Enqueue |
GET |
|
Download |
POST |
|
Dry-run repair verb + review token |
POST |
|
Consume token; apply repair verb |
POST |
|
Dry-run mirror verb + review token |
POST |
|
Consume token; apply mirror verb |
GET |
|
Ask page (threads, cited answer, batch). |
POST |
|
Enqueue cited Ask turn ( |
POST |
|
Enqueue batch Ask ( |
POST |
|
Alias of |
POST |
|
Alias of |
POST |
|
Enqueue |
POST |
|
Redirect to |
GET |
|
|
POST |
|
Enqueue |
POST |
|
Enqueue |
GET |
|
|
POST |
|
Enqueue |
POST |
|
Enqueue |
GET |
|
HTML under |
POST |
|
Enqueue |
POST |
|
Enqueue |
GET |
|
HTML under |
GET |
|
HTML under |
HTML routes: /discover, /wanted, /ask, /library, /activity, /system, plus
advanced /repair, /mirror, /index, /briefs, /peer-review, /rewrite,
/stuff, /settings. GET / → /wanted.
/repair/preview and /mirror/preview enqueue work and redirect with ?run=; Apply
posts review_token from that command record (stale previews return HTTP 409).
GET /index?thread= redirects to /ask?thread=. POST /ask enqueues a cited Ask
turn; POST /index/ask is the same handler.
Every POST passes an origin guard first: a request whose Sec-Fetch-Site
is cross-site, or whose Origin / Referer host differs from Host,
returns 403 {"ok": false, "error": "cross-origin request blocked"}
(same-origin forms and header-less curl pass). Every response carries a
Content Security Policy (script-src 'self'); the templates have no inline
scripts or on*= handlers, and authorwatch list_name values are validated
(400) before they reach a template. POST /library/refresh drops the
collection-count and scope caches; POST /system/recheck enqueues doctor. The GUI job queue holds at
most 20 pending jobs; a submit past that fails (too many queued jobs,
HTTP 500) instead of growing the queue — wait for Activity to drain.
Writes over HTTP use review tokens under state/gui/reviews/; stale library
fingerprints return 409. Discover Add selected / inbox apply, ingest-dois
Apply, and Wanted Grab / recover require Preview first (tokens
may bake Grab flags). Grab fetches to out/ only; Attach is a separate
labelled library write (ticked keys from Wanted, or Advanced preview then apply).
Repair / Mirror Apply require Preview first.
Keep an eye on this needs an existing snowball profile (save_watch); it
does not write an empty watch.json. Long jobs land under state/gui/commands/;
Activity streams GET /v1/runs/{id}/events (falls back to polling GET /v1/runs/{id}).
Run status (SSE)¶
Long GUI jobs write a command record under state/gui/commands/<id>.json
(queued → running → done | failed). The workbench opens
EventSource on GET /v1/runs/{id}/events (Content-Type: text/event-stream).
Each change emits:
event: status
data: {"ok":true,"id":"…","verb":"…","status":"running",…}
The payload matches GET /v1/runs/{id} (ok plus the on-disk record, including
review_token, error, and result when present). The server sends the current
record immediately, then pushes again when the ledger file changes; comment
heartbeats (: ping) appear about every 15s while the job is still active. The
stream closes after a terminal status. Missing ids return 404 JSON (not SSE).
workbench.js reloads the page on done / failed and falls back to JSON polling
if the stream errors. After a form POST that enqueues work, the redirect includes
?run= (or Wanted Preview uses ?poll=); the target page shows queued / running
beside that form until the job finishes.
Non-goals¶
Second Zotero (reader, annotations, collection drag-and-drop)
Systematic-review screening as the primary UX
Chat-over-library as the default landing
Sci-Hub on simple pages or in Preview
Replacing Zotero sync or WebDAV