⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@jariy17
Copy link
Contributor

@jariy17 jariy17 commented Jan 30, 2026

Summary

  • Add metadata parameter to create_event, create_blob_event, and fork_conversation methods
  • Add event_metadata filter parameter to list_events method for querying events by metadata
  • Metadata supports up to 15 key-value pairs with keys 1-128 characters
  • Filtering supports EQUALS_TO, EXISTS, and NOT_EXISTS operators

Test plan

  • Added unit tests for create_event with metadata
  • Added unit tests for create_blob_event with metadata
  • Added unit tests for list_events with event_metadata filter
  • Added unit tests for list_events with combined branch and metadata filters
  • Added unit tests for fork_conversation with metadata
  • All 108 unit tests pass
  • Verified with real API calls against AgentCore Memory service

@jariy17 jariy17 requested a review from a team January 30, 2026 02:26
Add metadata parameter to create_event, create_blob_event, fork_conversation,
and event_metadata filter to list_events in MemoryClient.

- create_event: Added optional metadata parameter for attaching key-value metadata
- create_blob_event: Added optional metadata parameter
- list_events: Added event_metadata filter for querying events by metadata
- fork_conversation: Added optional metadata parameter (passes through to create_event)

Metadata supports up to 15 key-value pairs with keys 1-128 characters.
Filtering supports EQUALS_TO, EXISTS, and NOT_EXISTS operators.
@jariy17 jariy17 force-pushed the feat/memory-client-metadata-support branch from 3e281fd to 368dec3 Compare January 30, 2026 02:40
session_id: str,
branch_name: Optional[str] = None,
include_parent_branches: bool = False,
event_metadata: Optional[List[EventMetadataFilter]] = None,
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: The EventMetadataFilter TypedDict in filters.py defines operator: OperatorType (enum), but the docstring examples correctly show passing the string "EQUALS_TO" directly, which is what boto3 actually needs.

This works fine at runtime since Python doesn't enforce TypedDict, and the examples are correct. The root issue is in filters.py where operator should probably be typed as str rather than OperatorType. Worth a follow-up cleanup but def not a blocker for this PR. Should I create an issue for this? Or can we have strands do it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Already created an issue

Copy link
Contributor

@aidandaly24 aidandaly24 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@jariy17 jariy17 merged commit 53a1baa into main Jan 30, 2026
22 checks passed
@jariy17 jariy17 deleted the feat/memory-client-metadata-support branch January 30, 2026 15:32
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