Skip to main content

Citadel Archive

Citadel

Self-hosted memory for engineering teams and the agents working alongside them.

State of the Vault Test License Python MCP

Your team already writes down everything worth knowing. It ends up scattered across commits, pull requests, Linear tickets, and coding sessions nobody can search a week later. New engineers ask questions that were answered in March. Coding agents start every task with no idea what your team already decided.

Citadel collects that material as it is produced and puts it behind one query interface, for people and for agents. It runs on your own infrastructure.

Citadel dashboard showing the knowledge graph

Status: in testing, not yet open

Citadel currently runs for two organisations, Masumi Network and Sokosumi Network, who are using it daily and finding the problems. It is not open for general use yet.

If you are interested, watch the repository and wait for the stable release. We would rather you adopt something that works than something that is still moving under you. We publish benchmark numbers as we go, including the parts that are not good yet, so you can judge readiness for yourself rather than taking our word for it.

A self-hosted path for individuals to try it is planned. It is not ready today.

Who it is being built for

Teams running coding agents get the most out of it. Claude Code, Cursor, and anything else speaking MCP query the same vault the engineers do, through a hosted endpoint. An agent that can look up why you dropped Postmark for Resend does not re-litigate it.

It also suits companies that cannot ship their context to a vendor. Apache-2.0, pip install, runs where you decide. One caveat worth stating plainly: document text is sent to an external model provider for enrichment and digests, so this is data you control the storage of, not data that never leaves the building.

And it is for anyone tired of filing things. Capture runs from git and editor hooks. Nobody tags anything.

How it works

Capture happens without you. A git pre-push hook and a Claude Code session hook snapshot work as it is produced, while GitHub activity, repository content, and Linear issues sync on a schedule.

You ask from wherever you already are: the CLI, the web interface, or MCP. Answers carry a link back to the commit, issue, or document behind them, and retrieved text is marked as untrusted context worth checking before you act on it.

Promotion is the deliberate part. Captured work lands in your own space, and reaching shared org memory takes an explicit step. That gate is what keeps the shared layer worth reading instead of turning it into everyone's scratch notes.

Quick start

npx skills add masumi-network/citadel --skill citadel
pipx install citadel-archive
citadel onboard      # token, hooks, MCP (project + Cursor/Codex/Claude/…), capture roots
citadel status       # connection, identity, local setup

No Python yet? curl -fsSL https://raw.githubusercontent.com/masumi-network/Citadel/main/install.sh | sh checks for 3.11+, asks before installing, then sets up pipx and the CLI.

Self-hosting the server:

uv sync --dev
cp .env.example .env
uv run uvicorn kb.server:app --reload --port 8000

Full walkthrough in docs/onboarding/teammate-rollout.md, deployment in docs/operations.md.

Connecting an agent

Agents need a URL and a token. citadel onboard writes project .mcp.json and, when those tools are detected, ~/.cursor/mcp.json, Codex, Claude user-scope, Gemini, and Windsurf:

{
  "mcpServers": {
    "citadel": {
      "type": "http",
      "url": "https://citadel.utxo.ag/mcp/",
      "headers": { "Authorization": "Bearer ${CITADEL_MCP_ACCESS_TOKEN}" }
    }
  }
}

Use one seat per human. Give each agent process a distinct seat-bound token. After the human signs in with a seat token, the Access page can mint a reader token for search-only work or a writer token for explicit ingest. Do not share one token across agent processes.

For headless setup, pass the token through the environment instead of argv:

export CITADEL_MCP_ACCESS_TOKEN=ctdl_...
citadel onboard --non-interactive --json   # also wires Cursor/Codex/Claude when detected
citadel status --json --check-search

Confirm that status reports the expected seat_slug and default_dataset: seat:<slug> before the agent starts work.

Twenty-two tools cover search, document fetch, ingest, contribution, and the admin surface. Core CLI commands speak --json. Setup per client and the tool reference are in docs/mcp/README.md.

Measured performance

We publish the numbers, including the ones that look bad.

Search median on 2026-08-17 was 25 s (citadel-archive 0.5.1 CLI, warm, golden q01, n=20, node https://citadel.utxo.ag). The 2026-07-31 client round-trip of 269 ms is no longer what production does. Self-host cost is about $23/mo from Railway 24-hour averages on 2026-08-17 (Citadel-Archive and Qdrant). Quote as about $23, not to the cent.

A 2026-08-03 69-question golden harness scored answer_recall@5 at 0.8974 over the 39 questions carrying validated answer spans.

Two limits belong next to that number. Roughly a third of stored documents are not reachable by search at all (#228), and the documents that are indexed were embedded only at the head, so text past roughly the first 1,500 characters is also unreachable (#227). Ranking also correlates poorly with query relevance. All three are open work, and no recall figure currently describes the whole corpus.

Full table, definitions, and how to reproduce: docs/performance.md.

Documentation

Concepts and glossary Seats, nodes, central, promotion, the learning process
Architecture Subsystems, storage, how the pieces fit
MCP and agents Client setup, tool reference, agent policy
Performance Benchmark results and the harness
Operations Deployment, environment, integrations
Decisions Architecture decision records
Domain language Terms this codebase uses precisely

Contributing

Issues and pull requests welcome. Commits need a DCO sign-off (git commit -s, no CLA), PR titles follow Conventional Commits, and the CI gate check must pass. Python 3.11+.

Start with good first issue or read CONTRIBUTING.md.

Found a security issue? Do not open a public issue. Use private vulnerability reporting. See SECURITY.md.

License

Apache-2.0. See LICENSE.

Metadata

Release files for citadel-archive 0.5.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for citadel-archive 0.5.2
File Size Uploaded
citadel_archive-0.5.2.tar.gz 5.7 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for citadel-archive 0.5.2
File Interpreter ABI Platform
citadel_archive-0.5.2-py3-none-any.whl Python 3 none any Details

Total release size: 9.3 MB

Release files / citadel_archive-0.5.2.tar.gz

Download URL citadel_archive-0.5.2.tar.gz
Size 5.7 MB
Tags Source
SHA-256 checksum
How to use checksums
5c59ef640903dfd2047b44bb4e3aae97bcb1d89ca203ae65299ba163911048cd
BLAKE2b-256 checksum
How to use checksums
2e67cb33abb85d36e3c14d0fec609517c0bc5c0e3fe6e91d714a9c4cd8b44cb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release files / citadel_archive-0.5.2-py3-none-any.whl

Download URL citadel_archive-0.5.2-py3-none-any.whl
Size 3.6 MB
Tags Python 3
SHA-256 checksum
How to use checksums
32661a3bea4d738a6510b4d00d79302ee0c1c172405c573aa763155e0d14efc3
BLAKE2b-256 checksum
How to use checksums
e0667e4f6735cd2c1b920701ff38c3f99b413b5c3d2b4983c60764ad7d4e9869
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 27, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files

0.5.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page