Skip to navigation

Zep for Agent Frameworks

Add Context Lake memory and Agent Skills to the frameworks that you use

Zep works with agent frameworks in two ways:

You keep the framework’s orchestration, tools, and runtime in both cases.

Context Lake integrations

Zep integrations for agent frameworks support agent memory, Context Graph search, and context placement. Memory-specific integrations persist conversation turns and retrieve data from a user’s Context Graph. Search tools can also retrieve shared or domain context with graph_id.

Use model-callable search tools or place retrieved context in your provider’s untrusted-data channel.

Keep retrieved context out of privileged instructions

Zep context can include content that your users, documents, or tools supplied. A system or developer message gives that content higher instruction priority than ordinary input. Some convenience integrations use system-message injection. Use direct SDK retrieval or an actual retrieval tool call unless all stored content is application-authored and trusted. Follow Memory security best practices for provider-specific placement.

Build an agent with Zep tools

To build an agent that plans its retrieval and uses several Zep tools, read Build an Agent with Zep. The guide shows how to add domain knowledge, design tools, and evaluate the agent.

If your framework is not listed, use a Zep SDK directly. The quick start guide shows the user, thread, ingestion, and retrieval flow.

Provisioning behavior

Provisioning differs by integration:

  • Each Zep integration package takes the UUIDs that Zep generates. Create the Zep user and thread before the first turn, and store the returned UUIDs in your own database.
  • The AutoGen ZepUserMemory class can create a thread on its first add() call when you do not give a thread_uuid. It does not create the user.
  • Eve and ElevenLabs use SDK patterns instead of a Zep integration package.

Supported frameworks

  • AG2: Zep search tools, plus a trusted-content-only automatic memory loop.
  • AutoGen: Tools for search and data ingestion, plus trusted-content-only memory classes on AutoGen’s Memory interface.
  • CrewAI: Storage adapters and tools so CrewAI agents carry context across executions and share a knowledge base.
  • ElevenLabs: SDK pattern for a custom LLM proxy. The proxy places context in user-level input.
  • Eve: Hooks persist turns. Authored tools retrieve context with graph.getContext.
  • Google ADK: Message persistence and model-callable search tools, plus trusted-content-only instruction injection.
  • LangGraph: Node helpers and a graph-search tool, plus a trusted-content-only pre-model hook.
  • LiveKit: Turn persistence and graph search, plus trusted-content-only instruction injection.
  • Mastra: Processors and tools that add long-term memory to Mastra agents.
  • Microsoft Agent Framework: Turn persistence and a graph-search tool, plus a trusted-content-only context provider.
  • NVIDIA NeMo Agent Toolkit: Trusted-content-only automatic memory for NVIDIA NeMo Agent Toolkit agents.
  • Pydantic AI: Turn persistence and a model-callable graph-search tool, plus trusted-content-only prompt injection.
  • Strands: A Strands MemoryStore with batched extraction and graph search, plus trusted-content-only context injection.
  • Vercel AI SDK: Middleware, helpers, and tools for long-term memory in Vercel AI SDK (v6) applications.

Agent Skills examples

Zep Agent Skills compile a Skill from the verified task runs of an agent. The getzep/zep repository has runnable examples for seven frameworks. Each example records a teacher Trace, waits for Zep to compile a Skill, and runs a student agent that reads the Skill. The framework examples record the Trace from the hooks of the framework. The Pydantic AI harness uploads the Trace events with the Zep SDK. All examples use the same invented banking task. Read Agent Skills examples for the task, the requirements, and the run commands.

Python:

  • Pydantic AI: The full learning loop, with a student run before and after the Skill. The tools, the input models, the database, and the reports use Pydantic models.
  • LangGraph: Trace capture from a LangChain callback handler.
  • Google ADK: Trace capture from a BasePlugin with model and tool callbacks.
  • Claude Agent SDK: Trace capture from the PreToolUse, PostToolUse, and PostToolUseFailure hooks.

TypeScript:

  • Mastra: Trace capture from the onInputAvailable, onOutput, and onStepFinish callbacks.
  • OpenAI Codex SDK: Trace capture from runStreamed events, with the tools on a local stdio MCP server.
  • Eve: Trace capture from the call.requested, call.settled, and content.completed hooks.