Skip to content

fix: AgentCoreMemorySessionManager - Cache agent timestamps to eliminate redundant list_events calls#289

Merged
padmak30 merged 1 commit intomainfrom
fix/cache-agent-timestamp
Mar 3, 2026
Merged

fix: AgentCoreMemorySessionManager - Cache agent timestamps to eliminate redundant list_events calls#289
padmak30 merged 1 commit intomainfrom
fix/cache-agent-timestamp

Conversation

@padmak30
Copy link
Contributor

@padmak30 padmak30 commented Mar 2, 2026

Description of changes:
Optimize AgentCoreMemorySessionManager by caching agent created_at timestamps to avoid unnecessary API calls during agent updates. Previously, update_agent() called read_agent() on every update to fetch the created_at timestamp, which triggered a list_events API call. Since AgentCore Memory is immutable and updates create new events, the original created_at must be preserved, but fetching it repeatedly was inefficient.

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

@padmak30 padmak30 requested a review from a team March 2, 2026 01:54
@padmak30 padmak30 assigned jariy17 and unassigned jariy17 Mar 2, 2026
@padmak30 padmak30 requested a review from jariy17 March 2, 2026 01:55
@padmak30 padmak30 merged commit 1dd896e into main Mar 3, 2026
21 checks passed
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.

3 participants