Expand description
Storage trait abstraction for the Agent Assembly persistence layer.
This crate is a thin facade over aa_core::storage: it re-exports the
storage trait contract verbatim. The traits themselves live in aa-core so
they can also be reached at aa_core::storage::* — the two import paths are
interchangeable. Backend driver crates may depend on this crate to express
“I implement the storage contract” without coupling to the rest of aa-core’s
API surface, and existing aa_storage::* paths keep working.
The crate is a pure interface — no concrete backend dependency (no sqlx,
redis, or tonic).
§Traits
PolicyStore— fetch and invalidate an agent’s effective policyAuditSink— append-only emission of audit entriesSessionStore— persist, load, and delete per-execution session recordsCredentialStore— store and retrieve named secret materialRateLimitCounter— read-modify-write counters for rate limitingLifecycleStore— agent register / heartbeat / deregister bookkeeping
§Single import path
use aa_storage::{AgentId, AuditSink, PolicyDocument, PolicyStore};Modules§
- builtin
- Placeholder registration of the OSS driver names.
- conformance
- Reusable trait-conformance harness for driver crates.
- factory
- Factory traits that build a storage backend from its TOML subsection.
Structs§
- AgentId
- Stable identifier for an agent — UUID v4 encoded as raw bytes.
- Audit
Entry - An immutable, hash-chained record of a single governance event.
- Driver
Name - Name of a storage driver as written in
agent-assembly.toml(e.g."redis","postgres","memory"). - Policy
Document - Minimal policy document stub.
- Registry
- Registry of storage-driver factories, keyed by
DriverNameper kind. - Session
Id - Per-execution session identifier — UUID v4 encoded as raw bytes.
- Session
Record - A persisted record of a single agent execution session.
- Storage
Config - The
[storage]section: which driver backs each storage kind, plus the per-driver connection subsections.
Enums§
- Config
Error - Error returned when a
[storage]configuration cannot be resolved against the driverRegistry. - Storage
Error - Failure modes common to all storage backends.
Traits§
- Audit
Sink - Append-only sink for governance
AuditEntryrecords. - Credential
Store - Stores and retrieves named secret material as opaque bytes.
- Lifecycle
Store - Tracks agent liveness through register, heartbeat, and deregister.
- Policy
Store - Fetches and invalidates the effective
PolicyDocumentfor an agent. - Rate
Limit Counter - Atomic counters keyed by an arbitrary string, used for rate limiting.
- Session
Store - Persists, loads, and deletes
SessionRecords.
Type Aliases§
- Result
- Convenience alias for results returned by storage trait methods.