citadeldb-strands-agents
A Strands Agents session manager backed by Citadel. Encrypted at rest, embedded in your process, and redaction that removes the redacted content rather than annotating it.
pip install citadeldb-strands-agents
from strands import Agent
from citadeldb_strands_agents import CitadelSessionManager
sessions = CitadelSessionManager("user-123", "sessions.cdl", key="your-passphrase")
agent = Agent(session_manager=sessions)
Built the way the shipped managers are: it implements SessionRepository and inherits
RepositorySessionManager, exactly as FileSessionManager and S3SessionManager do.
Redaction actually redacts
Strands redacts by setting a redact_message field beside the original and updating the
record:
# from strands RepositorySessionManager.redact_latest_message
latest_agent_message.redact_message = redact_message
return self.session_repository.update_message(...)
The original message stays in the record. Strands reads a redacted message through
to_message(), which returns the redaction, so the original is never read again. This
manager therefore does not keep it: the superseded record's key is destroyed and the
replacement carries the redaction in place of the original.
after = sessions.read_message("user-123", agent.agent_id, 0)
after.to_message() # {'content': [{'text': '[REDACTED]'}], 'role': 'user'}
after.message # the redaction, not the original
An ordinary update is unaffected: only a message carrying a redaction drops its original.
Erasure
sessions.forget_session("user-123") # returns the number of records erased
Strands has no delete in its repository protocol. This destroys the session, its agents and every message key.
Notes
Messages are ordered by their conversation index rather than write time, so editing an earlier turn does not move it to the end of the history.
Citadel is embedded and one process owns the file. A path already open on this thread, under the same passphrase, is shared, so many sessions and other Citadel adapters can share one database; construct them on the same thread.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file citadeldb_strands_agents-2.0.0.tar.gz.
File metadata
- Download URL: citadeldb_strands_agents-2.0.0.tar.gz
- Upload date:
- Size: 9.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0f7e945e8c2191bbc0262f19c5241ccb098d70c302bea3355f332b491f0ef7a
|
|
| MD5 |
091d0aa18ed6007be83276ce69c0e783
|
|
| BLAKE2b-256 |
4a5338aaf6f9ac8cd92a2fb87845c83c38ba545e29e91d0bfacb1f99b5c21370
|
Provenance
The following attestation bundles were made for citadeldb_strands_agents-2.0.0.tar.gz:
Publisher:
release-strands-agents.yml on yp3y5akh0v/citadel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
citadeldb_strands_agents-2.0.0.tar.gz -
Subject digest:
b0f7e945e8c2191bbc0262f19c5241ccb098d70c302bea3355f332b491f0ef7a - Sigstore transparency entry: 2517208650
- Sigstore integration time:
-
Permalink:
yp3y5akh0v/citadel@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/yp3y5akh0v
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-strands-agents.yml@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file citadeldb_strands_agents-2.0.0-py3-none-any.whl.
File metadata
- Download URL: citadeldb_strands_agents-2.0.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
763e244a25d0dabd7206e77984637893349f8f6a0637680b1d5ec8c488a103e2
|
|
| MD5 |
2e215d4c15b3bd7d9ef7be34ff84fe8b
|
|
| BLAKE2b-256 |
76f972f4a624e20ca7f82f83d735f3c4329c4bff59fdda1d6edd2cc7398cdbb1
|
Provenance
The following attestation bundles were made for citadeldb_strands_agents-2.0.0-py3-none-any.whl:
Publisher:
release-strands-agents.yml on yp3y5akh0v/citadel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
citadeldb_strands_agents-2.0.0-py3-none-any.whl -
Subject digest:
763e244a25d0dabd7206e77984637893349f8f6a0637680b1d5ec8c488a103e2 - Sigstore transparency entry: 2517208699
- Sigstore integration time:
-
Permalink:
yp3y5akh0v/citadel@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Branch / Tag:
refs/tags/v2.0.0 - Owner: https://github.com/yp3y5akh0v
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-strands-agents.yml@f616907085e6f66daed0d67f020bc729cb49d2c4 -
Trigger Event:
workflow_dispatch
-
Statement type: