Skip to main content

citadeldb-ms-agent-framework

Microsoft Agent Framework storage backed by Citadel. Encrypted at rest, embedded in your process, and deletes that destroy the key, not just the row.

pip install citadeldb-ms-agent-framework

Requires citadeldb>=3.0,<4 and agent-framework-core>=1.13,<2.

The package provides two storage interfaces:

Class Implements Use when
CitadelHistoryProvider HistoryProvider a session must recover its complete transcript
CitadelContextProvider ContextProvider an agent should recall relevant facts across sessions

The context provider performs semantic recall. This example uses local e5-large and needs the KodamaEmbed model files. Any other embedder works through the embedder protocol.

from agent_framework import Agent
import citadeldb
from citadeldb_ms_agent_framework import CitadelContextProvider, CitadelHistoryProvider

embedder = citadeldb.KodamaEmbedder("/path/to/e5-large", preset="e5-large")

agent = Agent(
    client=chat_client,  # any agent_framework chat client
    context_providers=[
        CitadelHistoryProvider("agent.cdl", key="your-passphrase", embedder=embedder),
        CitadelContextProvider(
            "agent.cdl", key="your-passphrase", scope="user-123", embedder=embedder
        ),
    ],
)

Both can share one encrypted file: a path already open on this thread, under the same passphrase, is shared. Construct them on the same thread.

Deletes destroy the key

history = CitadelHistoryProvider("agent.cdl", key="your-passphrase", embedder=embedder)
memory = CitadelContextProvider(
    "agent.cdl", key="your-passphrase", scope="user-123", embedder=embedder
)

await history.forget("session-42")  # returns the number erased
await memory.forget()  # this provider's whole scope

Clearing a conversation destroys each message's own key and deletes its row. Pre-erasure backups or snapshots containing keys, and exported plaintext, are outside that erasure.

History provider

Implements get_messages and save_messages. Set load_messages=False to store messages without loading history before a run:

CitadelHistoryProvider(
    "agent.cdl",
    key="your-passphrase",
    embedder=embedder,
    load_messages=False,
)  # stores, never loads

Messages round-trip through the framework's own serialization, so roles, author names, multi-part contents and additional_properties all survive.

Context provider

Uses Citadel's hybrid recall. embedder= is required.

memory = CitadelContextProvider(
    "agent.cdl", key="your-passphrase", scope="user-123", limit=5, embedder=embedder
)

Memories are scoped rather than session-bound, so a later conversation can recall an earlier one. scope is the boundary an erasure request applies to.

Custom embedders expose dim, metric, model_id, and embed_with_cancel(texts, cancel_token). Accept None as the token; otherwise poll cancel_token.check() between bounded batches. Asymmetric models may also provide embed_queries_with_cancel.

License

Apache-2.0

Metadata

Release files for citadeldb-ms-agent-framework 3.0.0

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

Source distribution (sdist)

Source distribution for citadeldb-ms-agent-framework 3.0.0
File Size Uploaded Provenance Actions
citadeldb_ms_agent_framework-3.0.0.tar.gz 11.2 kB With provenance Details for citadeldb_ms_agent_framework-3.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for citadeldb-ms-agent-framework 3.0.0
File Interpreter ABI Platform Actions
citadeldb_ms_agent_framework-3.0.0-py3-none-any.whl Python 3 none any Details for citadeldb_ms_agent_framework-3.0.0-py3-none-any.whl

Total release size: 19.5 kB

Release files / citadeldb_ms_agent_framework-3.0.0.tar.gz

Download URL citadeldb_ms_agent_framework-3.0.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
776ad3e5bc924813f3184efa6be00dc0de60e279af19bd9659eb5c84d2165453
BLAKE2b-256 checksum
How to use checksums
65ac750a32b42762a2eafb166a15e16b5b70227d0fa6a45f0d00147b124feaaf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Release files / citadeldb_ms_agent_framework-3.0.0-py3-none-any.whl

Download URL citadeldb_ms_agent_framework-3.0.0-py3-none-any.whl
Size 8.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b7e74e583395b6cbf8d08e01560062365eb595df846521232251c8d8d2507db
BLAKE2b-256 checksum
How to use checksums
2b014b395e848193ab4f43e227d724ea3641c36bf9dc4e7c6eadb6bc5e54fddb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 28, 2026.

Transparency log

Security for citadeldb-ms-agent-framework 3.0.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for citadeldb_ms_agent_framework-3.0.0.tar.gz

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 Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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