symfonic.capabilities.memory.legacy_extraction¶
legacy_extraction ¶
Explicit, safe migration for the bundled graph-operation extraction schema.
The bundled MEMORY_EXTRACT and GRAPH_OPERATIONS templates predate the
native extraction wire contract. They emit type and payload rather
than action and properties. This adapter translates only the four
legacy operation kinds that become durable native records. It never performs
graph mutations itself, and it never accepts a caller-supplied scope or
provenance: the delegated native service mints those from ExtractionRequest.
Unsupported or malformed legacy operations deliberately produce a dropped result. The post-response stage treats that as a signal to run its configured extraction-model fallback, rather than allowing a stripped but unusable tagged reply to suppress durable extraction for the turn.
LegacyGraphOperationsAdapter ¶
Make a native extractor accept the bundled legacy directive explicitly.
Compose this around :class:MemoryExtractionService only when rendering a
bundled legacy extraction template. Native action/properties
operations retain their normal service path, which lets a template migrate
independently without a behavior switch in the post-response stage.
Source code in src/symfonic/capabilities/memory/legacy_extraction.py
extract
async
¶
Delegate fallback extraction without changing its provider contract.
parse_inline ¶
parse_inline(operations: tuple[Mapping[str, Any], ...], request: ExtractionRequest) -> ExtractionResult
Translate an all-legacy envelope or retain the native inline path.