Expand description
Runtime memory wrapper bound to one agent.
Each agent holds its own per-agent backend instance (selected at
agent creation via [agents.<alias>.memory.backend], immutable
thereafter). The wrapper sits directly on top of that instance and:
- Stamps the bound agent’s UUID on every store via the inner
backend’s
store_with_agenttrait method (real implementations on every backend; the agent_id is never silently dropped at the trait boundary). - Filters every recall through the inner backend’s
recall_for_agentswith the resolved allowlist (own UUID + theread_memory_fromallowlist from[agents.<alias>.workspace.read_memory_from]). - Intersects caller-supplied per-call allowlists with the bound allowlist so a caller can never widen scope past what the agent’s config permits.
Cross-backend allowlist entries are rejected at config load. The
wrapper only ever sees same-backend sibling UUIDs in its
allowed_agent_ids set.
Structs§
- Agent
Scoped Memory - A
Memoryimpl that scopes every read and write to a bound agent’s UUID + a resolved cross-agent allowlist.