View Source Anthropic.Tools.Memory (anthropic_community v0.5.0)

Builds the memory server tool definition. Pass the result inside the :tools list to Anthropic.Messages.create/2 — Claude manages a persistent file-based memory store server-side; no client-side execute/1 needed.

Examples

Anthropic.Messages.create(client,
  model: "claude-opus-4-8",
  max_tokens: 1024,
  tools: [Anthropic.Tools.Memory.new()],
  messages: [%{role: "user", content: "Remember that I prefer concise answers."}]
)

Summary

Functions

Options

  • :version (String.t/0) - The tool's versioned type string. Override to pin an older API version. The default value is "memory_20250818".

Functions

@spec new(keyword()) :: map()

Options

  • :version (String.t/0) - The tool's versioned type string. Override to pin an older API version. The default value is "memory_20250818".

  • :cache_control (map/0) - An Anthropic.CacheControl map.