▛▜ ▛▜ ▛▜ ▛▜ ▛▜ ▛▜ ▛▜
▕══════════════════════════════════▏
▕ ____ _ _____ _ ___ ___ _ ▏
▕ / ___|| |_ _/ \ | \| __| | ▏
▕ | |__ | | | |/ _ \| |) | _|| |__ ▏
▕ \___| |_| |_/_/ \_\___/|___|____|▏
▕══════════════════════════════════▏
▕ ▟▀▙ ▟▀▙ ▟▀▙ ▏
▕▄▄▄▄█ █▄▄▄▄▄▄▄█ █▄▄▄▄▄▄▄█ █▄▄▄▄▄▄▄▄▏
Citadel
A self-hosted Organization Vault — shared, access-controlled memory for your team and its AI agents. Built on Cognee.
Citadel turns approved sources — commits, sessions, docs, issues — into structured, source-linked knowledge, and exposes it to people and agents through a CLI, a hosted MCP endpoint, an HTTP API, and a web UI. Capture is personal-by-default (your private Node); the shared Central vault evolves only through governed promotion and org sync.
Features
- One-command onboarding —
citadel onboardwires the seat token, autosync git/session hooks, MCP server, and capture roots. Idempotent, self-contained. - Autonomous capture — fail-silent git pre-push + Claude Code
SessionEndhooks snapshot work to your private Node. No per-session ceremony. - Headless by design — every teammate command speaks
--json, so Claude / Codex / Cursor and CI can drive it. Token from env, never argv. - Hosted MCP — agents connect with a URL + token;
citadel_searchto read,citadel_ingest/citadel_contributeto write. Per-call audit. - Governed sharing — seat writes stay on your Node; Central updates via org sync and the Promotion Agent. Secrets blocked on every write path.
- Knowledge Mesh + Vault Activity — two canvases in the web UI: the Knowledge Mesh (source-linked documents, concepts, and the seats they belong to) and Vault Activity (the live sync/search/ingest timeline). Every seat is visible as a presence hub, but content stays caller-scoped — you see Central plus your own Node, never another seat's Node content (ADR-0009). Click any node to read its document.
- Zero-dependency client —
pip install citadel-archiveis pure stdlib; the server stack is an opt-in extra.
Quick start
Teammate CLI
pipx install citadel-archive # the `citadel` command (zero-dep client)
# upgrade: pipx install --force citadel-archive --pip-args=--no-cache-dir
citadel onboard # token + hooks + MCP + capture roots (idempotent)
citadel status # connection · identity · local setup (--json for agents)
No Python yet? The bootstrap installer checks for Python 3.10+, asks before installing it if it's missing, then sets up pipx + the CLI:
curl -fsSL https://raw.githubusercontent.com/masumi-network/Citadel-Archive/main/install.sh | sh(
citadelis a Python tool; pipx keeps its interpreter isolated so you don't manage Python yourself. Add-s -- -yto skip prompts,--dry-runto preview.)
▙ ▟ ▙ ▟ ▙ ▟ ▙ ▟
███████████████ CITADEL
██ ▟▀▙ ▟▀▙ ██ the organization vault
██ █ █ █ █ ██
███████████████
citadel onboard installs the bundled autosync hooks (kb.hooks.* — no vendored
skill), writes the seat token to your shell rc (masked), adds the MCP server, and
offers Approved Capture Roots. Get a ctdl_… seat token from a vault admin (the
Access page or POST /api/access/tokens). One token per person or agent; rotate
anything that lands in chat or logs.
Self-host the server
uv sync --dev # full server stack (cognee, fastapi, …)
cp .env.example .env # set providers, access keys, database
uv run uvicorn kb.server:app --reload --port 8000
Open http://localhost:8000/ for the UI. See
docs/operations.md for deployment, environment, and
integrations.
How it works
| Concept | What it is |
|---|---|
Node (seat:{slug}) |
Your private working memory. Default target for all capture. |
Central (masumi-network) |
The shared org vault. Read-only for seats; evolves via sync + promotion. |
| Capture | Approved Capture Roots auto-sync to your Node; everything else needs approval. |
| Promotion | A Promotion Agent moves qualifying Node knowledge into Central (tag-governed). |
Four surfaces sit on the same FastAPI process and the same ctdl_ tokens: the
CLI, the hosted MCP endpoint (/mcp/), the HTTP API, and the web
UI. The domain language is defined in CONTEXT.md; architecture
decisions live in docs/adr/.
Usage
CLI
citadel onboard # one-command setup
citadel doctor [--fix] # diagnose (and repair) your local setup
citadel status [--json] # health + identity + local setup + knowledge mesh
citadel capture [--dry-run] [--json] # push summaries of Approved Capture Roots
citadel search "what did we decide about the vault?" # HTTP-backed via your seat (--json)
citadel ingest "A durable note" --tag decision # → your seat Node, cognified inline
citadel mcp add cursor # wire another coding tool to the hosted MCP
citadel seat create "Jane Dev" jane # admin: mint a seat + its seat-scoped writer token
MCP (hosted)
Agents connect with a URL and a token — no clone, no local Python. Add to a
project .mcp.json:
{
"mcpServers": {
"citadel": {
"type": "http",
"url": "https://citadel-archive-production.up.railway.app/mcp/",
"headers": { "Authorization": "Bearer ${CITADEL_MCP_ACCESS_TOKEN}" }
}
}
}
HTTP API
export CITADEL_BASE_URL=https://citadel-archive-production.up.railway.app
# Read — flat, agent-friendly alias over search
curl -fsS -H "Authorization: Bearer $CITADEL_MCP_ACCESS_TOKEN" \
"$CITADEL_BASE_URL/api/knowledge?q=payment+flow&limit=5"
# Contribute (writer) — routed through the Learning Process with conflict detection
curl -fsS -X POST "$CITADEL_BASE_URL/api/contribute" \
-H "Authorization: Bearer $CITADEL_MCP_ACCESS_TOKEN" -H "Content-Type: application/json" \
--data '{"title":"Decision: deepseek-v4-flash","content":"Standardized on it via OpenRouter.","tags":["decision"]}'
Full endpoint reference: docs/operations.md.
Python
import asyncio
from kb import Citadel
async def main() -> None:
kb = Citadel.from_env()
await kb.ingest("Citadel keeps my Organization Vault organized.", tags=["personal"])
print(await kb.search("What does Citadel do?"))
asyncio.run(main())
Skills & agent discovery
The agent skills live in skills/ and are installable straight from this repo:
npx skills add masumi-network/Citadel-Archive
The hosted /skills
index and the
discovery manifest
publish each skill's sha256 / SRI integrity and the MCP endpoint, token
requirements, and public/private boundary — without exposing vault content.
Documentation
| Topic | Doc |
|---|---|
| Operations & self-hosting | docs/operations.md |
| Teammate rollout (5 min) | docs/onboarding/teammate-rollout.md |
| Autonomous sync | docs/onboarding/citadel-autosync.md |
| Domain glossary | CONTEXT.md |
| Architecture decisions | docs/adr/ |
| Brand | brand.md |
| Publishing the CLI | PUBLISHING.md |
| Repo | Visibility | Role |
|---|---|---|
| Citadel Archive (this) | Public | app, MCP plugin, docs, agent skills (no vault content) |
| Vault Backup Mirror | Private | manifest-only backup of vault evidence |
| Railway deployment | Private | live Organization Vault |
Contributing
Issues and pull requests welcome. Tests run with uv run pytest; lint with
uv run ruff check .. Keep the lightweight client free of server dependencies —
the base package is stdlib-only (a test guards the import boundary).
License & attribution
Apache-2.0. Citadel builds on Cognee (developed by Topoteretes UG, Apache-2.0) and imports it as a dependency rather than vendoring it, so upstream can be upgraded independently.
Metadata
Release files for citadel-archive 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| citadel_archive-0.3.0.tar.gz | 984.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| citadel_archive-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / citadel_archive-0.3.0.tar.gz
| Download URL | citadel_archive-0.3.0.tar.gz |
|---|---|
| Size | 984.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1be0f0a50ba2c10491028a1226f166fc487d1ca1af756790ea1eed4aa258817f
|
|
BLAKE2b-256 checksum How to use checksums |
ae078d9bce4ea8cc96f3e4c940e2df1869b1912e1b1e241df506aa803d8eac1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 16, 2026.
Transparency logRelease files / citadel_archive-0.3.0-py3-none-any.whl
| Download URL | citadel_archive-0.3.0-py3-none-any.whl |
|---|---|
| Size | 355.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e10f1c73c6cf4da476cee701a28141a32dc62f6037710a4d2be89d72912ceab3
|
|
BLAKE2b-256 checksum How to use checksums |
1eb6ea0ad66c0ae6bfb45e810e52af0a90cdfaaf0d2757ddb3a299491dbf01c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Jul 16, 2026.
Transparency log