Skip to content

add metadata support for LTM#481

Open
nborges-aws wants to merge 2 commits into
mainfrom
feature/ltm-metadata-support
Open

add metadata support for LTM#481
nborges-aws wants to merge 2 commits into
mainfrom
feature/ltm-metadata-support

Conversation

@nborges-aws
Copy link
Copy Markdown
Contributor

Description of changes:
Adds support for AgentCore Memory's long-term metadata feature on the data plane and control plane.

Indexed keys (control plane):

  • MemoryClient.create_memory(), create_memory_and_wait(), and create_or_get_memory() accept an optional indexed_keys: List[IndexedKey] parameter
  • New IndexedKey TypedDict and MetadataValueType enum in bedrock_agentcore.memory.models. IndexedKey.build(key, value_type)
  • update_memory(addIndexedKeys=...) is supported via the existing passthrough on MemoryClient

Metadata filters (data plane):

  • MemoryClient.retrieve_memories() and MemorySessionManager.search_long_term_memories() accept optional metadata_filters: List[MemoryMetadataFilter]
  • Builder method MemoryMetadataFilter.build_expression(left, operator, right=None) constructs a filter dict for boto3
  • MemoryRecordRightExpression exposes build_string, build_number, build_datetime, and build_string_list factories that match the four service-side value types

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 16, 2026

✅ No Breaking Changes Detected

No public API breaking changes found in this PR.



# ============================================================================
# LTM Metadata: indexed_keys and metadata_filters tests
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these tests are pretty heavily mocked, I think it might be worth adding some integ tests to verify the happy path for creating with memory keys at least. ( we don't need to wait for extraction ).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants