Expand description
Scope resolution logic for the agent memory system.
Determines which MemoryScope to use when writing a new memory and
which scopes are visible for a given user context during searches.
Functions§
- resolve_
scope - Resolve the effective scope for a new memory given the caller’s identity and an optional explicit scope hint.
- scope_
requires_ auth - Check whether a given scope requires a valid user identity.
- user_
id_ for_ query - Return the
user_idto pass to storage queries based on caller identity. ReturnsNonefor anonymous callers (so they see Global + Agent memories only).