Skip to main content

Agent Memory with Zep

Zep logo

Zep is a long-term memory service for agentic applications used by both startups and enterprises. With Zep, you can build personalized, accurate, and production-ready agent applications.

Zep's memory continuously learns facts from interactions with users and your changing business data. With just two API calls, you can persist chat history to Zep and recall facts relevant to the state of your agent.

Zep is powered by a temporal Knowledge Graph that allows reasoning with facts as they change. A combination of semantic and graph search enables accurate and low-latency fact retrieval.

Sign up for Zep Cloud or visit the Zep Community Edition Repo.

FeatureDescription
💬 Capture Detailed Conversational ContextZep's Knowledge Graph-based memory captures episodic, semantic, and temporal contexts
🗄️ Business Data is Context, tooZep is able to extract facts from JSON and unstructured text as well
⚙️ Tailor For Your BusinessFact Ratings and other tools allow you to fine-tune retrieval for your use case
⚡️ Instant Memory RetrievalRetrieve relevant facts in under 100ms
🔐 Compliance & SecurityUser Privacy Management, SOC 2 Type II certification, and other controls
🖼️ Framework Agnostic & Future-ProofUse with AutoGen or any other framework, current or future
Zep Community Edition Walkthrough
User Chat Session and Facts
Implementing Fact Ratings

How Zep works

  1. Add chat messages or data artifacts to Zep during each user interaction or agent event.
  2. Zep intelligently integrates new information into the user's (or groups of users) Knowledge Graph, updating existing context as needed.
  3. Retrieve relevant facts from Zep for subsequent interactions or events.

Zep's temporal Knowledge Graph maintains contextual information about facts, enabling reasoning about state changes and providing data provenance insights. Each fact includes valid_at and invalid_at dates, allowing agents to track changes in user preferences, traits, or environment.

Zep is fast

Retrieving facts is simple and very fast. Unlike other memory solutions, Zep does not use agents to ensure facts are relevant. It precomputes facts, entity summaries, and other artifacts asynchronously. For on-premise use, retrieval speed primarily depends on your embedding service's performance.

Zep supports many types of data

You can add a variety of data artifacts to Zep:

  • Adding chat history messages.
  • Ingestion of JSON and unstructured text.

Zep supports chat session, user, and group-level graphs. Group graphs allow for capturing organizational knowledge.

Getting Started

Zep Cloud

  1. Sign up for Zep Cloud and create a Project API Key.

  2. Install one of the Zep Python, TypeScript or Go SDKs. Python instructions shown below.

pip install zep-cloud
  1. Initialize a client
import os
from zep_cloud.client import AsyncZep

API_KEY = os.environ.get('ZEP_API_KEY')
client = AsyncZep(
api_key=API_KEY,
)
  1. Review the Zep and Autogen notebook example for agent-building best practices.

Zep Community Edition

Follow the Getting Started guide or visit the GitHub Repo.

Autogen + Zep examples