Skip to content

[FEATURE] Provide session manager access in AgentInitializedEvent #1590

@nagabharann

Description

@nagabharann

Problem Statement

The session manager is not accessible in the AgentInitializedEvent hook. This prevents us from rehydrating conversation history when resuming paused conversations, forcing us to recreate agents for each invocation.

Proposed Solution

Include the session manager in the AgentInitializedEvent context, similar to how it's available in other events. This would allow hook handlers to access and modify conversation history during agent initialization.

Use Case

We are building a persistence layer for agent state. When an agent is resumed:

  1. The AgentInitializedEvent fires
  2. Our hook needs to load the previous conversation history from the persistence backend
  3. The session manager should be populated with this history before the agent continues

Without session manager access at this point, we cannot implement seamless conversation continuation.

Alternatives Solutions

We currently work around this by recreating agents with pre-populated history, but this adds latency and complexity.

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