User summary

A baseline description of the user

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:

# This is the user summary
<USER_SUMMARY>
Emily Painter is a user with account ID Emily0e62 who uses digital art tools for creative work...
</USER_SUMMARY>

Retrieval

The user summary lives on the user’s central entity node. Fetch the node and read its summary field.

1from zep_cloud.client import Zep
2
3client = Zep(api_key=API_KEY)
4
5response = client.user.get_node(user_id="emily-painter")
6
7if response.node:
8 print(response.node.summary)

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.