Development status: the MVP is complete and runs end to end: assistant panel, Agent Gateway, reviewable
proposals, attribution and review-comment handling. The project is young: interfaces and configuration may
still change before the first tag. Progress is logged in PROGRESS.md.
What is Genie of the Lamp?
Genie of the Lamp ("Genie" for short) is Aldine with a native research-writing assistant. Collaborators keep writing and reviewing LaTeX in the browser exactly as before, with real-time multi-cursor editing, Git-native branches, sandboxed ~2 s recompiles and the PDF preview. Any authorized collaborator can also open an assistant panel and chat with an agent that understands the current project.
The assistant runs in a separate Agent Gateway service, not inside Aldine's core:
- The browser only talks to the gateway. Provider API keys never reach it.
- The gateway calls the model you configure: Anthropic (default Claude Haiku 5.5), any OpenAI-compatible endpoint, or a local model.
- It acts on the project through Aldine's own MCP server, using a short-lived credential scoped to that user and that project. Aldine enforces permissions server-side as it does for every other client.
Reading, searching, compiling and diagnosing happen automatically. Writing does not: every document change arrives as a structured patch you can Accept, Edit, or Reject. An accepted patch is merged into the live collaborative document, so co-authors see it immediately and nobody's typing is overwritten. It is then committed as You (via Paper Assistant), with the session, model, provider and base revision recorded in the commit, where it can be reviewed and reverted from the normal Git history.
flowchart LR
subgraph Browser["Genie in the browser"]
E[Editor · file tree · PDF · history]
P[Assistant panel]
end
P -- "SSE chat · same-origin cookie" --> G
subgraph G["Agent Gateway (new container)"]
S[Sessions & audit]
A[Provider adapters]
T[Tool loop · propose_patch]
end
A -- "API key stays here" --> M[(Anthropic / OpenAI-compatible / local LLM)]
T -- "MCP · user+project-scoped token" --> X
E <-- "Yjs collab" --> X
subgraph X["Aldine server (upstream)"]
MCP["/mcp tools"]
Git[(Per-project Git)]
end
X --> C[Sandboxed TeX Live compiler]
Why "Genie of the Lamp"?
Aldine, the editor underneath, is named after the Aldine Press of Aldus Manutius, the Venetian printer behind italic type and the pocket book. This fork puts a genie in Aldine's lamp, with one change to the story: it grants no wish until you have read the diff. The genie can read, search, compile and explain whenever you ask, but it writes nothing you haven't approved, and every wish it grants is recorded in Git.
Key features
Everything Aldine already does (unchanged, see the upstream README):