Skip to main content

Module scopes

Module scopes 

Source
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_id to pass to storage queries based on caller identity. Returns None for anonymous callers (so they see Global + Agent memories only).