Skip to documentation
Docs navigation
Docs/remember()
MemoGrafterAgent

remember()

Store an explicit natural-language fact or preference.

What it does

Store an explicit natural-language fact or preference.

When to use it

Use for an explicit fact or preference such as a user choice, constraint, or profile detail.

Signature

TypeScript
remember(text: string, options?: RememberOptions): Promise<void>

Parameters

text (string) — Raw text to analyze and convert into memories.
options? (RememberOptions) — A typed options object. The applicable fields and defaults are documented below.

RememberOptions fields

replace? (boolean, default false) — Clear the current session graph before remembering this text; use with care.
label? (string) — Supply an extraction label.
source? (string, default "remember") — Override the provenance label applied by remember().

Result

The requested identifier or text value.

Behavior

Runs the same extraction pipeline as ingestText() and defaults source to "remember". The text is not stored as a chat message.

Side effects and completion

Creates or queues graph memory in the current session.

Example

example.ts
await agent.remember("My preferred editor is Neovim.");