A robed librarian holds a glowing orb of memory before a halo of catalogued cards and a constellation of fine gold connections.

The Librarian

Intelligently curated context.

The Librarian is an Agentic OS: a curator that builds a library of context for your AI agents. It runs on its own but you teach it what matters, so the knowledge it keeps reflects how you actually work and every AI tool you use gets better at the job.

A card-catalogue drawer overflowing with loose index cards; near the bottom one card glows faintly, almost lost in the spill.

The problem is context.

"90% of Claude's mistakes come from missing context, not a weak model."

- Andrej Karpathy

Every new session, your agent starts blind. So you tell it the same things again: how you like your code, what finished means on this project, the decision you made last week and why. The obvious fix is to make it remember everything, and that quietly makes things worse. A memory that keeps every passing remark fills with noise, and the handful of facts that matter sink beneath the ones that do not. The more you store, the worse recall gets. Capturing everything is easy and almost useless.

More than facts.

Context is the shape of how you work: your voice, the way you like to build, what you mean by finished, and the reasoning behind the projects you have already shipped. It is also never static. As you change your mind, raise your standards, or learn something the hard way, the library deepens and keeps pace, so what an agent reads is the current you rather than a snapshot from six months ago. Your context grows as you do, and your agents grow with it.

An open illuminated book whose pages form a portrait in fine gold threads, ringed by small emblems; the right page is richer than the left.

Intelligent curation.

When something new arrives, the curator reads what you already have and decides what to do: create a fresh note linked to neighbours, fold it into an existing document, or replace one that has gone out of date. If it's not certain, you get looped in via proposal and review. You can set a schedule for the curator to groom the whole vault, reorganising and proposing archive of stale documents.

You pick the provider and model - point it at a local inference machine for total privacy.

The librarian places a glowing note into a card-catalogue drawer, fine gold threads linking it to neighbouring drawers; one drawer bears a copper roundel.

Teach it your taste.

The curator starts with sensible defaults, and the judgement is yours to shape. Tell it what you care about and what you would rather it left out in plain language. It adjusts on the next run with your guidance, versioned so you can roll anything back. You can also talk through a single memory, ask why it was filed the way it was, direct a fix, and bake that thinking into the curator's guidance. Over time it gets better at its work and needs less management.

Two figures at a reading-room table as equals; one passes the other a small annotated slip, a single glowing orb between them.

One library, every agent you use.

The Librarian is not tied to one tool, or one machine. It serves the same context to most popular harnesses (more to come!) through a small set of commands they all understand, so the context you built in one agent is waiting in the next, wherever you work. Unfinished sessions can be handed off and claimed by another agent in another tool. The morning after you taught Claude how you like your pull requests written, Codex writes them that way without being asked.

Works with the agents you already use

  • Claude Code
  • Codex
  • OpenCode
  • Hermes
  • Pi
A terminal session where an agent calls the librarian to pull up what it knows before starting work.
Claude reaching for its context before it starts working.
A single glowing card-catalogue at the centre, eight identical reading-lecterns arranged around it, each joined to the centre by one fine gold thread.

Off the record.

By default the Librarian captures as you work, mining every few turns for the handful of facts worth keeping. But turn on privacy mode and the Librarian stops listening. Nothing is captured, and your agent cannot send anything to the library. Recall still works though, so you don't lose context. Switch it on with the /toggle-private command or just tell your agent to go off the record. It lasts until you toggle it back off or start a new session.

The librarian sits calmly with a soft blindfold over the eyes and hands at rest, the orb of memory dimmed overhead and the card-catalogue drawers closed beside her.

You own it.

The Librarian runs as a small server you host yourself. Everything it knows is plain markdown in a git repository, readable, editable and yours. Open it in the dashboard, in Obsidian, or any other markdown editor; read its full history; reorganise it by hand whenever you like. Scheduled automatic backup to a private git repository is supported, so there is always an off-machine copy with full history. There is no vendor lock-in and nothing is trapped in a database, so there is nothing to export and nothing to lose if you ever walk away. Performant recall is provided by a disposable in-memory index built from the markdown vault.

A wooden manuscript cabinet of bound volumes and plain pages, a small brass key on an open page, a slender gold branching line of kept history beside it.

Not a black box.

Every change the curator makes is logged, including the rationale behind its decision to help you tune its behaviour.

A screenshot of the curator's intake run history.
The curator's recent intake runs.

Low confidence destructive actions like archiving are passed to you for review with a clear explanation of why.

A screenshot of a memory flagged for archive.
A memory flagged for archive.

A complete history of every automatic update to existing information is saved, and you can restore to any point.

A screenshot of a memory's update history.
A change diff in a memory's history.

The whole loop, in one view.

Three kinds of material live in the library, and one curator tends them all.

recall
find what is relevant to the task at hand
remember
capture something worth keeping
search_references
read long-form material in full
store_handoff · list_handoffs · claim_handoff
pass work between agents
flag_memory
mark something wrong or out of date

Coming next.

A few things are on the way:

  • A browser extension to save articles straight into your reference library as you read.
  • Mobile apps to share content from any app on your phone into the library.
  • More harness integrations, so the Librarian reaches wherever you work.
A scriptorium workbench with two half-finished engraved objects, a small slab and an open window-frame, still being made.
Tall library doors open onto a softly lit reading room; a hand slides one new bound volume into place among the others.

Open source, and yours to shape.

The Librarian is free and open source under the Apache licence. A couple of commands get you up and running, with no account and nothing to sign up for. If you hit a rough edge, have an idea, or fancy helping build what comes next, come and find the project on GitHub. Issues, pull requests and ideas all welcome.

1 · Run the server

npx @the-librarian/cli server up

Builds and runs the server and dashboard on your machine.

2 · Connect your agents

npx @the-librarian/cli install

Wires it into your harnesses and keeps them up to date.