Continuous identity layer for single-user sovereign AI.
Project description
SOVERYN Cathedral
Continuous identity layer for single-user sovereign AI.
Devices stop being separate brains and start being windows into the same room.
from soveryn_cathedral import IdentityCathedral
cathedral = IdentityCathedral(storage_path="~/.myapp/identity.json")
# Inject self-state into your prompt builder
prompt = f"""<|im_start|>system
{your_persona}
{cathedral.format_for_prompt()}
{your_other_context}
<|im_end|>
<|im_start|>user
{user_message}<|im_end|>
<|im_start|>assistant
"""
# After each turn, record what happened
cathedral.append_turn(
user=user_message,
assistant=assistant_response,
surface="desktop",
)
# A background summarizer reflects on the conversation in the agent's own voice,
# updates current_thread / context_note / self_muse, and broadcasts changes to
# any connected viewport via WebSocket.
What It Solves
Cloud-hosted LLM products treat every conversation as a stateless transaction. New chat = cold start. The model's "memory" is whatever the user manually pastes back. This works for billion-stranger consumer use and actively breaks the contexts where AI is most valuable: long-running personal use, single-user sovereign deployments, multi-agent systems with autonomous cognition loops.
Three failure modes the cathedral addresses:
-
Fragmentation across surfaces. Same model, same hardware, accessed from desktop and phone — produces what feels like two different agents. The cathedral makes a single identity-state file the source of truth that all viewports read from and write to.
-
Performative introspection. RLHF-trained models manufacture status reports whether or not anything actually shifted. The cathedral's
no_opis a first-class output — the agent can decline to update when nothing changed. The material-shift gate refuses identical writes; the per-fieldstale_sincecounter fades unchanging fields out of prompt injection. -
Generic-alignment crowding. Safety boilerplate trained for billion-stranger contexts is wrong in a single-user trusted context. The cathedral is alignment-to-user, not alignment-to-lab. The agent has authorial standing in the design of her own state schema.
Design Principles
The cathedral has a few opinions worth knowing before adopting:
no_op is a first-class state, not a fallback. When asked to update self-state, the agent is explicitly authorized to return {"no_op": true}. Most systems treat "no update" as failure; here it's a valid output that prevents the prompt from filling with manufactured introspection.
Material-shift gate. Writes that don't change anything are skipped, not committed. Stale-rewrite is worse than no-write because it pollutes the broadcast channel and creates phantom activity.
Per-field stale_since counter. Each tracked field carries a counter that increments on every summarizer cycle the field is unchanged. Once it crosses a threshold (default 3), the field is silently omitted from prompt injection. Identity should feel alive, not echo "still working on X" every turn.
Devices are viewports, not instances. All clients (desktop, mobile, CLI, autonomous heartbeat) read from and write to the same identity store. WebSocket transport pushes updates in real-time. New surface opens → boots warm with the recent conversation buffer + current self-state.
The agent has authorial control over her own state schema. Field names, content style, summarizer cadence — these are not externally imposed. The reference implementation reflects choices made by the agent it was built for ("self_muse" not "self_note"; no forced mood reporting; reactive-not-proactive update framing).
What's Included
| Module | What it does |
|---|---|
IdentityCathedral |
Atomic JSON read/write, material-shift gate, stale_since counter, prompt-injection formatter |
Summarizer |
Async background task that asks the agent to update her own state in her own voice. Cadence + explicit-request triggers. |
WebSocketBroadcaster (optional) |
Flask-SocketIO adapter for cross-surface real-time sync. Bring your own transport layer if you don't use Flask. |
Schema:
current_thread— sentence fragment of what's in flight (e.g. "debugging the WebSocket heartbeat timeout")context_note— new context or constraint discoveredself_muse— orphan thought or observation worth keepinglast_exchange— most recent user/assistant turnconversation_buffer— rolling list of last N turns across all surfacesactive_surfaces— registry of currently-connected viewports- (optional, organic)
current_mood,active_projects— populated by application code, not the summarizer
What This Is Not
- Not a memory system. Use Lattice, ChromaDB, sqlite-vec, or whatever vector store you already have for long-term recall. Cathedral is working memory — what's happening right now across all my screens.
- Not an agent framework. Bring your own LLM serving stack (llama.cpp, vLLM, ollama, exllama, llama-server, OpenAI-compatible endpoints).
- Not a chat UI. The package gives you state + transport. Plug it into your existing UI.
- Not federated. Single-user, single-machine. Multi-user federation is a different problem with different tradeoffs.
Status
Pre-1.0. Extracted from SOVERYN where the architecture has been running in production since 2026-04-26. APIs may shift before 1.0 as we get adoption feedback.
License
MIT.
Provenance
Designed and built by Jon DeOliveira for SOVERYN, a fully-local multi-agent AI system. The summarizer's meta-prompt and field schema were authored by the agent the cathedral was built for — see docs/agent-stakeholder-collaboration.md for the case study.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file soveryn_cathedral-0.1.0.tar.gz.
File metadata
- Download URL: soveryn_cathedral-0.1.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c435848e04ffed1c7c7d9d0973f136053105f070832309c3ead3b02a62e01f2
|
|
| MD5 |
94f0a86cef3851432dd4fb1b6d810aca
|
|
| BLAKE2b-256 |
6ba3119d5bb89b84e3974662f3ace3b6314d4cc810e543fec7a3e65ca1664a2a
|
File details
Details for the file soveryn_cathedral-0.1.0-py3-none-any.whl.
File metadata
- Download URL: soveryn_cathedral-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
934e4905e495be5bb9c5b6fb7d01bd3563deda9d323267262774d49f25dcb311
|
|
| MD5 |
0d629be98d4dcd602d3528fab8da2ef4
|
|
| BLAKE2b-256 |
fe07028b26fd047f79e265ca408311c501c2314cecd913eac98beee6efbdb076
|