~/.nuggets/graph/graph.json and is shared across all nuggets in the same saveDir. All types below are exported from src/nuggets/graph.ts and re-exported through src/nuggets/index.ts.
MemoryNote
The primary record type. Every fact and free-form note in the graph is aMemoryNote.
Globally unique identifier in the form
fact-<nuggetName>-<8-char-uuid> or note-<nuggetName>-<8-char-uuid>.Name of the nugget that owns this note. Immutable after creation.
Human-readable title. For fact-kind notes this is the fact key.
Note body or fact value. Whitespace is normalised on write.
Lower-cased, hyphenated tags. Always includes
<nuggetName>, scope:<scope>, and type:<type> system tags.FHRR vector specification used for similarity search. See
NoteVectorSpec.true when the note has been soft-deleted. Hidden notes are excluded from search and listNotes by default."fact" for notes mirrored from the FHRR fact store. "note" for free-form notes created with createNote.The original fact key for fact-kind notes.
undefined for free-form notes.Number of times this note has been recalled across distinct sessions.
Session ID of the most recent hit. Empty string if never recalled.
ISO 8601 timestamp of when the note was first created.
ISO 8601 timestamp of the most recent write.
ISO 8601 timestamp of the most recent read or recall.
ISO 8601 timestamp of the most recent reflection rewrite, if any.
ISO 8601 timestamp set when the note is soft-deleted.
undefined while the note is visible.MemoryNote extends NoteMetadata, so every note also carries subject, scope, type, source, confidence, and stability.
NoteMetadata
Semantic metadata attached to every note and inferred automatically from the key, content, and tags when not supplied explicitly.Semantic owner of this memory. Common values:
"user:primary", "assistant:self", "shared:project", "session:current".Visibility scope. See
MemoryScope.Categorisation of what kind of memory this is. See
MemoryType.How this memory was acquired. See
MemorySource.Degree of certainty in the content, in the range
[0, 1]. Clamped to valid range on write.Whether the memory is expected to persist across sessions. See
MemoryStability.MemoryScope
| Value | Meaning |
|---|---|
"self" | Belongs to the assistant’s own model or persona. |
"user" | Belongs to the primary user (preferences, personal details). |
"shared" | Shared between assistant and user, or cross-cutting context. |
"project" | Scoped to the current repository or project. |
"session" | Temporary, valid only for the current session. |
MemoryType
| Value | Meaning |
|---|---|
"fact" | A short key-value fact from the FHRR store. |
"note" | A free-form note created with createNote. |
"preference" | A user or assistant preference. |
"reflection" | A note generated during a reflection pass. |
"self_model" | Information about the assistant’s own behaviour or identity. |
"project" | Project-level context such as architecture or conventions. |
"relationship" | A relationship between two entities. |
"style" | A style guideline or coding convention. |
MemorySource
| Value | Meaning |
|---|---|
"explicit_user" | The user directly stated this information. |
"agent_reflection" | The agent derived this during a reflection pass. |
"tool_observation" | Observed from a tool call (file reads, edits, etc.). |
"inferred" | Inferred from context, lower confidence. |
"system" | Injected by the system or infrastructure. |
MemoryStability
| Value | Meaning |
|---|---|
"temporary" | Expected to expire or become irrelevant after the current session. Used automatically for session-scoped notes and keys prefixed with _, tmp, or scratch. |
"durable" | Expected to remain relevant across sessions. The default for most notes. |
NoteLink
A directed link from one note to another, stored on both endpoints when created throughaddLink.
ID of the target note.
Human-readable description of the relationship.
ISO 8601 timestamp of when the link was created.
NoteVectorSpec
The FHRR vector representation of a note, stored in the graph and used for semantic similarity search.Numeric seed derived from the basis string length. Used as a quick identity hash.
Up to 20 string tokens representing the note’s semantic basis (title tokens, content tokens, tag tokens, link tokens, and metadata tokens such as
kind:fact or scope:user). The vector is reconstructed from these tokens on demand.GraphNoteMetaInput
Input type for supplying optional metadata when creating or updating notes. Any field you omit is inferred automatically.Override the inferred subject.
Override the inferred scope.
Override the inferred memory type.
Override the inferred source.
Override the inferred confidence. Clamped to
[0, 1].Override the inferred stability.
NoteFilterOptions
Filter options accepted bylistNotes and searchNotes.
When
true, soft-deleted (hidden) notes are included in the results.Return only notes whose
subject exactly matches this string.Return only notes with this scope.
Return only notes of this type.
SearchNotesResult
A single result item returned bysearchNotes.
The matching note.
Combined relevance score after softmax re-ranking. Range
[0, 1]. Results are sorted by this value descending.Cosine similarity contribution from the FHRR vector, normalised to
[0, 1]. Weighted at 42% of the final score.Text overlap contribution. Based on exact phrase match and token overlap against title, content, tags, subject, scope, and type. Weighted at 48% of the final score.