AWS bedrock-agentcore documentation change
Summary
Updated example code for retrieving long-term memories: changed example comment, replaced 'namespace_prefix' parameter with 'namespace', added 'query' and 'top_k' parameters, and added a second example for namespace hierarchy search.
Security assessment
This change updates API usage examples for memory retrieval functionality. It modifies parameters and adds a new example but does not introduce or document security features. There is no evidence of security vulnerabilities or security-related changes.
Diff
diff --git a/bedrock-agentcore/latest/devguide/long-term-saving-and-retrieving-insights.md b/bedrock-agentcore/latest/devguide/long-term-saving-and-retrieving-insights.md index 03405a020..e24d8f35f 100644 --- a//bedrock-agentcore/latest/devguide/long-term-saving-and-retrieving-insights.md +++ b//bedrock-agentcore/latest/devguide/long-term-saving-and-retrieving-insights.md @@ -76 +76 @@ The following example demonstrates how to wait for processing and then retrieve - # --- Example 1: Retrieve the user's shipping preference --- + # --- Example 1: Retrieve the user's shipping issues under a specific namespace --- @@ -78 +78,8 @@ The following example demonstrates how to wait for processing and then retrieve - namespace_prefix=f"/summaries/{actor_id}/{session_id}/", + namespace=f"/summaries/{actor_id}/{session_id}/", + query="What problem did the user report with their order?", + top_k=5 + ) + + # --- Example 2: Retrieve the user's shipping issues under a particular namespace hierarchy (e.g.: shipping issues across multiple sessions) --- + memories = session.search_long_term_memories( + namespace_path=f"/summaries/{actor_id}/",