Graphorin API reference v0.4.0
Graphorin API reference / @graphorin/memory / facade / CreateMemoryOptions
Interface: CreateMemoryOptions
Defined in: packages/memory/src/facade.ts:71
Options accepted by createMemory.
Stable
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
conflictPipeline? | readonly | ConflictPipelineOptions | Conflict pipeline configuration (Phase 10b). Default: enabled, English locale pack, thresholds 0.95 / 0.85 / 0.4. Pass { mode: 'off' } to bypass the pipeline entirely (logs a one-shot WARN per process per the spec). | packages/memory/src/facade.ts:237 |
consolidator? | readonly | { ceilings?: Partial<ConsolidatorCeilings>; cheapModel?: string | null; contextualRetrieval?: ContextualRetrievalMode; decayArchiveThreshold?: number; decayCapacity?: number | null; decayTauDays?: number; deepModel?: string | null; defaultScope?: SessionScope; dlqBaseBackoffMs?: number; dlqMaxBackoffMs?: number; dlqMaxRetries?: number; enabled?: boolean; formEpisodes?: boolean; importanceScoring?: boolean; importanceThreshold?: number; lockWaitMs?: number; maxDeepConflictsPerRun?: number; maxStandardBatchSize?: number; noiseFilters?: readonly ("default" | "minimal" | "none")[]; now?: () => number; onExceed?: OnBudgetExceed; onPhaseFinished?: PhaseListener; phases?: readonly ConsolidatorPhase[]; provider?: Provider | null; randomId?: () => string; reflection?: boolean; reflectionMaxQuestions?: number; salienceWeights?: SalienceWeights; tier?: ConsolidatorTier; triggers?: readonly ConsolidatorTriggerSpec[]; } | Consolidator configuration. When omitted (or enabled: false) the facade installs the Phase 10a no-op placeholder so consumers can still type their interactions without paying the runtime cost. Pass enabled: true (or any non-tier: 'free' settings) to construct the production runtime from @graphorin/memory/consolidator. | packages/memory/src/facade.ts:183 |
consolidator.ceilings? | readonly | Partial<ConsolidatorCeilings> | - | packages/memory/src/facade.ts:188 |
consolidator.cheapModel? | readonly | string | null | - | packages/memory/src/facade.ts:190 |
consolidator.contextualRetrieval? | readonly | ContextualRetrievalMode | Contextual retrieval for standard-phase fact writes (P1-3). 'llm' opts into one budgeted cheap-model call per write to author a situating prefix (consolidator-only); 'late-chunk' (default) and 'off' defer to the write-path mode. Per-tier default. | packages/memory/src/facade.ts:221 |
consolidator.decayArchiveThreshold? | readonly | number | - | packages/memory/src/facade.ts:195 |
consolidator.decayCapacity? | readonly | number | null | Capacity-bounded eviction target for the light phase (X-1). Default unbounded. | packages/memory/src/facade.ts:197 |
consolidator.decayTauDays? | readonly | number | - | packages/memory/src/facade.ts:194 |
consolidator.deepModel? | readonly | string | null | - | packages/memory/src/facade.ts:191 |
consolidator.defaultScope? | readonly | SessionScope | - | packages/memory/src/facade.ts:222 |
consolidator.dlqBaseBackoffMs? | readonly | number | - | packages/memory/src/facade.ts:203 |
consolidator.dlqMaxBackoffMs? | readonly | number | - | packages/memory/src/facade.ts:204 |
consolidator.dlqMaxRetries? | readonly | number | - | packages/memory/src/facade.ts:202 |
consolidator.enabled? | readonly | boolean | - | packages/memory/src/facade.ts:184 |
consolidator.formEpisodes? | readonly | boolean | Auto-form quarantined episodes from processed slices (P1-2). Per-tier default. | packages/memory/src/facade.ts:206 |
consolidator.importanceScoring? | readonly | boolean | Score episode importance via the consolidator LLM (P1-2). Per-tier default. | packages/memory/src/facade.ts:208 |
consolidator.importanceThreshold? | readonly | number | Accumulated-importance threshold at which reflection fires (P1-1). | packages/memory/src/facade.ts:212 |
consolidator.lockWaitMs? | readonly | number | - | packages/memory/src/facade.ts:193 |
consolidator.maxDeepConflictsPerRun? | readonly | number | - | packages/memory/src/facade.ts:201 |
consolidator.maxStandardBatchSize? | readonly | number | - | packages/memory/src/facade.ts:200 |
consolidator.noiseFilters? | readonly | readonly ("default" | "minimal" | "none")[] | - | packages/memory/src/facade.ts:192 |
consolidator.now? | readonly | () => number | Override the wall clock — used by tests. | packages/memory/src/facade.ts:225 |
consolidator.onExceed? | readonly | OnBudgetExceed | - | packages/memory/src/facade.ts:189 |
consolidator.onPhaseFinished? | readonly | PhaseListener | Subscribe to phase-finished events. | packages/memory/src/facade.ts:229 |
consolidator.phases? | readonly | readonly ConsolidatorPhase[] | - | packages/memory/src/facade.ts:187 |
consolidator.provider? | readonly | Provider | null | - | packages/memory/src/facade.ts:223 |
consolidator.randomId? | readonly | () => string | Stable id seed — used by tests. | packages/memory/src/facade.ts:227 |
consolidator.reflection? | readonly | boolean | Run the deep-phase reflection pass synthesizing cited insights (P1-1). Per-tier default. | packages/memory/src/facade.ts:210 |
consolidator.reflectionMaxQuestions? | readonly | number | Upper bound on salient questions reflection asks per pass (P1-1). | packages/memory/src/facade.ts:214 |
consolidator.salienceWeights? | readonly | SalienceWeights | Weights for the multi-signal salience score (X-1). | packages/memory/src/facade.ts:199 |
consolidator.tier? | readonly | ConsolidatorTier | - | packages/memory/src/facade.ts:186 |
consolidator.triggers? | readonly | readonly ConsolidatorTriggerSpec[] | - | packages/memory/src/facade.ts:185 |
contextEngine? | readonly | ContextEngineConfig | Context engine configuration (Phase 10d). The engine assembles the layered six-layer system prompt; memory.compile(scope) delegates to it for the working blocks + rules + metadata fragments. When omitted, a default engine is created (English locale; 'full' base mode; no auto-recall; conservative 'public-tls' provider trust). | packages/memory/src/facade.ts:246 |
contextualRetrieval? | readonly | "off" | "late-chunk" | Contextual-retrieval mode for the write path (P1-3). 'late-chunk' (default) prepends a deterministic, offline situating context (entities / timeframe / topics, derived from the fact's own structured fields) to the text that is embedded + FTS-indexed, so a terse fact stays findable; the canonical text is preserved. 'off' indexes the bare text. The 'llm' enrichment is not available on the hot path — it is a consolidator-only opt-in configured via consolidator: { contextualRetrieval: 'llm' }. | packages/memory/src/facade.ts:98 |
embedder? | readonly | EmbedderProvider | Embedder provider (default: none — vector search is disabled). | packages/memory/src/facade.ts:77 |
embeddings | readonly | EmbeddingMetaRegistryLike | Embedder registry. The default sqlite store exposes one as sqlite.embeddings. | packages/memory/src/facade.ts:75 |
graph? | readonly | EntityResolutionConfig & { entityResolution?: boolean; provider?: Provider; } | Relation-graph entity resolution (P2-1). When entityResolution is true and the storage adapter exposes a graph surface (the default @graphorin/store-sqlite does), remember(...) resolves a fact's subject / object to canonical entities and links them, so search(..., { expandHops: 1 }) can traverse relationships. Omitted (the default) ⇒ facts still carry s/p/o but form no entity links and the write path stays offline + unchanged. Dedup is lexical + embedding (offline, via the configured embedder); LLM adjudication of ambiguous merges is a further opt-in that needs provider. | packages/memory/src/facade.ts:129 |
iterativeRetrieval? | readonly | { maxIterations?: number; maxTokens?: number; provider: Provider; } | Agentic / iterative retrieval (P2-4, opt-in). When supplied, SemanticMemory.searchIterative(...) and the gated deep_recall tool can grade a retrieved set on the given provider and, for queries judged hard, reformulate + retrieve again (widening to one-hop graph expansion) up to maxIterations, abstaining instead of confabulating when memory is insufficient. Omitted (the default) ⇒ searchIterative stays a single difficulty-gated pass with no provider call, and deep_recall is not registered (the tool surface stays at the canonical eleven). Reserve it for hard multi-hop / temporal recall — it adds provider latency per pass. | packages/memory/src/facade.ts:147 |
iterativeRetrieval.maxIterations? | readonly | number | Default total-pass cap (clamped to [1, 5]). Default 3. | packages/memory/src/facade.ts:151 |
iterativeRetrieval.maxTokens? | readonly | number | Output-token ceiling per grade call. Default 256. | packages/memory/src/facade.ts:153 |
iterativeRetrieval.provider | readonly | Provider | Cheap provider used to grade retrieved memories + reformulate. | packages/memory/src/facade.ts:149 |
procedureInduction? | readonly | { maxTokens?: number; provider: Provider; } | Opt-in workflow induction (P2-2). When set, ProceduralMemory.induce(...) distils a reusable, value-abstracted procedure from a successful agent trajectory and stores it quarantined + provenance: 'induction'. Omitted (the default) ⇒ induce(...) throws ProcedureInductionNotConfiguredError and the procedural tier stays pure offline CRUD — no provider call. | packages/memory/src/facade.ts:163 |
procedureInduction.maxTokens? | readonly | number | Output-token ceiling per induction call. Default 512. | packages/memory/src/facade.ts:167 |
procedureInduction.provider | readonly | Provider | Provider used to abstract trajectory values into a procedure. | packages/memory/src/facade.ts:165 |
queryTransform? | readonly | { maxTokens?: number; maxVariants?: number; provider: Provider; } | Query transformation for retrieval (P2-3, opt-in). When supplied, SemanticMemory.search(..., { multiQuery }) fans the query into reworded variants (multi-query / RAG-Fusion) and { hyde } adds a hypothetical-answer embedding — both via one cheap LLM call on the given provider, fused through the existing RRF reranker. Omitted (the default) ⇒ search stays offline + single-shot and the multiQuery / hyde search options become silent no-ops. Reserve it for retrieval-heavy recall, not every search (it adds provider latency). | packages/memory/src/facade.ts:110 |
queryTransform.maxTokens? | readonly | number | Output-token ceiling per transform call. Default 256. | packages/memory/src/facade.ts:116 |
queryTransform.maxVariants? | readonly | number | Hard ceiling on reworded variants requested per call. Default 5. | packages/memory/src/facade.ts:114 |
queryTransform.provider | readonly | Provider | Cheap provider used to rewrite the query / write the HyDE passage. | packages/memory/src/facade.ts:112 |
reranker? | readonly | ReRanker | Override the reranker used by SemanticMemory.search. | packages/memory/src/facade.ts:87 |
resolveScope? | readonly | ScopeResolver | Resolver that produces the live SessionScope for each memory-tool invocation. Defaults to a closure that throws — the agent runtime overrides it in Phase 12. | packages/memory/src/facade.ts:174 |
store | readonly | MemoryStoreAdapter | Storage adapter (default: @graphorin/store-sqlite's MemoryStore). | packages/memory/src/facade.ts:73 |
tracer? | readonly | Tracer | Tracer used for every memory.* span. Defaults to the no-op tracer from @graphorin/core so unit tests do not need to wire the observability stack. | packages/memory/src/facade.ts:85 |
workingBlocks? | readonly | readonly BlockDefinition[] | Pre-declared working blocks (idempotent — re-defining is a no-op). | packages/memory/src/facade.ts:79 |