MemoryProvider lifecycle hooks #735

Closed
opened 2026-10-27 13:37:32 +00:00 by sam · 0 comments
Owner

Add lifecycle hook interfaces to MemoryProvider: on_turn_start(), on_session_end(), on_session_switch(), on_pre_compress(), on_memory_write(content), on_delegation(). These allow providers to react to session lifecycle events for state management and context maintenance.

Acceptance Criteria

Each lifecycle hook is a separate optional sub-interface (e.g., TurnStartHook, SessionEndHook, SessionSwitchHook, PreCompressHook, MemoryWriteHook, DelegationHook)
Interfaces are defined alongside MemoryProvider in the same package
MemoryManager calls hooks at appropriate points in the agent lifecycle
Hooks have access to relevant context (session_id, content, etc.)
All hooks are called asynchronously to avoid blocking the main loop


Imported from beads archie-core-1786637495297-210-dee8210c · GitHub #231 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08

Add lifecycle hook interfaces to MemoryProvider: on_turn_start(), on_session_end(), on_session_switch(), on_pre_compress(), on_memory_write(content), on_delegation(). These allow providers to react to session lifecycle events for state management and context maintenance. ### Acceptance Criteria Each lifecycle hook is a separate optional sub-interface (e.g., TurnStartHook, SessionEndHook, SessionSwitchHook, PreCompressHook, MemoryWriteHook, DelegationHook) Interfaces are defined alongside MemoryProvider in the same package MemoryManager calls hooks at appropriate points in the agent lifecycle Hooks have access to relevant context (session_id, content, etc.) All hooks are called asynchronously to avoid blocking the main loop --- _Imported from beads `archie-core-1786637495297-210-dee8210c` · GitHub #231 · type task · priority P2 · created 2026-08-08 · closed 2026-08-08_
sam added the mediumtask labels 2026-10-27 13:37:32 +00:00
sam self-assigned this 2026-10-27 13:37:32 +00:00
sam closed this issue 2026-10-27 13:37:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sam/archie#735