Skip to main content

Module background

Module background 

Source
Expand description

Background memory management task.

Functionsยง

safe_conversation_slice
Safely slice a conversation to get the last N messages without tearing tool call pairs. Returns messages starting from a clean boundary (User message without orphaned ToolResults).
spawn_background_compaction
Spawn a background compaction task. Fire-and-forget.
spawn_memory_manager
Spawn the memory manager agent as a background task. This is fire-and-forget - errors are logged but not propagated.