Skip to main content

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

citadeldb_strands_agents-2.0.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

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

citadeldb_strands_agents-2.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

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

Hashes for citadeldb_strands_agents-2.0.0.tar.gz
Algorithm Hash digest
SHA256 b0f7e945e8c2191bbc0262f19c5241ccb098d70c302bea3355f332b491f0ef7a
MD5 091d0aa18ed6007be83276ce69c0e783
BLAKE2b-256 4a5338aaf6f9ac8cd92a2fb87845c83c38ba545e29e91d0bfacb1f99b5c21370

See more details on using hashes here.

Provenance

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

Publisher: release-strands-agents.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_strands_agents-2.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for citadeldb_strands_agents-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 763e244a25d0dabd7206e77984637893349f8f6a0637680b1d5ec8c488a103e2
MD5 2e215d4c15b3bd7d9ef7be34ff84fe8b
BLAKE2b-256 76f972f4a624e20ca7f82f83d735f3c4329c4bff59fdda1d6edd2cc7398cdbb1

See more details on using hashes here.

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

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