Long-term memory for AI agents. Store conversation history in per-user threads, build a per-user knowledge graph, and pull relevant memory back into LLM prompts for persistent, cross-conversation recall.
What This Integration Enables
The Zep connector exposes the full memory model. Agents manage users, the top-level owners of memory, and threads, the unit that groups conversation messages. Add Messages records a turn and feeds the user's graph; Get Thread Context returns the assembled context block for the prompt; Get Messages returns the raw history. On the graph side, Add Graph Data ingests documents and external knowledge into a user graph or a shared graph, and Search Graph retrieves the most relevant facts or entities for a query. Create Graph builds a shared graph for knowledge many users' agents can search, such as company policies. Get User Node and Get User Graph Episodes let an agent inspect what Zep has learned. This is the memory layer that turns a stateless assistant into one that remembers. Agents typically pair Zep with an LLM provider. A flow records a turn with Add Messages, calls Get Thread Context, and passes the result to [OpenAI](/integrations/openai-ai) or [Anthropic Claude](/integrations/anthropic-ai) so the reply reflects everything Zep knows about the user. Turns can arrive from a channel like [Slack](/integrations/slack) or [Telegram](/integrations/telegram).
Without FlowRunner
With FlowRunner
Use Case Scenarios
An Assistant That Remembers
A support assistant should recall a user across sessions. Each turn, the agent records the message with Add Messages, calls Get Thread Context to retrieve the relevant facts, and passes that context to an LLM. The reply reflects prior conversations without anyone rebuilding history into the prompt. Over time the user's graph grows, and the assistant's answers get more specific to that person.
Shared Company Knowledge
Many agents need the same facts, for example product details and policies. The agent creates a shared graph with Create Graph and ingests reference material with Add Graph Data. Any user's agent can then call Search Graph against the shared graph to pull the exact fact it needs. Shared knowledge lives in one place, searchable independently of any single user.
Honoring A Deletion Request
A user asks to have their data removed. The agent gathers what Delete User would erase, the user's threads, messages, and graph data, and assembles a confirmation summary. It routes that to the owner responsible for the request. Only after approval does it run Delete User, which is permanent.
Human-in-Loop Highlight
Reading memory is safe. Deleting a user erases every thread, message, and graph fact tied to that person, and it cannot be undone. [Human-in-the-loop](/concepts/human-in-the-loop/) is an execution pattern where AI agents pause autonomously, assemble the relevant context and the decision choices available, route to a human via their preferred channel, and resume the moment the human responds. The Zep connector places that pause on Delete User, which is both a data-loss boundary and a privacy one. When a flow reaches a Delete User step, the agent first inspects what the user holds with Get User and a thread listing, then asks the responsible owner through their channel: "This will permanently delete user acct-4821, including 3 threads, all messages, and their knowledge graph. This supports a deletion request. Proceed?" The agent handles recording turns and retrieving context on its own. A person owns the decision to erase a user's memory for good.
Agent Capabilities
18 actionsUsers
6- Add User Create a new user in Zep. A user is the top-level owner of threads and a personal knowledge graph.
- Get User Retrieve a single user by their user ID, including profile fields, metadata, and system timestamps.
- List Users List users in the project with pagination, ordered by creation time.
- Update User Update an existing user email, names, or metadata. Only the fields you provide are changed.
- Delete User Permanently delete a user and all associated threads, messages, and graph data. This cannot be undone.
- Get User Node Retrieve the central graph node that represents a user, including its summary and attributes derived from all ingested data.
Threads
4- Create Thread Create a conversation thread owned by a user. A thread groups conversation messages and replaces the older session concept.
- Get Thread Retrieve a thread metadata and owning user by thread ID.
- List User Threads List all threads that belong to a given user, ordered by creation time.
- Delete Thread Permanently delete a thread and its messages. Graph data already extracted into the user memory is retained. This cannot be undone.
Memory
3- Add Messages Add one or more conversation messages to a thread. Zep ingests them into the user knowledge graph to build retrievable memory. This records a conversation turn.
- Get Thread Context Return a ready-to-inject context block summarizing the most relevant facts, entities, and messages about the user. The flagship retrieval operation for giving an assistant long-term memory.
- Get Messages Retrieve the raw conversation messages stored on a thread, with pagination, in chronological order.
Graph
3- Add Graph Data Add arbitrary data directly to a knowledge graph, bypassing the conversation flow, targeted at a user graph or a shared graph. Use it to ingest documents and external knowledge.
- Search Graph Search a knowledge graph for the most relevant facts or entities given a natural-language query. The core retrieval primitive for pulling targeted memory into a prompt.
- Get User Graph Episodes Retrieve the most recent episodes (raw ingested data chunks) from a user knowledge graph.
Graphs
2- Create Graph Create a shared knowledge graph not tied to a single user, for knowledge used across many users such as company policies or product facts.
- Get Graph Retrieve a shared graph and its metadata by graph ID.
Start building with Zep
$100 in credits. No card required. Connect in minutes.