Amazon has enhanced its AgentCore Memory service with metadata filtering, allowing AI agents to better scope retrieval by business dimensions such as priority, department, or time range. This improvement helps address the retrieval precision wall that teams face when agents accumulate extensive interaction history. The service organizes memory records into namespaces that isolate data by entities, ensuring each entity’s data remains separate. With metadata filtering, users can apply fine-grained, attribute-based filters before similarity search runs, improving the relevance of retrieved information. This advancement is particularly beneficial for scenarios requiring contextual boundaries, such as time-bounded lookups or priority-based filtering. Source: awsml
Metadata filtering in AgentCore Memory operates across short-term and long-term memory, following a three-phase lifecycle: configuration, ingestion, and retrieval. At the short-term memory layer, users can attach string-based key-value pairs to events, tagging interactions with contextual information critical for later retrieval. These tags carry forward into long-term memory during extraction and consolidation, where they become filterable dimensions. The service enables precise control over how structured context is declared, propagated, and queried. During configuration, users define which metadata keys to index for fast filtering and retrieval across memory records. These keys are stored in a format optimized for query filtering, while non-indexed keys are stored alongside memory records for informational purposes. Source: awsml
The introduction of metadata filtering addresses the limitations of namespace scoping alone, which cannot separate semantically similar but contextually irrelevant results. For example, in a financial services agent with a namespace per client, the results may span different investment strategies, time periods, and priority levels within that client’s history. The agent cannot distinguish a high-priority rebalancing conversation from last week from a routine inquiry three months ago. Metadata filtering handles this by allowing sub-grouping within those boundaries, such as category, resolution status, date, priority, and tags. This ensures that the information retrieved is not only semantically close but also contextually relevant. Source: awsml