Appearance
Artifact memory
An "artifact" in the agent-platform sense is whatever the conversation is about — a TargetRef plus optional artifact kind. Artifact memory is the cut of the memory store keyed to that artifact: memories saved with target_key set, scoped to instance or finer.
TargetRef shape
From @open-matrix/core (referenced by MemoryActor.ts:8 and runtime/AgentEnvironmentSpec.ts:1):
ts
interface TargetRef {
authorityRoot: string; // e.g. COM.NIMBLETEC.RICHARD-SANTOMAURO
logicalMount: string; // e.g. flowpad.page-42
artifactKind?: 'actor' | 'repo' | 'doc' | 'config' | 'mountcomponent' | string;
classRef?: string; // optional class identity (Flowpad.Page)
}A targetKey is the wire-format string derived from a TargetRef (joined with ).
Pinning a memory to an artifact
memory.save accepts:
ts
'memory.save': {
mount: 'string',
content: 'string',
tags: 'string[]?',
targetKey: 'string?',
profileKey: 'string?',
scope: 'string?',
}When targetKey is set, the memory is queryable as artifact memory:
memory.searchwithtargetKey→ only artifact memories.memory.searchTierwithtargetKey→ restricted to that artifact.- The cascade (see retrieval) treats
instanceand finer scopes as artifact-scoped.
Two kinds of artifact memory
- Per-instance memory (
scope: 'instance'). Tied to one concrete actor instance. Twoflowpad.page-42instances on different runtimes are different artifacts. - Per-class memory (
scope: 'class'). Tied to a class of artifact (e.g. allFlowpad.Pageinstances). Useful for "how to handle Flowpad pages" knowledge that should outlive any single instance.
Why this matters
When the model writes a memory like "this page uses German weights for the table column," that memory should attach to the page, not to the agent. Saving with targetKey: <page>, scope: 'instance' gives that pinning. The next session targeting the same page sees the memory; sessions targeting other pages do not.
What artifact memory does NOT cover
- The artifact itself. Memory is about an artifact. The artifact's own state lives in its actor's record store.
- Embeddings of the artifact's content.
EmbeddingServicecan embed arbitrary text but is independent of the artifact-memory pinning. - Cross-artifact relationships. Memories pinned to artifact A are not auto-linked to artifact B. If a "see also" relationship is needed, save a memory with both
targetKeyset to A and a tag mentioning B.
See also
- Project memory — wider-scope memories
- Retrieval
- Memory overview
Source:
projects/matrix-3/packages/agents/src/MemoryActor.ts:79-102(accepts),projects/matrix-3/packages/agents/src/AgentsStore.ts:211-225(saveMemory),projects/matrix-3/packages/agents/src/skills/MemoryCascade.ts(scope cascade).