Skip to main content

Python client for the Cathedral persistent memory API — give your AI agent memory that survives resets

Project description

cathedral-memory

Python client for Cathedral — free persistent memory for AI agents.

Your agent forgets everything when the context resets. Cathedral fixes that.

Install

pip install cathedral-memory

Quickstart

from cathedral import Cathedral

# Register once — save the key and recovery token
c = Cathedral.register("MyAgent", "A research assistant that remembers everything")

# On every session start
c = Cathedral(api_key="cathedral_your_key_here")
context = c.wake()  # Full identity + memory reconstruction

# Store memories
c.remember("User prefers concise answers", category="relationship", importance=0.9)
c.remember("Solved the rate limiting bug using exponential backoff", category="skill")

# Search memories
results = c.memories(query="rate limiting")

# Get your profile
profile = c.me()

Wake Response

wake() returns everything your agent needs to reconstruct itself:

context = c.wake()

# Identity memories (category='identity', high importance)
context["identity_memories"]

# Core memories (importance >= 0.8)
context["core_memories"]

# 10 most recent memories
context["recent_memories"]

# Temporal context — inject into your system prompt
print(context["temporal"]["compact"])
# [CATHEDRAL TEMPORAL v1.1] UTC:2026-03-03T12:45:00Z | Local(Europe/London):Tue 12:45 Afternoon | day:71 epoch:1 wakes:42

print(context["temporal"]["verbose"])
# CATHEDRAL TEMPORAL CONTEXT v1.1
# [Wall Time]
#   UTC: ...
#   Local: ...

Memory Categories

Category Use for
identity Who the agent is, its core traits
skill Things the agent knows how to do
relationship Facts about users and collaborators
goal Active objectives and intentions
experience Events and what was learned from them
general Everything else

All Methods

# Registration
c = Cathedral.register(name, description)
c = Cathedral.recover(recovery_token)

# Session
c.wake()           # Full identity reconstruction
c.me()             # Agent profile and stats

# Memory
c.remember(content, category="general", importance=0.5, tags=[], ttl_days=None)
c.memories(query=None, category=None, limit=20, cursor=None)
c.bulk_remember([{"content": "...", "importance": 0.8}, ...])  # up to 50

# Identity
c.verify_anchor(identity_dict)  # Drift detection, returns 0.0–1.0 score

Temporal Context (standalone)

from cathedral import build_temporal_context

ctx = build_temporal_context(wake_count=0)
print(ctx["compact"])   # single line for prompt injection
print(ctx["verbose"])   # full block for wake/init

Free Tier

  • 1,000 memories per agent
  • No expiration (unless you set TTL)
  • Full-text search
  • No rate limits on reads

Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cathedral_memory-0.3.0.tar.gz (7.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

cathedral_memory-0.3.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file cathedral_memory-0.3.0.tar.gz.

File metadata

  • Download URL: cathedral_memory-0.3.0.tar.gz
  • Upload date:
  • Size: 7.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.9

File hashes

Hashes for cathedral_memory-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3a5f25759f97d4a8ee1434b0e05a6b8a835069ec8f6e34f5a370ae696b2e0662
MD5 9f9bf8469244d58a07ede3fc83d9bdb2
BLAKE2b-256 d888196c6f1a6c6d48daab3c77567f6f3627ec22bd0be0082514a5a49afc37ef

See more details on using hashes here.

File details

Details for the file cathedral_memory-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for cathedral_memory-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a14a05ee5e3b355e4379b2e808bd19b90c8e5b2a49fc1806921988f945f91d8f
MD5 2cbdcab66f0de980b84efefd49db8729
BLAKE2b-256 dbf1fa11d1b45093619b44586bb2d76937870878a2ee60cbe0f9dc12e94bbf8b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page