Skip to main content

citadeldb-langgraph

A LangGraph BaseStore backed by Citadel. Encrypted at rest, embedded in your process, and deletes that destroy the key rather than the row.

pip install citadeldb-langgraph
from citadeldb_langgraph import CitadelStore

store = CitadelStore("memory.cdl", key="your-passphrase")

store.put(("users", "alice"), "profile", {"city": "Berlin", "pet": "Mochi"})
print(store.get(("users", "alice"), "profile").value)
# {'city': 'Berlin', 'pet': 'Mochi'}

Pass it to a graph the same way as any other store:

graph = builder.compile(store=store)

Search is semantic

search runs Citadel's hybrid recall (vector + keyword + recency), not a LIKE. The query below shares no words with the document it finds:

store.put(("notes",), "n1", {"text": "the deployment failed because the disk was full"})
store.put(("notes",), "n2", {"text": "lunch plans for friday"})

store.search(("notes",), query="why did the release break?", limit=1)
# [SearchItem(value={'text': 'the deployment failed because the disk was full'}, ...)]

Deletes destroy the key

Every value is sealed under its own key. Deleting destroys that key, so the bytes on disk stay unreadable instead of being marked deleted and living on in backups.

store.delete(("users", "alice"), "profile")

forget_namespace does the same for a whole subtree, which is what a data-deletion request usually needs:

store.forget_namespace(("users", "alice"))   # returns the number of values erased

TTL

store.put(("session",), "token", {"v": 1}, ttl=60.0)     # minutes
store.get(("session",), "token", refresh_ttl=True)       # extends the lifetime

A refresh preserves both created_at and updated_at, so reading never looks like a write.

Notes

Citadel is embedded and takes an exclusive lock on the file, so build one store per database and share it. Separate concerns with namespaces rather than with a second store.

MockEmbedder is the default and needs no download, which is enough to build and test a graph. For production recall quality pass a real embedder:

import citadeldb
store = CitadelStore(
    "memory.cdl",
    key="your-passphrase",
    embedder=citadeldb.CandleEmbedder("/path/to/e5-large", preset="e5_large"),
)

License

Apache-2.0

Download files

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

Source Distribution

citadeldb_langgraph-1.15.0.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

citadeldb_langgraph-1.15.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file citadeldb_langgraph-1.15.0.tar.gz.

File metadata

  • Download URL: citadeldb_langgraph-1.15.0.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for citadeldb_langgraph-1.15.0.tar.gz
Algorithm Hash digest
SHA256 33c38e75c65d1a78f37e7f7de7cf234511d3e07d3899ac1d1513b2d3b0bbf4c5
MD5 6d0a5766a477dd599bdcb6b468a680ea
BLAKE2b-256 ec0490b9268c1650d0036b853d2a8213b692cde4f908dfd1f467dfb421b00a81

See more details on using hashes here.

Provenance

The following attestation bundles were made for citadeldb_langgraph-1.15.0.tar.gz:

Publisher: release-langgraph.yml on yp3y5akh0v/citadel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file citadeldb_langgraph-1.15.0-py3-none-any.whl.

File metadata

File hashes

Hashes for citadeldb_langgraph-1.15.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1d8127d4d250a77e306af455a5125bfc28b785cce2eac9ac4a1820e3ccb6ebc5
MD5 df548048bb7c1879b1f44d9432a8d56d
BLAKE2b-256 315bbb22b2c0b6c08d5235aad4c34298776ac8f10cef8e67f02ecf4414456365

See more details on using hashes here.

Provenance

The following attestation bundles were made for citadeldb_langgraph-1.15.0-py3-none-any.whl:

Publisher: release-langgraph.yml on yp3y5akh0v/citadel

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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