The Librarian


Project site → — what The Librarian is, how it works, and why you'd want it.
Video tutorials → — short demonstrations of The Librarian in use.
Documentation → — installation, guides, and reference.
The Librarian is a living, markdown-native knowledge graph for AI agents — with
a resident curator that tends it. It is a markdown+git vault of three note
types — memories, handoffs, and references — linked into a graph by
[[wikilinks]]; a resident "librarian" curates the collection as it grows,
filing each new memory where it belongs, linking it to its neighbours, and
organising the whole for retrieval, not just storage. It's all plain files you
can read, edit, and reorganise yourself (in the dashboard or in Obsidian); git
gives it history; nothing is locked in a database.
Practically, that makes it a portable memory + handoff layer for AI agents:
served to any harness over MCP as 8 verbs, taught to agents by one ≤2KB
primer, with an explicit cross-harness handoff surface so work started
in one harness (Claude Code, Codex, Hermes, OpenCode, Pi, Google Antigravity)
can be packaged into a single document and picked up cleanly in another.
It runs as a small self-hosted server, reachable locally or over the network.
Self-host in one command
Anonymous usage stats are on by default. Once a week a server sends a few anonymous facts (a random install id, the version, OS, how it runs, which harness families are in use, a rough memory count and three feature switches), never anything from your memories. Nothing goes until a day after the dashboard has told you about it. Turn it off in Settings → Telemetry, or with DO_NOT_TRACK=1 or LIBRARIAN_TELEMETRY=off. Details:
Usage stats.
The librarian CLI's server command group stands up the server for you — it
resolves the latest stable release, pulls and verifies that exact published image,
runs it by immutable image digest, surfaces the master key once, and hands you the
MCP URL + agent token to paste into clients. Stable installs need Docker, but not
Git or a source checkout. Run it with npx — no install needed:
npx @the-librarian/cli server up
(Or npm i -g @the-librarian/cli once and call librarian server up directly,
if you'll run it often.)
Want the data at a path you choose — to back it up, put it on a specific disk, or
move it between hosts? Add --data-dir; it bind-mounts a host directory at /data
and runs the container as its owner, so the vault stays yours to read and write:
npx @the-librarian/cli server up --data-dir /srv/librarian
server up/update/down/status/logs, Linux boot persistence
(enable-boot), and host-side admin (server admin backup|restore|auth|rebuild)
are all covered in the
self-host guide in
the docs site. Stable updates pull and validate the replacement before stopping
the current server; a failed replacement restores the previous executable and
container configuration. Pass --ref main (or another development ref) to keep
the source checkout/build path; that path additionally requires Git.
Use native Docker, not the snap. librarian server is unsupported on
snap-packaged Docker (common on Ubuntu / LXC) — its confinement breaks image and
container inspection and hides container health. Install Docker CE. See the
self-host guide.
Prefer to operate Docker yourself? The same all-in-one server and dashboard is
published at ghcr.io/code-ministry-ltd/the-librarian. Pull :latest for a
quick first run, or pin a :vX.Y.Z release for reproducible upgrades and
rollbacks. An image-only Compose file and protected env-file template are in
docker/; see Manual deployment
for the two-command lifecycle.
Install on any harness