Back to catalog / Agent workflows
Remember preferences in a per-customer memory store
Attach a customer-scoped memory store to sessions so approved preferences persist across visits without mixing tenants.
Goal
Attach a customer-scoped memory store to sessions so approved preferences persist across visits without mixing tenants.
Steps
- Create one memory store per customer and attach it to
sessions.create(resources=...)with the intended read/write access level. [source17] - Use the Memory API to inspect or seed approved preferences under a bounded path such as
/mnt/memory/preferences.md. [source17] - Test two customer IDs in isolated sessions; verify retrieval is tenant-scoped, edits are auditable, and deletion follows retention policy. [source17]
How to verify
Seed different preferences for two customer IDs and query each session; verify no cross-tenant result, edits are auditable, and deletion removes the selected customer’s memory.
Troubleshooting
If one session returns another customer’s preference, stop writes and check resource IDs and access levels at sessions.create before resuming.
Permissions
Prerequisites
- Managed Agents beta access, customer-to-store mapping, and an approved retention/deletion policy.
Permissions
- Use approved test or anonymized data only; scope credentials to each workflow, and require explicit approval for external writes.
Limitations
Model output may be incomplete or wrong; API and beta behavior can change, so verify against the pinned source and current service behavior.
Pinned upstream source
- Repository
- anthropics/anthropic-cookbook
- File path
- managed_agents/CMA_remember_user_preferences.ipynb
- Pinned commit
9c1e493ddd2b82df399d2a61b9c806c539e18be6- Source checked
- 2026-10-14 · Reviewed against the pinned upstream source
Repository metrics
These values describe the upstream repository, not popularity or likes for an individual skill or playbook.
- Stars
- Not collected
- Forks
- Not collected
- Observed at
- Not collected
No metrics snapshot is available yet.
License: MIT
Main topic
Make Agent behavior safer and easier to verify