The User Memory Store captures unstructured observations about users: preferences, behaviors, and context that don’t fit into structured profile fields.
The agent receives a tool to manage memories explicitly.
from agno.learn import LearningMachine, LearningMode, UserMemoryConfigagent = Agent( model=OpenAIResponses(id="gpt-5.2"), db=db, learning=LearningMachine( user_memory=UserMemoryConfig(mode=LearningMode.AGENTIC), ),)agent.print_response( "Remember that I always want to see error handling in code examples.", user_id="alice@example.com",)
Available tool: update_user_memory (supports add, update, and delete operations). Clearing all memories requires enable_clear_memories=True.The tradeoff is that the agent may miss implicit observations.
lm = agent.learning_machine# Get all memoriesmemories = lm.user_memory_store.get(user_id="alice@example.com")if memories: for memory in memories.memories: print(f"- {memory.get('content')}")# Debug outputlm.user_memory_store.print(user_id="alice@example.com")
Relevant memories are injected into the system prompt:
<user_memory>- Prefers code examples over explanations- Working on a machine learning project- Uses Python 3.11- Prefers concise responses</user_memory>
The Curator does not work with the User Memory Store in v2.7.2. lm.curator.prune() and lm.curator.deduplicate() read the User Profile store, which has no memories field, so both calls return 0 without removing any user memories. To remove memories, use the agentic update_user_memory tool, which supports delete operations.