Marginalia
A retrieval-grounded agent for tracing thought-threads across poets, philosophers, and filmmakers.
- Year
- 2026
- Status
- In progress
- Stack
- TypeScript, Next.js, Anthropic Claude, pgvector, Embeddings
- Code
- GitHub →
Live demo coming soon — drop me a note for early access.
The premise
Reading is a slow form of pattern matching. The first time I noticed how often Auden, Kierkegaard, and Tarkovsky were saying the same thing in different rooms, I wanted a tool that could show me the room.
Marginalia is that tool. You ask it a question — about grief, about boredom, about light at the edge of a frame — and it surfaces the passages, lines, and stills that are arguing with each other across centuries and media. Not citations. The room.
How it works
A small, hand-curated corpus of poems, philosophical fragments, and film criticism, embedded and stored in pgvector. A Claude agent does the routing — deciding when to retrieve, when to follow a thread, when to stop. The interface lets you pin a thread, branch it, and follow a line out into adjacent thinkers.
What's interesting isn't the retrieval — it's the agent's judgment about which adjacent thinker is actually adjacent. Auden and Kierkegaard share a vocabulary, but the line that connects them is two steps removed from either, in a passage neither of them wrote.
Decisions I made differently
Grounding over generation.
The agent never paraphrases primary sources. The model can summarize a connection, but the passages themselves are quoted verbatim. The work is in the curation, not the imitation.
Threads, not chats.
A chat interface is the wrong primitive for this kind of thinking. Marginalia is built around pinned threads — a notebook, not a conversation. Retrieval state persists across sessions, which is what lets the work compound.
A small, chosen corpus.
I rejected the temptation to ingest everything. The corpus is a few hundred sources I trust. Signal-to-noise improves dramatically when the noise is curated out, and the retrieval starts to feel like talking to someone who has read what you have.
What I’d do next
Visual citations — pulling the still from the film when the connection is to a film, the painting when the connection is to a painting. The interesting question is how to render the visual without flattening it back into another text.