
Agent memory from multiple sources
Combine conversations, business data, and user activity into context that agents can retrieve for later tasks.
One Context Graph per user
Zep combines information from multiple sources into Context Graphs. Agents retrieve context from these graphs for later tasks.
Any Source
Facts, and how they change over time
Context for the task
Account: Acme
Renewal: October 31
SSO setup is blocked.
Confirm SSO setup
before renewal.Understand what changed and what is true now
When new information contradicts a fact in the graph, Zep invalidates the old fact and keeps it as history.
Agents reason with what is true now, or with what was true on any past date.
- Acme uses Okta as its identity provider.
- Every new tool must use Okta for SSO.
Category
Description
- Every new tool must use Okta for SSO.
- Acme is migrating to Microsoft Entra ID.
- Acme’s SSO must move to Entra ID before renewal.
- Acme renews on Oct 31.
- Acme’s rollout is blocked until SSO moves.
More accurate. Faster. Fewer tokens
Agent context and memory systems often trade accuracy, latency, and token use against each other. Zep leads on all three.
- Retrieval latency
- 155 ms
- Context size
- 5,760 tokens
- Retrieval latency
- 162 ms
- Context size
- 4,408 tokens
Identify patterns in context
Zep records patterns across your data as Observations, giving agents context beyond individual facts and summaries.
Acme has expanded within three weeks of each of the last three team pilots.
Acme expanded to Finance (+120 seats).
+18d after pilotAcme expanded to Operations (+300 seats).
+12d after pilotAcme expanded to Legal (+80 seats).
+20d after pilotOnly what the task needs
Zep selects relevant facts, summaries, and Observations for each task, within your token budget.
Zep uses relationships in the graph as well as semantic similarity to select context.
Context Blocks for agent prompts
Shape Context Blocks with templates, then add them to your agent’s prompt.
Powered by Graphiti, open source
Graphiti is Zep’s open-source framework for constructing Context Graphs.
Use the Zep API
Use the Zep API to add business data and conversations, then retrieve context for your agents. Works with any agent framework, or none.
# Add messages and get context in one callresponse = client.thread.add_messages( thread_id=thread_id, messages=[Message(name="Priya Shah", role="user", content="We're moving from Okta to Entra ID.")], return_context=True,) # Add a support ticket to the user's graphclient.graph.add( user_id=user_id, type="json", data=json.dumps({"ticket": "48219", "category": "SSO / Identity", "account": "Acme Corp"}),) # Get relevant contextuser_context = client.thread.get_user_context(thread_id=thread_id)// Add messages and get context in one callconst response = await client.thread.addMessages(threadId, { messages: [{ name: "Priya Shah", role: "user", content: "We're moving from Okta to Entra ID." }], returnContext: true,}); // Add a support ticket to the user's graphawait client.graph.add({ userId, type: "json", data: JSON.stringify({ ticket: "48219", category: "SSO / Identity", account: "Acme Corp" }),}); // Get relevant contextconst userContext = await client.thread.getUserContext(threadId);// Add messages and get context in one callresp, _ := client.Thread.AddMessages(context.TODO(), threadID, &v3.AddThreadMessagesRequest{ Messages: []*v3.Message{ {Name: v3.String("Priya Shah"), Role: "user", Content: "We're moving from Okta to Entra ID."}, }, ReturnContext: v3.Bool(true), },) // Add a support ticket to the user's graphevent, _ := json.Marshal(map[string]interface{}{ "ticket": "48219", "category": "SSO / Identity", "account": "Acme Corp"})client.Graph.Add(context.TODO(), &v3.AddDataRequest{ UserID: &userID, Type: v3.GraphDataTypeJSON, Data: string(event),}) // Get relevant contextuserContext, _ := client.Thread.GetUserContext(context.TODO(), threadID, nil)Define entities and relationships
Define entity and relationship types that reflect your business, so Zep organizes context around your domain.
class Lead(EntityModel): """Represents a sales lead or prospect.""" company_size = Field( description="startup, SMB, mid-market, enterprise" ) budget_range = Field( description="Budget discussed or indicated" ) decision_timeline = Field( description="Expected decision timeframe" )class SupportCase(EntityModel): """Represents a customer support case.""" severity = Field( description="critical, high, medium, low" ) category = Field( description="technical, billing, feature request" ) resolution_status = Field( description="open, resolved, escalated" )class BrandPreference(EntityModel): """Represents a customer's brand preference.""" brand_name = Field( description="Name of preferred brand" ) preference_strength = Field( description="strong, moderate, weak" ) purchase_frequency = Field( description="frequent, occasional, rare" )class LearningGoal(EntityModel): """Represents a student's learning goal.""" goal_description = Field( description="What the student wants to learn" ) target_timeline = Field( description="short-term, medium-term, long-term" ) progress_status = Field( description="not started, in progress, completed" )class MedicalCondition(EntityModel): """Represents a medical condition.""" condition_type = Field( description="chronic, acute, preventive" ) severity = Field( description="mild, moderate, severe" ) treatment_status = Field( description="active, monitoring, resolved" )
Add memory to your agent
Use Zep’s unified context layer to implement agent memory. Learn about the Context Lake