Agent memory
An agent can fail a later task when it cannot retrieve information from previous conversations, user activity, or changes in preferences. Agent memory keeps this user-owned context in a temporal Context Graph.
User and thread model
A Zep user owns a user Context Graph. Threads group conversations for that user. Messages and user business data become episodes in the graph.
Use:
user_idfor context that belongs to one application user.thread_idfor a conversation or workflow that belongs to that user.thread.get_user_contextto retrieve a Context Block for the next model request.
Implementation path
Create a thread and add messages
Use a stable thread_id for the conversation. Add each user and assistant message after the application receives or produces it.
Start with the Agent memory quickstart. Then read Memory security best practices for provider-specific placement rules.
Boundaries
Agent memory provides context from prior interactions and activity. Agent memory does not guarantee model behavior or authorize an external action. Your application must control tool permissions and action authorization.