From 568b9980b27027784873eae9030e532239d05c84 Mon Sep 17 00:00:00 2001 From: eavanvalkenburg Date: Mon, 21 Sep 2026 14:14:56 +0200 Subject: [PATCH 1/2] Python: Clarify Redis context retrieval scope --- .../agent_framework_redis/_context_provider.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/python/packages/redis/agent_framework_redis/_context_provider.py b/python/packages/redis/agent_framework_redis/_context_provider.py index 44c9c675abd..40f69d77d99 100644 --- a/python/packages/redis/agent_framework_redis/_context_provider.py +++ b/python/packages/redis/agent_framework_redis/_context_provider.py @@ -46,7 +46,10 @@ class RedisContextProvider(ContextProvider): """Redis context provider using the new ContextProvider hooks pattern. Stores context in Redis and retrieves scoped context via full-text or - optional hybrid vector search. + optional hybrid vector search. Retrieval spans sessions and is filtered by + every non-empty ``application_id``, ``agent_id``, and ``user_id``. Omitted + identifiers do not constrain retrieval, so applications should provide each + stable, trusted identifier that represents an intended isolation boundary. """ DEFAULT_CONTEXT_PROMPT = "## Memories\nConsider the following memories when answering user questions:" @@ -81,9 +84,12 @@ def __init__( vector_field_name: The name of the vector field in Redis. vector_algorithm: The algorithm to use for vector search. vector_distance_metric: The distance metric to use for vector search. - application_id: The application ID to scope the context. - agent_id: The agent ID to scope the context. - user_id: The user ID to scope the context. + application_id: Optional application-level retrieval scope. When + omitted, retrieval is not filtered by application. + agent_id: Optional agent-level retrieval scope. When omitted, + retrieval is not filtered by agent. + user_id: Optional user-level retrieval scope. When omitted, + retrieval is not filtered by user. context_prompt: The context prompt to use for the provider. redis_index: The Redis index to use for the provider. overwrite_index: Whether to overwrite the existing Redis index. From 8d39b90fb5f25ab6576cf4caabc72b57211d06d0 Mon Sep 17 00:00:00 2001 From: eavanvalkenburg Date: Mon, 21 Sep 2026 14:19:05 +0200 Subject: [PATCH 2/2] Python: Document required Redis context scope --- .../redis/agent_framework_redis/_context_provider.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/packages/redis/agent_framework_redis/_context_provider.py b/python/packages/redis/agent_framework_redis/_context_provider.py index 40f69d77d99..57fe4f97fd8 100644 --- a/python/packages/redis/agent_framework_redis/_context_provider.py +++ b/python/packages/redis/agent_framework_redis/_context_provider.py @@ -47,9 +47,10 @@ class RedisContextProvider(ContextProvider): Stores context in Redis and retrieves scoped context via full-text or optional hybrid vector search. Retrieval spans sessions and is filtered by - every non-empty ``application_id``, ``agent_id``, and ``user_id``. Omitted - identifiers do not constrain retrieval, so applications should provide each - stable, trusted identifier that represents an intended isolation boundary. + every non-empty ``application_id``, ``agent_id``, and ``user_id``. At least + one identifier must be non-empty. Omitted identifiers do not constrain + retrieval, so applications should provide each stable, trusted identifier + that represents an intended isolation boundary. """ DEFAULT_CONTEXT_PROMPT = "## Memories\nConsider the following memories when answering user questions:"