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 and inference are usually produced by the server rather than by callers. Fact decomposition writes fact memories, and entity-insight synthesis writes inference memories. Only fact feeds the fact retrieval channel.

System and Plugin Subtypes

The server also recognizes subtypes that it manages itself. You do not normally write these directly:

SubtypeWritten by
skill, skill_referenceThe skills registry: the searchable memory mirror of a skill and its reference files
skill_addendumSkill addenda. Accepted addenda are appended to a skill body when it is read
mcp_serverThe MCP server registry memory mirror
rpg_directory, rpg_file, rpg_module, rpg_package, rpg_class, rpg_interface, rpg_function, rpg_method, rpg_componentThe Repository Planning Graph plugin, when installed

The subtype field is a free-form string validated against this merged set. Plugins can contribute more subtypes at startup.

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"

Memory Scope

Set per write with the REST scope field on POST /v1/memories.

ScopeEnum ValueDescription
WorkspaceworkspaceDefault. The memory lives in the caller’s workspace.
UseruserThe memory goes to the _global_user workspace, partitioned by user_id, so it follows that user across workspaces. Requires a user_id.

See Perspective & User Memory for the routing rules.

Recall Modes

ModeEnum ValueDescription
RAGragDefault. Hybrid retrieval: dense vector + keyword (BM25) search fused with Reciprocal Rank Fusion, plus the enabled retrieval channels and graph expansion. No LLM call.
LLMllmRewrites the query with the configured LLM, then searches. Needs an LLM provider and a generation policy that allows query rewriting.
HybridhybridRuns RAG first and falls back to LLM mode when the top result scores below rag_threshold (default 0.8).
AgenticagenticAn iterative, LLM-controlled expand / re-query / stop loop. The loop itself is implemented by MemoryLayer Enterprise. A core server takes the hybrid path for this value.

The Python and TypeScript SDK RecallMode enums include rag, llm, and hybrid. Pass "agentic" as a string. For LLM-powered analysis over many memories, see also the Context Environment.

Search Tolerance

Tolerance sets the minimum relevance score used when the request has no min_relevance.

ToleranceEnum ValueDefault floorEnv var
Looseloose0.15MEMORYLAYER_TOLERANCE_FLOOR_LOOSE
Moderatemoderate0.3 (default tolerance)MEMORYLAYER_TOLERANCE_FLOOR_MODERATE
Strictstrict0.6MEMORYLAYER_TOLERANCE_FLOOR_STRICT

Detail Levels

LevelEnum ValueReturns
AbstractabstractBrief summary tier
OverviewoverviewHigh-level overview tier
FullfullComplete memory content (the recall default)

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