Skip to content

[FEATURE] Non-blocking writes to Session #1800

@Unshure

Description

@Unshure

Problem Statement

I would like strands to not block the thread when writing an update to the session manager. This should be able to happen in the background for session persistence that can have high latency.

Proposed Solution

Create a background thread in the session manager that can perform writes which are submitted by the agent thread. This way writes happen in the background and the agent execution can continue unblocked.

Use Case

  • High latency writes to AgentCore Memory cause the agent loop to block when writing to session. By delegating this work to a background thread, we unblock the agent loop from continuing as the write happens.

Alternatives Solutions

Create async methods for the SessionManager that do not need to be awaited when writing. This idea comes with the downside that async support for aws api's is poorly supported.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions