Skip to content

Conversation

edvinhallvaxhiu
Copy link
Contributor

Asynchronous Support for Bedrock Session Management Service

Overview

This PR adds asynchronous support for Bedrock Session Management Service in the LangGraph checkpoint system, enabling non-blocking I/O operations.

Key Components

AsyncBedrockAgentRuntimeSessionClient

  • Provides asynchronous wrappers around boto3 Bedrock Session Management Service API calls
  • Uses executor-based approach for non-blocking operations

AsyncBedrockSessionSaver

  • Implements async versions of all checkpoint operations (aget, aput, aput_writes, alist)
  • Maintains compatibility with the synchronous implementation

Implementation Details

  • Uses standard Python async/await patterns
  • Preserves error handling and functionality of synchronous version

Benefits

  • Enables calling LangGraph workflows asynchronously via ainvoke and astream methods
  • Improves performance for I/O-bound applications
  • Maintains full compatibility with existing checkpoint system

Testing

  • Added comprehensive unit tests for async functionality
  • Implemented integration tests to verify real-world behavior with Bedrock Session Management Service

@edvinhallvaxhiu
Copy link
Contributor Author

@michaelnchin - can you please approve the workflow: https://github.com/langchain-ai/langchain-aws/actions/runs/14867204107. Formatting issues have been fixed in the latest commit. Thx!

@flolas
Copy link

flolas commented Aug 27, 2025

Is there anything I can do to help move this forward?
I'd be happy to help with merge conflicts, tests, or any other changes needed.
Thanks @edvinhallvaxhiu!

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