Summaries are deprecated. We will be removing this feature in a future release. Please use Facts instead.

A summary for the last or trailing N messages is generated on every new message added to a Session. This is done asynchronously and does not impact the latency of your requests to Zep.

List of Summaries

The first summary is generated after the first N messages are added to a Session.

N is a configurable get memory argument. The default value is 4.

Customizing Summary Generation

Available to Enterprise Plan customers only.

You can customize the contents and format of summaries by providing Custom Instructions when persisting a Memory to a Session.

1custom_instructions = """
2Focus on the user's family and friend relationships.
3Identify life goals and interests.
4Note any standout characteristics or traits about the user.
5"""
6
7result = await client.memory.add(
8 session_id,
9 messages=messages,
10 summary_instruction=custom_instructions
11)

Accessing Summaries

Summaries are added to Memory responses when you retrieve a Session’s Memory. They’re also accessible the Search API and lower-level Session API.