Database
Zep Memory Tools
Examples
- Introduction
- Getting Started
- Agents
- Teams
- Workflows
- Applications
Agent Concepts
- Multimodal
- RAG
- Knowledge
- Memory
- Async
- Hybrid Search
- Storage
- Tools
- Search
- Social
- Web Scraping
- Database
- Local
- APIs & External Services
- Vector Databases
- Context
- Embedders
- Agent State
Models
- Anthropic
- AWS Bedrock
- AWS Bedrock Claude
- Azure AI Foundry
- Azure OpenAI
- Cerebras
- Cerebras OpenAI
- Cohere
- DeepInfra
- DeepSeek
- Fireworks
- Gemini
- Groq
- Hugging Face
- Meta
- Mistral
- NVIDIA
- Ollama
- OpenAI
- Perplexity
- Together
- xAI
- IBM
- LM Studio
- LiteLLM
- LiteLLM OpenAI
Database
Zep Memory Tools
Code
cookbook/tools/zep_tools.py
import time
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.tools.zep import ZepTools
# Initialize the ZepTools
zep_tools = ZepTools(user_id="agno", session_id="agno-session", add_instructions=True)
# Initialize the Agent
agent = Agent(
model=OpenAIChat(),
tools=[zep_tools],
context={"memory": zep_tools.get_zep_memory(memory_type="context")},
add_context=True,
)
# Interact with the Agent so that it can learn about the user
agent.print_response("My name is John Billings")
agent.print_response("I live in NYC")
agent.print_response("I'm going to a concert tomorrow")
# Allow the memories to sync with Zep database
time.sleep(10)
# Refresh the context
agent.context["memory"] = zep_tools.get_zep_memory(memory_type="context")
# Ask the Agent about the user
agent.print_response("What do you know about me?")
Usage
1
Create a virtual environment
Open the Terminal
and create a python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
2
Set your API keys
export OPENAI_API_KEY=xxx
export ZEP_API_KEY=xxx
3
Install libraries
pip install -U zep-cloud openai agno
4
Run Agent
python cookbook/tools/zep_tools.py