Skip to content

Asynchronous Support for Bedrock Session Management Service #469

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

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!

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.

1 participant