The --claude-memory flag enables Anthropicโs native memory tool for Claude models, allowing the agent to store and retrieve information across conversations.
Quick Start
praisonai "Research and remember findings" --claude-memory --llm anthropic/claude-sonnet-4-20250514
Basic Usage
praisonai "Research and remember findings" --claude-memory --llm anthropic/claude-sonnet-4-20250514
Expected Output:
๐ง Claude Memory Tool enabled
โญโ Agent Info โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ ๐ค Agent: DirectAgent โ
โ Role: Assistant โ
โ Model: anthropic/claude-sonnet-4-20250514 โ
โ Memory: Claude Memory Tool โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ Response โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ I've researched the topic and stored the key findings in memory: โ
โ โ
โ ๐ Stored: "AI trends 2025 - multimodal systems, agent architectures" โ
โ ๐ Stored: "Key players: OpenAI, Anthropic, Google, Meta" โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Combine with Other Flags
# Claude memory with planning
praisonai "Research and summarize" --claude-memory --planning --llm anthropic/claude-sonnet-4-20250514
# Claude memory with metrics
praisonai "Analyze and remember" --claude-memory --metrics --llm anthropic/claude-sonnet-4-20250514
Requirements
Claude Memory Tool requires an Anthropic model. It will not work with other providers.
| Requirement | Value |
|---|
| Provider | Anthropic only |
| Models | claude-sonnet-4-20250514, claude-3-opus, claude-3-sonnet, claude-3-haiku |
| API Key | ANTHROPIC_API_KEY environment variable |
How It Works
- Enable: The
--claude-memory flag activates Anthropicโs native memory tool
- Store: Claude can store information using the memory tool
- Retrieve: Claude can retrieve stored information in future conversations
- Persist: Memory persists across conversation sessions
Comparison with Other Memory Options
| Feature | --claude-memory | --memory | --auto-memory |
|---|
| Provider | Anthropic only | Any | Any |
| Storage | Anthropic managed | Local file | Local file |
| Control | Claude decides | Agent extracts | Auto-extraction |
| Persistence | Anthropic servers | Local storage | Local storage |
Examples
Research Task
praisonai "Research quantum computing advances and remember key breakthroughs" \
--claude-memory --llm anthropic/claude-sonnet-4-20250514
Learning Session
praisonai "Teach me about machine learning, remember what I've learned" \
--claude-memory --llm anthropic/claude-sonnet-4-20250514
Project Context
praisonai "Remember the project requirements: REST API with auth, PostgreSQL, Docker" \
--claude-memory --llm anthropic/claude-sonnet-4-20250514
Programmatic Usage
from praisonaiagents import Agent
agent = Agent(
instructions="You are a research assistant that remembers findings",
llm="anthropic/claude-sonnet-4-20250514",
claude_memory=True # Enable Claude Memory Tool
)
result = agent.start("Research AI trends and remember key findings")
Best Practices
Use Claude Memory Tool for tasks where you want Claude to decide what to remember.
Claude Memory Tool data is stored on Anthropicโs servers. For sensitive data, use local --memory instead.
| Use Claude Memory For | Use Local Memory For |
|---|
| General research | Sensitive data |
| Learning sessions | Offline usage |
| Project context | Custom storage |
| Cross-session recall | User isolation |