symfonic.memory.retrieval.discovery¶
discovery ¶
DiscoveryService -- scans the graph for emergent memory block labels.
Instead of matching entries against a hardcoded keyword dictionary, this service queries the graph store for actual distinct labels and merges them with domain-required labels to produce a unified status view.
Used by the Memory Status API to surface per-tenant memory health.
DiscoveryService ¶
Scans the graph store for distinct labels with emergent discovery.
Instead of matching against hardcoded keyword categories, this service asks the graph store what labels actually exist and merges them with any domain-required labels that may not exist yet.
Source code in src/symfonic/memory/retrieval/discovery.py
scan_status
async
¶
scan_status(
scope: TenantScope,
required_labels: list[str] | None = None,
) -> list[MemoryBlockInfo]
Scan the semantic layer for distinct graph labels.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
scope
|
TenantScope
|
Tenant scope for isolation. |
required |
required_labels
|
list[str] | None
|
Labels the domain requires. Missing ones
are returned as empty/pending with |
None
|
Returns:
| Type | Description |
|---|---|
list[MemoryBlockInfo]
|
List of MemoryBlockInfo -- one per discovered label, plus |
list[MemoryBlockInfo]
|
any missing required labels appended as pending. |
Source code in src/symfonic/memory/retrieval/discovery.py
MemoryBlockInfo ¶
Bases: BaseModel
Status of a named memory block for a tenant.