Agent Memory with Zep
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.
Feature | Description |
---|---|
💬 Capture Detailed Conversational Context | Zep's Knowledge Graph-based memory captures episodic, semantic, and temporal contexts |
🗄️ Business Data is Context, too | Zep is able to extract facts from JSON and unstructured text as well |
⚙️ Tailor For Your Business | Fact Ratings and other tools allow you to fine-tune retrieval for your use case |
⚡️ Instant Memory Retrieval | Retrieve relevant facts in under 100ms |
🔐 Compliance & Security | User Privacy Management, SOC 2 Type II certification, and other controls |
🖼️ Framework Agnostic & Future-Proof | Use with AutoGen or any other framework, current or future |
How Zep works
- Add chat messages or data artifacts to Zep during each user interaction or agent event.
- Zep intelligently integrates new information into the user's (or groups of users) Knowledge Graph, updating existing context as needed.
- 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
-
Sign up for Zep Cloud and create a Project API Key.
-
Install one of the Zep Python, TypeScript or Go SDKs. Python instructions shown below.
pip install zep-cloud
- 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,
)
- 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.