Skip to main content

Claude Memory Tool (Beta)

Enable Claude to autonomously store and retrieve information across conversations using Anthropic’s native Memory Tool API. Claude decides what to remember and when to recall information.
This feature requires Anthropic Claude models and uses the beta header context-management-2025-06-27.
The user asks across sessions; Claude uses the native memory tool to store and recall facts from /memories/.

How It Works

Quick Start

1

Enable Claude memory

Anthropic models only. Requires beta header context-management-2025-06-27.
2

Run and let Claude persist learnings

Claude checks /memories, stores progress in files, and recalls them in later sessions.

Supported Models

How It Works

The Claude Memory Tool operates client-side with file-based storage:
  1. Tool Definition: Memory tool is added to Claude’s available tools with type memory_20250818
  2. Beta Header: Requests include anthropic-beta: context-management-2025-06-27
  3. Autonomous Usage: Claude decides when to read/write memories
  4. File Storage: Memories stored in .praison/claude_memory/{user_id}/memories/

Memory Commands

Claude can use these commands through the memory tool:

Storage Structure

Configuration

Security Features

  • Path Validation: Prevents directory traversal attacks
  • Size Limits: Configurable max file size and file count
  • User Isolation: Separate storage per user_id
  • Sandboxed: Operations restricted to memory directory

Example: Research Assistant

Difference from FileMemory

API Reference

ClaudeMemoryTool

Best Practices

The memory tool targets Anthropic’s context-management beta. Other models should use file-based or vector memory instead.
Store durable facts in the tool’s memory namespace so view and edit commands stay predictable.
Review what the agent writes to memory during staging — sensitive data should be redacted or excluded.
Use this tool for Claude-native sessions and Advanced Memory when you need cross-model or long-term recall.

See Also

Agent Memory

Zero-dependency file-based memory for all models

Advanced Memory

Multi-tiered memory with quality scoring and graph support