symfonic.memory.working¶
working ¶
Working-memory summarisation primitives (v7.0 T09).
The canonical WorkingLayer lives under
symfonic.memory.layers.working. This package holds the summarisers
used when FrameworkConfig.stm_summary_mode is set to
extractive or llm. Keeping them out of the layer module keeps
the layer under the 300-line SOLID cap.
STMSummary
dataclass
¶
Result of an STM summary pass.
Attributes:
| Name | Type | Description |
|---|---|---|
text |
str
|
Rendered summary (may be empty when no source entries). |
mode_used |
SummaryMode
|
Actual mode applied. When the requested mode was
|
entry_count |
int
|
Number of source entries that fed the summary. |
truncated |
bool
|
True when the deterministic path truncated to the configured token budget. |
summarize_entries ¶
summarize_entries(
entries: list[MemoryEntry],
*,
mode: SummaryMode,
max_chars: int = 1000,
model_provider: _ModelProviderLike | None = None,
model_config: Any | None = None,
observability_hook: Any | None = None,
run_id: str = "",
) -> STMSummary
Summarise entries according to mode.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
entries
|
list[MemoryEntry]
|
Dropped working-memory entries (FIFO evictees). |
required |
mode
|
SummaryMode
|
|
required |
max_chars
|
int
|
Upper bound on the summary body. |
1000
|
model_provider
|
_ModelProviderLike | None
|
Required when |
None
|
model_config
|
Any | None
|
Passed verbatim to |
None
|
observability_hook
|
Any | None
|
v8.3.2 (G3) -- when supplied AND
|
None
|
run_id
|
str
|
Engine run identifier stamped on the hook events. |
''
|
Returns:
| Type | Description |
|---|---|
STMSummary
|
STMSummary. Never raises. |