Capture, scope, and retrieval
Each seat has a private Node. Central holds shared organization knowledge. Shared Session Traces use a separate dataset and require an explicit share action.
- 1Capturehooks, no filing
- 2Your Nodeseat scoped
- 3Promotionscan · review · approve
- 4Centralshared
- 5ReadMCP, CLI, web
Clients
AI agents / IDEs MCP
Claude Code, Cursor, Codex, or an agent you wrote. The client speaks hosted MCP with a seat-bound bearer token. It gets the same tools and the same read scope as the seat that minted the token: your Node plus Central, never another seat. A search, a share-session, or a mesh read all start here, then enter Hosted MCP.
citadel CLI search · onboard · promote
The terminal route. You onboard a seat token, search, ingest, and promote from the command line. citadel capture summarises an Approved Capture Root (git metadata and README, not raw files) and POSTs it to your Node. Same token, same scope as MCP. Next hop is HTTPS REST.
Web dashboard signed in
The signed-in workspace: search, the knowledge graph, connected sources, and the promotion queue. Public pages such as /info hydrate aggregates from /api/state and never see vault content. Signed-in calls go through HTTPS REST with the seat token.
Capture hooks SessionEnd · git pre-push
A git pre-push hook and a SessionEnd hook write into your Node while you work. They fail silently, so a vault problem never blocks a push or a session close. Both refuse a non-HTTPS Node URL (loopback is the exception), refuse redirects so the bearer token is not resent, and omit the dataset field so the write lands on your Node. Next hop is HTTPS.
FastAPI
Hosted MCP /mcp/
Streamable HTTP at /mcp/. The same tools the CLI speaks, behind a bearer token, so an agent never gets a wider read than the seat that minted it. Search, mesh, share-session, and promotion tools mount here and call the FastAPI routes in-process. Next hop is the matching FastAPI route, with the seat token already attached.
HTTPS no plaintext tokens
Anything that carries a seat token refuses plaintext. Capture hooks, citadel capture, and the promotion client require HTTPS except loopback or a Railway private service, and they do not follow redirects. The hosted Node is served on HTTPS at the edge. This is the constraint on the wire, not a separate process.
REST + public pages /ingest · /search · /api/*
HTTP ingest and search, plus the rest of /api/*. Health endpoints and /api/state stay unauthenticated. Everything that reads memory needs a seat token. CLI, web, and hooks enter here. Authenticated routes go to search, ingest, mesh, share-session, or promotion. /api/state is public and skips the seat gate.
Seat-bound token reader · writer · admin
Tokens are minted per seat (ctdl_ prefix) and SHA-256 hashed at rest. A reader can search. A writer can ingest, volunteer a share-session, and promote. Admin is operations. The token is the seat: search is scoped to that Node plus Central, and another seat's content returns 404 rather than 403, so there is no existence oracle.
search /search · citadel_search
One query reads your Node and Central together and tells you which one answered. Seat presence is universal; content is caller-scoped. Another seat's content is never in the result, and drilling into it returns 404 rather than 403. The recall path hits Qdrant for embeddings, Ladybug for graph expansion, and SQLite for rows, then applies the visibility filter. Agents reach this through Hosted MCP. CLI and web reach it through REST.
ingest /ingest · citadel_ingest
Seat-scoped writes land on the owning Node. Untagged writes to Central are rejected. Every write path (HTTP, MCP, hooks, capture) runs the seat write-policy guard and a secret scan. Accepted bytes go to the learning process, which commits them to the lifecycle ledger. This is the Capture step on the PATH: hooks and citadel capture enter here.
mesh /api/mesh · citadel_get_mesh
The graph API and the dashboard mesh read the same stores the search path uses. Each dataset has its own Ladybug graph; an org-wide read merges those stores. Seat presence is universal; content is caller-scoped. Next hop is the memory engine, which talks to Ladybug and Qdrant.
share-session /api/share-session
A volunteered Shared Session Trace. The MCP tool citadel_share_session posts here after explicit user approval. Writer seat only. The payload is secret-scanned, then dual-written: light into your Node, shared into the session-traces dataset. Traces stay reference-only. They do not promote to Central and they do not feed the improve loop. Next hop is the learning process.
/api/state public · no secrets
Public snapshot for the /info page. Safe aggregates only: no vault content, no per-seat data, no tokens, no graph dumps. A sync hiccup degrades to empty, never a 500. Unauthenticated on purpose. The signed-in dashboard does not use this for memory reads.
Core
Learning process filter · chunk · embed
Accepted content is filtered, chunked, embedded, and projected. A document counts as searchable in a backend only when that backend's receipt says so. Ingest, share-session, and the evolve pass all enter here, then the lifecycle ledger records the acceptance. The memory engine runs the embed and graph work. This is not a separate service: it runs inside the FastAPI process.
Promotion scan · review · approve
The only seat-to-Central path. A candidate is secret-scanned and reviewed, then a person approves it from the dashboard, MCP, or the CLI. The evolve pass can enqueue candidates; it does not copy your Node on its own. Promotion is opt-in on the server. Approved bytes dual-write into Central. This is the Promotion step on the PATH.
Evolve scheduler evolve pass
A scheduled pass inside the web service, off by default, interval set by the operator. Stages run in order: GitHub sync, repo content, self-improve, promotion, Linear sync, then a verified cognify on the same process. This is not a cron phrase on the diagram: the default lives in config and operators change it. Outputs land in Central (org sources) or your Node (seat-scoped Linear mirrors).
Memory engine memory engine
Citadel handles embeddings and graph operations through this engine. Storage, access, sync, and the UI stay Citadel's. add is the fast write (no graph). cognify projects into Qdrant and Ladybug. Search and mesh both read through this client. The lifecycle ledger is what Citadel believes; the engine is how a backend is filled.
Access store seats · tokens · audit
Seats, hashed tokens, roles, capture policy, and the promotion queue live in a JSON store outside the memory engine, so a graph rebuild cannot rewrite who is allowed to read. The seat-bound token at the edge is minted and checked against this store.
Storage
Your Node personal by default
Your own memory, one dataset per seat. Capture hooks, citadel capture, ingest, and the Node copy of a share-session land here first. No other seat can read it. Linear issues assigned to you can mirror here. Promotion is the only way a note leaves this dataset for Central. Physically the bytes live in SQLite, Qdrant, and Ladybug, keyed by this dataset.
Central org, curated
The organization's shared memory. It only ever holds what was promoted into it, plus what the evolve pass ingested from GitHub, repo content, and org-visible Linear. That is what keeps it small enough to trust. MCP tokens stay read-only on Central. Physically the same three stores, different dataset.
Lifecycle ledger durable receipts
Ingest is an acceptance: source bytes, the revision head, projection jobs, and per-backend receipts commit in one SQLite transaction. A document is searchable in a backend only when that backend's receipt says so. Relational, vector, and graph are the three required backends (SQLite · Qdrant · Ladybug). Recovery replays failed jobs from this ledger, not from the internal engine.
SQLite relational · receipts
The live relational store at head (DB_PROVIDER=sqlite in kb/lite_runtime.py). Rows, dataset membership, and the lifecycle ledger live here. Not Postgres. The three live stores together are SQLite · Qdrant · Ladybug. Search uses these rows after the vector and graph recall, under the same seat scope.
Qdrant BAAI/bge-small-en-v1.5
The live vector store: a separate Qdrant service (VECTOR_DB_PROVIDER=qdrant). Embeddings come from BAAI/bge-small-en-v1.5, baked into the image, so nothing is downloaded at boot. citadel_search starts here, then expands through Ladybug and filters through SQLite.
Ladybug knowledge graph
The live graph store (GRAPH_DATABASE_PROVIDER=ladybug). One Ladybug store per dataset; an org-wide mesh read merges the per-dataset stores. Mesh and graph expansion on search read here. Not Kuzu, not pgvector.
Sync sources
GitHub org evolve pass
The organization's repositories sync as one stage of the evolve pass. Commits, pull requests, and issues land as org knowledge in Central, not as yours. This is a scheduled pull from the web service, not a GitHub App and not a webhook (the webhook flag is off by default).
Repo content evolve pass
Readmes, architecture decision records, and docs from org repositories are ingested as content, not just as filenames. Same evolve pass as GitHub metadata, landing in Central.
Linear seat mirror · Central
Linear issues assigned to you mirror into your Node. Org-visible issues go to Central during the evolve pass. Your own work stays yours; the org sees what was already shared.
Obsidian push · pull
A linked Obsidian vault mirrors into your Node. Push and pull are both implemented, so markdown notes you already keep are searchable alongside capture. Vaults are seat-owned: another seat addressing your vault by id gets 404, not 403.
You and your agents read via MCP, CLI or web: your Node plus Central, never another seat's.
One private Node per seat
Seat-scoped capture writes to that seat's Node. A normal seat read can include its own Node and Central, subject to the caller's token scope.
Central is shared
Central holds organization knowledge. Org sync and governed promotion update it. Seat writes do not directly target Central.
Traces are volunteered
Shared Session Traces live outside both Node and Central. A person shares one through an in-session MCP action.
Search results carry a dataset and source locator when the stored record provides them. Admin and service identities can have broader access than a seat token.
Follow one part at a time
These pages describe memory boundaries, capture, promotion, and self-hosting. Each links to the decisions and setup notes behind the summary.
Memory and sharing
Compare a private Node, Central, and a Shared Session Trace. See how seat and admin scopes differ.
Read memory modelCapture and promotion
Follow git and session hooks into a Node, then read how governed promotion works as a separate path.
Read capture flowSelf-hosting
Clone the source, inspect the CLI, and follow the deployment and data-scope docs.
Read setup steps