User summary
Overview
The user summary is a derived narrative that describes the user across conversations. Zep creates the summary from facts and entities in the user’s Context Graph.
Zep stores the summary on the user’s central entity node.
The user summary only exists on user graphs. Standalone graphs do not have user nodes or user summaries.
The summary describes the user from information across the graph. It does not describe only one conversation.
User summary in the Context Block
The default Context Block includes the user summary when both of these conditions are true:
- The account has user summaries enabled.
- The user node has a summary.
The query does not filter the user summary. The other context types appear when Smart Context Assembly selects them.
In the Context Block, the user summary is rendered first, wrapped in <USER_SUMMARY> tags:
Retrieval
The user summary lives on the user’s central entity node. Fetch the node and read its summary field.
When available, thread.get_user_context() includes the summary in the <USER_SUMMARY> section. Use get_node to retrieve the summary directly.
The custom Context Block example shows how to use the summary separately.
Generation
Zep generates and maintains the user summary. You cannot write to it directly.
Zep updates the summary as the user’s graph receives new facts and entities.
Customization
Use user summary instructions to specify what the summary emphasizes. You can configure instructions for a user or for a project.