symfonic.capabilities.memory.phases.episodic¶
episodic ¶
Phase 10: the episodic log is summarised so it does not grow without end.
Moved here from symfonic.capabilities.memory.phases.episodic, which now imports
it back: phase 10 is on the quick roster, and a roster the kernel composes
cannot reach into the legacy package. It operates on the EpisodicLayer
(vector-backed) rather than the graph the structural phases walk.
summarize_episodic
async
¶
summarize_episodic(episodic_layer: Any, scope: Any, *, llm_summarise: Any | None = None, max_entries: int = 100, summarize_batch: int = 50, gate: DurabilityGate | None = None) -> tuple[str, int]
Summarize oldest episodic entries into a single text, delete originals.
When the total event count exceeds max_entries, the oldest
summarize_batch entries are retrieved, concatenated (or LLM-
summarised when llm_summarise is provided), and the originals
are deleted from the vector store.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
episodic_layer
|
Any
|
An |
required |
scope
|
Any
|
Tenant scope for isolation. |
required |
llm_summarise
|
Any | None
|
Optional async callable |
None
|
max_entries
|
int
|
Threshold below which summarization is skipped. |
100
|
summarize_batch
|
int
|
Number of oldest entries to summarize per run. |
50
|
Returns:
| Type | Description |
|---|---|
str
|
Tuple of |
int
|
summarization was needed, returns |