Zep
Long-term memory and context platform for AI assistants. Two separate PyPI packages: zep-cloud (managed platform) and zep-python (OSS/Community Edition). Not interchangeable. zep-python v2.x main branch now ships the Cloud SDK — OSS users need the oss branch build.
Warnings
- breaking zep-cloud and zep-python are separate packages with incompatible client classes and different APIs. Installing the wrong one silently fails at runtime.
- breaking zep-python v2.x main branch is now the Cloud SDK, not the OSS client. pip install zep-python installs the Cloud-flavoured SDK, breaking self-hosted setups.
- breaking Message field changed from 'role' to 'role_type' in zep-cloud SDK. Passing 'role' is silently ignored or raises a validation error.
- gotcha Self-hosted Zep requires a running server process. pip install zep-python alone gives only a client library. All calls raise ConnectionError without the server running.
- gotcha LangChain integration classes (ZepChatMessageHistory, ZepVectorStore) moved from langchain-community into the zep-cloud package. Importing from langchain_community.memory.zep fails on newer installs.
Install
-
pip install zep-cloud -
pip install zep-python
Imports
- Zep
from zep_cloud.client import Zep
- ZepClient
from zep.client import ZepClient
Quickstart
from zep_cloud.client import Zep
client = Zep(api_key="your-zep-api-key")
client.memory.add(
"session_abc",
messages=[
{"role_type": "user", "content": "My name is Alice."},
{"role_type": "assistant", "content": "Nice to meet you, Alice."}
]
)
memory = client.memory.get("session_abc")
print(memory.context)