Skip to content

System Prompt

memvault tools include descriptions that guide models to use them correctly. However, adding an explicit instruction to your system prompt produces the most reliable behavior — some models may skip memvault_recall without it.

Always call memvault_recall at the start of each conversation before responding.
Save anything the user tells you about their preferences or context with memvault_remember.

Why this matters

Without the instruction, recall behavior differs by model:

ModelRecalls without instruction
claude-sonnet-4-6✅ Yes (follows tool description)
gpt-5.4⚠️ Sometimes

The tool description already says:

"Call this at the START of every conversation before responding — even if the user hasn't asked."

But a system prompt instruction is more reliable across all models and versions.

Full example

typescript
await anthropic.messages.create({
  model: "claude-sonnet-4-6",
  system: `You are a helpful assistant with persistent memory.
Always call memvault_recall at the start of each conversation before responding.
Save anything the user tells you about their preferences or context with memvault_remember.`,
  tools,
  messages,
})

Released under the MIT License.