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
from citadeldb_ms_agent_framework import CitadelContextProvider, CitadelHistoryProvider

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

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")
memory = CitadelContextProvider("agent.cdl", key="your-passphrase", scope="user-123")

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", 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. The default MockEmbedder is lexical; pass embedder= a real one to match across wording.

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

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

Download files

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

Source Distribution

citadeldb_ms_agent_framework-2.0.0.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

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

citadeldb_ms_agent_framework-2.0.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file citadeldb_ms_agent_framework-2.0.0.tar.gz.

File metadata

File hashes

Hashes for citadeldb_ms_agent_framework-2.0.0.tar.gz
Algorithm Hash digest
SHA256 39bcf92d7986254c756728740a54503d224f6d0d61ebef10250cf8fb3a4cbe73
MD5 a374ae90bc7b21274fde0362a2321589
BLAKE2b-256 6c56ff785dfdca37e7879a427a7441a781365d2be59d7186263d05e00c3eb9ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for citadeldb_ms_agent_framework-2.0.0.tar.gz:

Publisher: release-ms-agent-framework.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_ms_agent_framework-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for citadeldb_ms_agent_framework-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 45daca851565cba5e6042ef09091c225683c259d3ace4938978a66e6d45e6f76
MD5 930ffaa3d9943eb51abf6df599f4f0b4
BLAKE2b-256 14fed90ea8f024ef49239811edd3958ddec1c9a6da837463f46533f60c354dc6

See more details on using hashes here.

Provenance

The following attestation bundles were made for citadeldb_ms_agent_framework-2.0.0-py3-none-any.whl:

Publisher: release-ms-agent-framework.yml on yp3y5akh0v/citadel

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

Release history Release notifications | RSS feed

This release

2.0.0 This release

2 files

Supported by

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