feat(strands-memory): add converter injection and optional restored-tool filtering#288
Open
dharamendrak wants to merge 6 commits intoaws:mainfrom
Open
feat(strands-memory): add converter injection and optional restored-tool filtering#288dharamendrak wants to merge 6 commits intoaws:mainfrom
dharamendrak wants to merge 6 commits intoaws:mainfrom
Conversation
…converters and tests
… and enhance OpenAI converter handling - Added AutoConverseConverter to facilitate automatic converter selection based on agent model. - Updated AgentCoreMemorySessionManager to support auto converter mode. - Enhanced OpenAI converter to preserve reasoning content and handle oversized payloads. - Updated tests to validate new auto converter functionality and reasoning content preservation.
- Changed module paths for OpenAI, Anthropic, and Gemini models in test files to align with the updated project structure. - Ensured consistency across tests for accurate model identification.
afarntrog
reviewed
Mar 4, 2026
src/bedrock_agentcore/memory/integrations/strands/converters/auto.py
Outdated
Show resolved
Hide resolved
src/bedrock_agentcore/memory/integrations/strands/converters/bedrock.py
Outdated
Show resolved
Hide resolved
src/bedrock_agentcore/memory/integrations/strands/converters/anthropic.py
Outdated
Show resolved
Hide resolved
src/bedrock_agentcore/memory/integrations/strands/session_manager.py
Outdated
Show resolved
Hide resolved
src/bedrock_agentcore/memory/integrations/strands/session_manager.py
Outdated
Show resolved
Hide resolved
afarntrog
reviewed
Mar 5, 2026
Contributor
afarntrog
left a comment
There was a problem hiding this comment.
Have you had a chance to test this against some of the data to ensure it's working e2e?
src/bedrock_agentcore/memory/integrations/strands/session_manager.py
Outdated
Show resolved
Hide resolved
- Updated the AgentCoreMemorySessionManager to directly use the instance's converter, removing unnecessary fallback logic. - Ensured consistent handling of message conversion and size checks across methods.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#254
Description of changes:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Testing
Validated the AgentCoreMemorySessionManager with and without OpenAIConverseConverter use below snippet
Listed event from agent core memory: Raw AgentCore event confirming TOOL role is correctly persisted: