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

Two providers for two jobs, matching how the framework's own Redis integration is split:

Class Implements Use when
CitadelHistoryProvider HistoryProvider a session must recover its complete transcript
CitadelContextProvider ContextProvider an agent should recall relevant facts across sessions
from agent_framework import Agent
import citadeldb
from citadeldb_ms_agent_framework import CitadelContextProvider, CitadelHistoryProvider

embedder = citadeldb.MockEmbedder(dim=64)

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.

These are the framework's own extension points, with the file encrypted and a key per message. The built-in FileHistoryProvider writes plaintext JSONL or MessagePack.

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 then deletes its row, so any ciphertext surviving elsewhere stays unreadable.

History provider

Implements get_messages and save_messages; the base class's before_run/after_run handle loading and storing according to its configuration flags, so an audit-only or evaluation-only provider works as documented:

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

Recalls with Citadel's hybrid search: vector distance, keyword rank and recency, fused into one score. embedder= is required and has no default: silent substitution would change ranking semantics and persist different provenance. MockEmbedder is lexical and needs no download; pass a real model to match across wording.

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.

License

Apache-2.0

Release files for citadeldb-ms-agent-framework 2.1.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 2.1.0
File Size Uploaded
citadeldb_ms_agent_framework-2.1.0.tar.gz 11.2 kB Details

Built distribution (wheel)

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

Total release size: 19.5 kB

Release files / citadeldb_ms_agent_framework-2.1.0.tar.gz

Download URL citadeldb_ms_agent_framework-2.1.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
d23fed09395633aca6639de8acd4fe08e9f684236754fa8180aaabeb37267018
BLAKE2b-256 checksum
How to use checksums
b7ac0640fa888370e653c831e684110373a3d3ffa9e396231ed93faa5eb8a94c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

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

Download URL citadeldb_ms_agent_framework-2.1.0-py3-none-any.whl
Size 8.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74a7bfc79169b580b68354f80bfee0b4239cbe0610632196ca7f6db3ad2363e9
BLAKE2b-256 checksum
How to use checksums
4df20c7067160fd8f78d16072b2e66f802a3ab0454336fec6111b26ebb81beca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Aug 30, 2026.

Transparency log

Release history Release notifications | RSS feed

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.0

2 release files

2.3.0

2 release files

2.2.0

2 release files

This release

2.1.0 This release

2 release files

2.0.0

2 release files

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