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.
from praisonaiagents import Agent# Enable Claude memory (Anthropic models only)agent = Agent( name="Research Assistant", llm="anthropic/claude-sonnet-4-20250514", memory={"claude_memory": True})# Claude will automatically:# 1. Check /memories directory before tasks# 2. Store progress/learnings in files# 3. Reference memories in future conversationsresult = agent.start("Research AI trends and remember key findings")
from praisonaiagents import Agentagent = Agent( name="Research Assistant", role="AI Researcher", goal="Research topics and build knowledge over time", llm="anthropic/claude-sonnet-4-20250514", memory={ "claude_memory": True, "user_id": "researcher_001" })# First session - research and store findingsresult1 = agent.start("""Research the latest developments in AI agents.Store key findings in your memory for future reference.""")# Later session - recall and build upon previous researchresult2 = agent.start("""What did we learn about AI agents previously?Now research how memory systems are implemented.""")