Curious Astronaut — an interactive citation/similarity graph explorer with an AI teacher that narrates a field's history over the graph.
pip install curious-astronaut==8.42.0 Copy PIP instructions
Explore how research papers connect — and have an AI teacher narrate the story of how a field got here.
Drop in a paper and Curious Astronaut renders a Connected-Papers-style interactive graph of how it links to the literature — the papers it cites (its intellectual ancestors), the papers that cite it (its descendants), and its nearest neighbors by meaning. Then wander: open any paper and Explore in a thread to re-center the graph on it and keep exploring.
Each exploration holds its threads in two groups in the sidebar: Chats, for searches and broad questions (start as many as you like with the +; each is named after its first question), and Papers, a thread for each paper you open (its + opens a chat with @ typed, ready to find one). A paper thread opens on its card home: the paper (title, authors, TL;DR) and a card for each tool that works on it: the Citation Graph, the Knowledge Graph and the Reader. The Citation Graph builds only when you open its card, and clicking a thread in the sidebar always brings you back to its cards; the graph you left is kept in memory, conversation and all. Each graph docks its own AI assistant (🎓): the Citation Graph Assistant and the Knowledge Graph Assistant, which reads the course and its lessons; the cards have none. The Knowledge Graph is a short course on the ideas a paper rests on: the paper at the centre, the concepts it needs around it. Double-click any concept to break it down further, click one for a lesson written for this course (opening on a picture of the idea itself, with real images from your library, papers and the web where they help, each credited, or ⚡ Quick response for the lesson alone; highlight a passage to Explain it in the assistant, Expand it into a new concept, or Chat about it, attached to the assistant's bar for a question of your own; the lesson's ⋮ menu rewrites it, hides the concept or deletes it for good, and a red count on a node shows what's hidden beneath it, back with a double-click), and tick off what you already know (shift-click or alt-drag to tick off several at once, or 🔍 find concepts by name and select every match). There's a 3D mode too, and a Pyramid view that stacks the course in rows, foundations at the bottom and the paper on top, fading whatever your check-offs let you skip; a node whose lesson is being written wears a spinning ring, even with its panel closed. Both graphs keep their legend beside local search: legend entries wrap and the search field shrinks as the browser narrows or panels open; on narrow 3D graph panels, ⓘ beside search holds the navigation hints (click away or press Esc to close). Paper citations highlight the current graph; graph icons open or resume that paper's thread directly (onto its graph if you're on one, onto its cards otherwise). Type @ and pick another chat from the suggestions (a thread's Citation Graph or Knowledge Graph conversation, e.g. @thread[PPO › Knowledge Graph]) to bring it into the agent's context. Lectures remain part of their thread's history, including follow-up questions after a reload. Existing saved sessions migrate lazily when opened.
The Reader is the paper itself, from arXiv's HTML render (ar5iv): its equations typeset, figures that enlarge with their captions, tables, algorithms and footnotes in place. A citation shows its reference on hover and jumps to it on click, and a figure or equation number jumps to it. The contents follow along as you read; drag their edge to resize them, or fold them away to a thin line with the bump on that edge. A Text / PDF switch shows the paper's PDF instead, remembered per paper, and papers with no HTML render (arXiv couldn't convert them, or they aren't on arXiv but have an open-access PDF) open straight in it. The PDF's contents are its own bookmarks, else the section headings found in its text, and the highlight menu and assistant work on it too, reading the PDF page by page. Highlight any passage, an equation or part of one included, and choose Explain, Simplify or Chat: the Reader Assistant (🎓, docked on the right) answers from the paper itself, starting with the section you're in, and searches your library and the web only when a question reaches past it. It keeps its own chat, listed in @ as "Paper › Reader".
An enlarged figure covers the middle of the app, never the sidebar or a docked assistant, so an assistant explaining a figure stays readable beside it.
Long author lists on the paper’s card home, detail panel and Knowledge Graph panel collapse to an ellipsis, with Show all authors ▾ and Show fewer ▴ controls. The year stays visible, and expanding preserves the complete author list.
The graph-choice cards keep equal heights when stacked vertically, sized to the longest description at the current width. The graph-choice cards glow in their blue or gold accent, lift slightly, and grow on hover or keyboard focus; their icons and rounded squares grow together a little further. Reduced-motion settings keep the highlight without movement.
The light/dark toggle crossfades the page and animates its icon, respecting reduced-motion preferences. The helmet has a blue outline in light mode only; the browser favicon follows the browser’s reported color scheme independently.
It connects to the academic-graph ecosystem dynamically — there's no local corpus of papers to store. The only things kept on disk are a small cache of the graphs you've looked at, your saved sessions, and the library of sources you upload (embedded locally; nothing leaves your machine).
Why it exists. Curious Astronaut is free software (MIT), built to put research and self-teaching within reach of anyone who wants to learn something — not to become a product. It runs on your own machine, and the sources you upload never leave it. If something with more reach ever does this better, good; until then this exists, and you can have it.
The teacher runs on whichever model you point it at, including free ones. The graph explorer is keyless and free. For the AI teacher, pick a vendor: Ollama runs a model on your own machine — no key, no signup, no cost, nothing leaving the computer — or Google AI Studio issues a free-tier key, or use paid Anthropic / OpenAI if you have one. Any OpenAI-compatible server (Groq, OpenRouter, LM Studio) works through the OpenAI entry too. It is a per-agent choice, so a sensible setup runs the lecturer locally and leaves the one agent that needs web search on a cloud vendor. See docs/configuration.md.
┌──────────┐ find seed ┌─────────┐ whole graph ┌──────────────────┐ │ search │ ───────────▶ │ backend │ ─── seed/refs/ ──▶ │ Semantic Scholar│ │ (S2+LLM)│ (title/id) │ (Flask) │ citations │ — or — │ └──────────┘ └────┬────┘ (one provider) │ OpenAlex │ │ /api/graph (thin cache) └──────────────────┘ ▼ ┌───────────────────────┐ │ React + force graph │ ← the interactive map you explore └───────────────────────┘ Stack: Python/Flask + uv · PydanticAI agents on Claude · React + TypeScript (strict) + Vite + Redux Toolkit · react-force-graph-2d · OpenAlex (citations) + Semantic Scholar Academic Graph API · ar5iv + pymupdf-mined open-access PDFs for figures/full text · Hugging Face Papers for code & artifacts · sentence-transformers + sqlite-vec for the local library. Runs locally.
The toolchain (python, uv, nodejs, trivy, gh) is pinned in .tool-versions — mise installs it all with mise install (mise reads the asdf-format file and works on Windows and macOS alike). With mise in place, bin/setup.bat (Windows) or bin/setup.sh (macOS/Linux) does the full bootstrap: pinned tools, a full uv sync (dev tooling, the notebook research group, and every optional extra), and the frontend install + build. Without mise, uv and Node.js installed any other way work fine too.
Three capabilities are optional extras, because they are most of the install and a reader who only wants the graph and the teacher needs none of them — core is 93 MB against 1.0 GB with everything (measured on macOS 2026-09-27, fresh installs from PyPI; running the app adds ~30 MB of bytecode caches on top):
bin/setup installs all of them. To pick: uv sync --extra pdf, or pip install 'curious-astronaut[pdf,corpus]'. Nothing breaks without one — the feature says it isn't installed and names the command. See docs/first-run.md.
Windows pulls a CUDA build of torch (~1.8GB, from PyTorch's cu130 index) with the sources extra, so the local embedder can use a GPU if you have one — PyPI's Windows wheel is CPU-only, and that's the whole difference between ~80 and ~1500 chunks/s at ingest. It falls back to CPU on a machine without a GPU, and macOS/Linux resolve torch from PyPI as usual. See sources.embedding.device.
cp config.example.json config.json All configuration lives in config.json (gitignored — it holds your keys; no environment variables, ever). Every field must be present and is validated at startup by Pydantic, so a malformed value fails fast with a clear message — but the API-key values may be left blank. For the full value-by-value reference (every tunable, its default, and why it's there), see docs/configuration.md.
The two data-source keys are completely optional — Curious Astronaut explores the graph fully without them, just on tighter public rate limits. The Anthropic key is the one that unlocks the AI teacher (lectures, research Q&A, library chat); the graph explorer runs fine without it, but the Assistant panel needs it.
providers.s2.api_key — optional. A free Semantic Scholar API key is recommended (the keyless pool is tight), but keyless works.
providers.openalex.api_key — optional. OpenAlex (the citation source) runs keyless on its mailto polite pool ($0.10/day of metered search — plenty for browsing); a free key at openalex.org/settings/api lifts it to $1/day. Set providers.openalex.mailto to your email either way.
llm.providers — one block per LLM vendor; fill in at least one to power the agents. Four are wired, and two of them cost nothing:
Which vendor each agent uses is set per agent in llm.agents ("model": "ollama:qwen3:8b"), so mixing them is normal — and each vendor in Settings ▸ Agents ▸ Model Providers has a "Use for all agents" button that puts the lecturer and researcher on its advanced model and the summarizer and scouts on its light one, in one click.
Single-server (serves the built frontend + API together):
cd frontend && npm install && npm run build && cd .. uv run astronaut serve # http://127.0.0.1:5000 uv run astronaut serve --port 5050 # ...or another port (--host to expose it) uv run astronaut --version # the installed version Development (two terminals, hot-reloading frontend):
uv run astronaut serve # Terminal 1 — API cd frontend && npm run dev # Terminal 2 — http://localhost:5173 The Vite dev server proxies /api/* to Flask.
Find a paper — everything starts in the chat bar; there is no separate search box. Ask a research question and the assistant goes looking, or type @ to name a paper: suggestions appear as you type, and picking one attaches that exact paper to your message. What happens next depends on what you said — the same rule a pasted id has always followed, that naming one paper and nothing else is a statement of intent:
The suggestions arrive in two passes: your cached papers appear as you type (a local scan — free, offline, no wait), then a real search fills the list out when you pause, re-ranked so the paper whose title most nearly is what you typed leads. While that second pass runs, the panel says which phase it is on — "Searching Semantic Scholar", "Working out which paper 'dqn' is" — rather than a bare spinner. So a paper you have never opened is still nameable, and one you have seen shows up instantly. (There was a 🔍 Find papers toggle for this until v7.18.0. It made the same words mean different things depending on a button's state, and it couldn't express "answer from this paper" at all.) A search streams: cached papers appear immediately (⚡ opens instantly marks the ones whose whole neighborhood is cached, so a click costs no API call), then the scout's finds arrive lookup by lookup with a trace chip each. The Paper filters popover (on your chats) holds a publication-year window (1800 → now) and fields of study — hard limits, not hints, and they bind the assistant's own paper searches too (though never an @ lookup: you named that paper, so a filter has no business hiding it). Citation links on the graph are never filtered.
Read the map — 🟡 seed · 🔵 references · 🟢 citations. (💗 found-by-search too, on a session saved before v7.3.0 — free-text hits used to be drawn as edgeless pink dots; now the assistant numbers what it finds and you promote a paper onto the graph by clicking its citation.) Every paper that cites the seed is one citations relation — from the historic giants to work published this month — and which of them matters is yours to decide with the year and citation-count sliders, not ours to decide with a threshold. (They were two relations, Field Landmarks and Latest Publications, until v7.17.0.)
Behind that one relation are still two queries, because they have to be: the most-cited citers come back ranked by citation count (under OpenAlex, the true all-time top-cited from a sorted cites: query; under Semantic Scholar, the whole citation history when the offline corpus serves it or the seed's citer list is fully reachable live — the graph's own note names which source is behind them; see docs/citation-coverage.md for how the two sources compare), with how many to show measured per-seed from the real citer pool (an old classic maps out large, a young hot paper stays tight — the STOP rule in services/graph/budget.py). A second query runs per recent year, and it is the only reason recent work appears at all: citation counts measure attention and elapsed time together, so a paper from this year never survives a citation ranking. Its start year is sized per-seed from fitted constants so an old classic's coverage reaches back to meet its dense cluster instead of leaving a gap (see services/graph/bands.py). (Every term here — landmark, band, tail edge, the sizing rules — is defined once, with a worked example, in docs/landmark-vocabulary.md.) Node size = citations; thick links = influential citations; turn on the Surveys chip and surveys and reviews (the field's own overviews) are ringed orange, flagged from Semantic Scholar's Review type for every provider and source. Click a node for details (TL;DR, abstract/PDF links, arXiv & Semantic Scholar category tags, figures — mined straight from the open-access PDF for journal papers, tables and algorithms included — code & artifacts); double-click it, or Explore in a thread from its panel, to re-seed on it — journal papers included. Expand any paper on the same graph from its panel: + References brings in every paper it cites, + Citations its citers picked the way the seed's are (the tau rule over its whole history), and the paper turns pink and moves out with them into a cluster of its own (a stream of its own in Timeline), with the papers it shares with the seed between. Reclick a hop's green ✓ to take it back off. LaTeX math ($…$) renders throughout — titles, abstracts, lecture beats, answers, and figure captions — via KaTeX.
Declutter — a new graph opens onto the graph: the controls sit folded to a slim bar (click its header to open them) and no paper is selected until you click one. Inside: Force ↔ Timeline layouts (x = publication date), relation on/off filter chips, a dual-knob year slider and a dual-knob citation-count slider (a log-scale min…max window over the papers on screen — a display filter, no re-query), drag-to-pin, focus-on-hover, and a click centres a paper, opens its detail panel and holds its links in focus until you click it again, close the panel, or press Esc (a first Esc clears any selection or highlight, the next lets go; point at one of the lit papers to see its own links in turn), Show interconnected links (Force) to link up the papers on screen by their citations to each other, the way Connected Papers does, with papers linked only to the seed gathered per relation, and a Refresh that busts this seed's day-cached snapshot to re-fetch fresh from Semantic Scholar. Hand-pick a scope with the node selector: alt-drag a marquee to add papers to the teacher's scope (additive — several sweeps build one cluster), shift-click to add/remove one, and alt-click empty (or Clear) to reset. Picked papers ring cyan and the rest dim (unless a paper's panel is open, whose held focus then owns the dimming); drag any ringed paper and the whole selection moves with it, pinned where you drop it. The teacher then grounds only in your selection — even papers a filter later hides, which stay drawn with a dotted ring. Click the Curious Astronaut brand anytime to go home. By default the app sizes each graph for you (how many landmark citers to ship, where the Latest bands start — per seed); turn "Size graphs automatically" off in Settings ▸ Graph to have it ship everything it can and size the bands yourself, and each filter chip gains a count slider to trim how many of that relation you see.
Your sources (📚) — drop in PDFs (parallel, with live embedding progress) or paste URLs; scope any conversation to a subset of them.
Explorations — every sitting saves itself, so there is no Save button: ask a question and it appears in the rail, named after what you asked, kept up to date as you work. Leave an answer running and start another exploration — it keeps going in the background and is waiting when you come back. With the sidebar collapsed, the Explorations bubble opens the expandable list of explorations, chats and papers in a compact modal. Select a thread to resume it; Escape or a click outside closes the list.
Lost? Hit the header's ? for a guided coach-mark tour — it auto-runs once on first launch (the search surface) and once more on your first graph (the graph tools), spotlighting one control at a time; the bubble's title doubles as a jump select that skips straight to whichever tip you came back for.
The rewrite's first principle: every package documents itself. Start at any folder's README.md — e.g. src/curious_astronaut/agents/ (the two tiers — orchestrators that own an outcome, workers that own one source each — plus the event protocol and the streaming bridge), services/sources/ (hybrid retrieval: FTS5 + vectors + RRF), frontend/src/README.md (the render-tree map), or frontend/src/store/ (what earns a Redux slice and what stays local).
Quality gates: uv run nox runs the whole repo's — pre-commit hooks (file hygiene; ruff incl. Google-style docstring rules; a repo-local no-single-letter-identifiers AST check, notebooks included; pydoclint for Args/Returns completeness; the frontend's prettier + oxlint incl. JSDoc completeness and id-length, the frontend half of that same naming rule), strict mypy, pytest (test/, 669 offline tests), and Vitest (frontend/test/, offline too) — plus cd frontend && npm run build (strict tsc + Vite) for the type/build check.
All of that also runs in CI (.github/workflows/ci.yml) on every push to main, across ubuntu-latest and windows-latest. CI installs the pinned toolchain from .tool-versions with mise, so it runs the same python / uv / node / trivy the developer machines do — and because Trivy is genuinely on PATH there, the security scan actually runs rather than skipping. It reuses bin/setup.sh rather than restating it, with CA_SKIP_TORCH=1, which drops the sources extra: nothing in the gate needs torch, and skipping it avoids dragging the 37 Linux CUDA packages into every run (1.0 GB → 304 MB). The pdf and corpus extras are installed there — those tests build real PDFs and query real Parquet. A second workflow (release.yml) fires on v* tags: it fails if the tag and pyproject.toml's version disagree, then builds the frontend, builds the sdist and wheel, verifies the artifacts carry the bundled SPA and no local state, and publishes to TestPyPI and then PyPI via trusted publishing (no stored token). The release runbook — including how to rehearse without publishing — is docs/releasing.md.
For the project's direction and past, two living docs sit beside the code: OnePager.md (the vision, the full feature stack, and the open backlog) and docs/history.md (the complete shipped record, version by version).
Lecture replies align their scope and routing labels with the response timer in one header row; long labels wrap without crowding the clock or narrowing the lecture beats.
The chat model picker keeps its model list within a compact 180px scrolling area (smaller when the window needs it), with its heading and Settings default option always above the list.
All 2 files in this release have provenance metadata.
arxiv citations knowledge-graph literature-review llm research semantic-scholar
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 24, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




