Skip to content

Memory Types & Subtypes Reference

Cognitive Types

TypeEnum ValueDescriptionRetentionTypical Use
EpisodicepisodicSpecific events/interactionsDecays over timeEvent logs, interaction history
SemanticsemanticFacts, concepts, relationshipsPermanent until modifiedPreferences, decisions, knowledge
ProceduralproceduralHow-to knowledgePermanentSolutions, patterns, workflows
WorkingworkingCurrent task contextSession-scoped (TTL)Active task tracking

Python

from memorylayer import MemoryType
MemoryType.EPISODIC # "episodic"
MemoryType.SEMANTIC # "semantic"
MemoryType.PROCEDURAL # "procedural"
MemoryType.WORKING # "working"

TypeScript

import { MemoryType } from "@scitrera/memorylayer-sdk";
MemoryType.EPISODIC // "episodic"
MemoryType.SEMANTIC // "semantic"
MemoryType.PROCEDURAL // "procedural"
MemoryType.WORKING // "working"

Domain Subtypes

SubtypeEnum ValueDescription
SolutionsolutionWorking fixes to problems
ProblemproblemIssues encountered
CodePatterncode_patternReusable code patterns
FixfixBug fixes with context
ErrorerrorError patterns and resolutions
WorkflowworkflowProcess knowledge
PreferencepreferenceUser or project preferences
DecisiondecisionArchitectural decisions
ProfileprofilePerson or entity profiles
EntityentityNamed entities (people, places, things)
EventeventSignificant events or milestones
DirectivedirectiveUser instructions and constraints
InferenceinferenceDerived/inferred facts attributed to a reasoning step
FactfactAtomic facts produced by fact decomposition; feeds the fact retrieval channel

fact is server-side only. The server accepts and emits fact, but it is not yet in the MemorySubtype enum shipped by the Python and TypeScript SDKs. Pass it as the string "fact" from the SDKs until the enums catch up.

Python

from memorylayer import MemorySubtype
MemorySubtype.SOLUTION # "solution"
MemorySubtype.PROBLEM # "problem"
MemorySubtype.CODE_PATTERN # "code_pattern"
MemorySubtype.FIX # "fix"
MemorySubtype.ERROR # "error"
MemorySubtype.WORKFLOW # "workflow"
MemorySubtype.PREFERENCE # "preference"
MemorySubtype.DECISION # "decision"
MemorySubtype.PROFILE # "profile"
MemorySubtype.ENTITY # "entity"
MemorySubtype.EVENT # "event"
MemorySubtype.DIRECTIVE # "directive"
MemorySubtype.INFERENCE # "inference"

TypeScript

import { MemorySubtype } from "@scitrera/memorylayer-sdk";
MemorySubtype.SOLUTION // "solution"
MemorySubtype.PROBLEM // "problem"
MemorySubtype.CODE_PATTERN // "code_pattern"
MemorySubtype.FIX // "fix"
MemorySubtype.ERROR // "error"
MemorySubtype.WORKFLOW // "workflow"
MemorySubtype.PREFERENCE // "preference"
MemorySubtype.DECISION // "decision"
MemorySubtype.DIRECTIVE // "directive"
MemorySubtype.PROFILE // "profile"
MemorySubtype.ENTITY // "entity"
MemorySubtype.EVENT // "event"
MemorySubtype.INFERENCE // "inference"

Recall Modes

ModeEnum ValueDescriptionStatus
RAGragHybrid retrieval: dense vector + keyword (BM25) fused via RRF, with graph traversal and intent-gated armsActive (default)
AgenticagenticIterative, LLM-driven retrieval loop over the same armsServer-side; not in the SDK enums
LLMllmLLM-powered semantic searchDeprecated
HybridhybridCombination of RAG and LLMDeprecated

Note: LLM and Hybrid modes are being phased out. Use RAG mode for recall and the Context Environment with RLM for LLM-powered analysis over memories.

Importance Scoring Guide

ScoreLevelUse For
0.9–1.0CriticalSecurity fixes, breaking changes, core architecture
0.7–0.8HighBug fixes, API changes, important patterns
0.5–0.6StandardPreferences, general knowledge
0.3–0.4LowObservations, temporary workarounds
0.0–0.2EphemeralDebugging traces, session context