Memory built from any data source
Ingest chat, business data, and documents. Shape the graph to your domain. Retrieve relevant context in under 200ms.
Memory Built on Context Graphs
Create memories from any source. Zep constructs the graph. Retrieve relevant, token-efficient context.
Any Source
People, things, and how they change.
Automated Context Assembly
Emily prefers cycling to jogging
(Valid: 2024-11-14 — present)
# Observations
Emily's blood pressure ranges 5%
lower after cycling workouts.Memory that understands when things change
When new information contradicts what’s in the graph, Zep invalidates the old fact. Your agent reasons with the latest decisions, traits, and behaviors.
Old facts stay as history. Ask what’s true now, or what was true on any past date.
- Robbie only wears Adidas shoes.
- Robbie strongly favors Adidas shoes.
Reason for return
Additional comments
- Robbie only wears Adidas shoes.
- Robbie strongly favors Adidas shoes.
- Robbie’s Adidas shoes fell apart.
- Robbie is returning their Adidas shoes.
- Robbie is angry about their Adidas shoes.
- Robbie intends to wear Nike shoes.
More accurate. Faster. Fewer tokens.
Agent memory systems often trade one for another. Zep leads on all three.
Memory patterns become Observations
Zep analyses the structure of the graph to surface Observations: patterns, recurrences, and co-occurrences in memory. Your agent gains a global perspective, beyond facts and summaries.
Smart Context Assembly
Zep picks the most valuable memory for the task at hand. Facts, summaries, and Observations selected to fit your token budget.
Smarter than vector search alone, packed into a prompt-ready block.
Token-efficient Context Blocks
Zep returns a prompt-ready Context Block — shaped by your template — to drop into your agent’s prompt.
Built on Graphiti, the open-source Context Graph framework.
Graphiti is the Context Graph framework that builds Zep’s Context Graphs. Open source at the core.
Three Lines of Code
Add memory to your agent in minutes. 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="Jane", role="user", content="I'd like to upgrade my plan...")], return_context=True,) # Add business data to the user's graphclient.graph.add( user_id=user_id, type="json", data=json.dumps({"event": "plan_upgrade", "to": "pro", "mrr": 49}),) # 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: "Jane", role: "user", content: "I'd like to upgrade my plan..." }], returnContext: true,}); // Add business data to the user's graphawait client.graph.add({ userId, type: "json", data: JSON.stringify({ event: "plan_upgrade", to: "pro", mrr: 49 }),}); // 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("Jane"), Role: "user", Content: "I'd like to upgrade my plan..."}, }, ReturnContext: v3.Bool(true), },) // Add business data to the user's graphevent, _ := json.Marshal(map[string]interface{}{"event": "plan_upgrade", "to": "pro", "mrr": 49})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)Customize for your domain
Zep adapts to your business through custom entity types and relationship models. These models enable precise recall of exactly the context your agents need, not generic conversations.
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" )