Skip to content

symfonic.memory.types

types

Core type definitions for the graph memory system.

Provides tenant scoping, memory layer enumeration, type aliases, and scoring weight configuration used across all components.

EdgeId module-attribute

EdgeId = NewType('EdgeId', str)

Unique identifier for a graph edge.

NodeId module-attribute

NodeId = NewType('NodeId', str)

Unique identifier for a graph node.

TopK module-attribute

TopK = NewType('TopK', int)

Number of top results to return from retrieval queries.

MemoryLayer

Bases: str, Enum

The five layers of the Pentad memory model.

Each layer serves a distinct cognitive function and is backed by an independent store that implements BaseMemoryStore.

EPISODIC class-attribute instance-attribute

EPISODIC = 'episodic'

Narrative events, scenarios, and timestamps (When/Where).

PROCEDURAL class-attribute instance-attribute

PROCEDURAL = 'procedural'

Skills, code snippets, and workflows (How).

PROSPECTIVE class-attribute instance-attribute

PROSPECTIVE = 'prospective'

Commitments, reminders, and pending tasks (Future).

SEMANTIC class-attribute instance-attribute

SEMANTIC = 'semantic'

Permanent facts and graph entities (What).

WORKING class-attribute instance-attribute

WORKING = 'working'

Active conversation context, session-scoped (Now).

ScoringWeights

Bases: BaseModel

Weights for the four-signal retrieval scoring formula.

The four weights must sum to 1.0 (within floating-point tolerance). Default allocation: semantic 40%, recency 20%, frequency 20%, graph 20%.