We're hiring! Come build with us →
Zep
Agent Memory

Agent memory from multiple sources

Combine conversations, business data, and user activity into context that agents can retrieve for later tasks.

Start Building
Teams that use Zep
Fortune 500 Tech Co.
Twin Health
Praktika.ai
Thrive AI Health
AGI Inc
Zscaler
Quorum
Nasdaq-100 Tech Company

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

Business data
Documents
Conversations

Facts, and how they change over time

Context for the task

context_response.py
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.

PPriya Shah · Acme ITSlack · 2026-01-14 · 10:02
We're standardised on Okta. Every new tool has to go through it for SSO.
Facts
  • Acme uses Okta as its identity provider.
  • Every new tool must use Okta for SSO.
zendesk.com/agent/tickets/48219
ZendeskTicket #48219 · Acme Corp · 2026-03-09

Category

SSO / Identity

Description

We're migrating from Okta to Microsoft Entra ID this quarter. SSO has to move before our Oct 31 renewal, or the rollout stays blocked.
Facts
  • 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.

LoCoMo
94.7%accuracy
Retrieval latency
155 ms
Context size
5,760 tokens
LongMemEval
90.2%accuracy
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.

Feb 10, 2026

Acme expanded to Finance (+120 seats).

+18d after pilot
Apr 22, 2026

Acme expanded to Operations (+300 seats).

+12d after pilot
Jul 8, 2026

Acme expanded to Legal (+80 seats).

+20d after pilot

Only 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.

8 candidates · ranked for task
ObsAcme expands 3 wks after each pilot.
FactCustomer since Mar 2023.
FactRenewal: Oct 31, 2026.
FactContract billed annually.
SumRecent tickets: SSO move to Entra ID.
SumLast QBR: Jul 2026.
ObsEscalations follow IdP changes.
FactAdmin: Priya Shah (IT).
↓
Context block1,847 / 2,000
ObsAcme expands 3 wks after each pilot.
FactRenewal: Oct 31, 2026.
SumRecent tickets: SSO move to Entra ID.
ObsEscalations follow IdP changes.

Context Blocks for agent prompts

Shape Context Blocks with templates, then add them to your agent’s prompt.

Your template
<USER_SUMMARY>
  {{ user_summary }}
</USER_SUMMARY>
<OBSERVATIONS>
  {{ observations }}
</OBSERVATIONS>
<FACTS>
  {{ facts }}
</FACTS>
Context block
<USER_SUMMARY>
  Acme Corp. Enterprise, 1,500 seats.
</USER_SUMMARY>
<OBSERVATIONS>
  — Expands within 3 wks of a pilot.
  — Escalations follow IdP changes.
</OBSERVATIONS>
<FACTS>
  — Renews Oct 31, billed annually.
  — SSO moving: Okta to Entra ID.
  — Last ticket: SAML config.
</FACTS>
Powered by Open Source

Powered by Graphiti, open source

Graphiti is Zep’s open-source framework for constructing Context Graphs.

GitHub stars on getzep/graphiti

Apache 2.0 · Originated by Zep

View on GitHub

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.

quickstart.py
# 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)

Define entities and relationships

Define entity and relationship types that reflect your business, so Zep organizes context around your domain.

sales_entities.py
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"    )

Add memory to your agent

Use Zep’s unified context layer to implement agent memory. Learn about the Context Lake

Start Building