User Summary Instructions
Get started with the example in the video using:
Overview
User summary instructions customize how Zep generates the entity summary for each user in their knowledge graph. You can create up to 5 custom instructions per user, set of users, or project-wide. Each instruction consists of a name (unique identifier) and text (the instruction content, maximum 100 characters).
User summary and the user node
Each user has a single unique user node in their graph representing the user themselves. The user summary generated from these instructions lives on this user node. You can retrieve the user node and its summary using the get_node method shown in the SDK reference.
Default instructions
Zep applies the following default instructions to generate user summaries when no custom instructions are specified:
- What are the user’s key personal and lifestyle details?
- What are the user’s important relationships or social connections?
- What does the user do for work, study, or main pursuits?
- What are the user’s preferences, values, and recurring goals?
- What procedural or interaction instructions has the user given for how the AI should assist them?
These default instructions ensure comprehensive user summaries that capture essential information across personal, professional, and interaction contexts.
Custom instructions
Instructions are managed through dedicated methods that allow you to add, list, and delete them. You can apply instructions to specific users by providing user IDs, or set them as project-wide defaults by omitting user IDs.
Best practices for writing instructions: Instructions should be focused and specific, designed to elicit responses that can be answered in a sentence or two. Phrasing instructions as questions is often an effective way to get accurate and succinct responses.
User summary instructions do not apply when using graph.add_batch() or thread.add_messages_batch().
Utilizing user summary
User summaries are automatically included in Zep’s Context Block. You can toggle whether the user summary is included in the Context Block on the Projects page of the web app. Accounts created before November 10, 2025 will need to enable this setting manually, while new accounts have it enabled by default.
Alternatively, you can build a custom context block by retrieving the user node and including its summary. See this example for a complete implementation.