$ show getzep/zep
Zep is a long-term memory platform for AI agents, providing integration libraries for multiple agent frameworks (Google ADK, AutoGen, CrewAI, LangGraph, Pydantic AI, Vercel AI SDK, Mastra, LiveKit, Microsoft Agent Framework, Strands, AG2) across Python, TypeScript, and Go. The repository contains the core ingestion pipeline (zep-ingest) for bulk loading documents, Slack exports, emails, transcripts, and fact triples into Zep's temporal knowledge graph, an MCP server for direct graph access, benchmarks (LoCoMo, LongMemEval), and extensive examples. The architecture is a set of client libraries that communicate with the Zep Cloud API (external dependency). Key entry points include integration packages (e.g., zep_adk, zep_autogen), the ingestion pipeline (Pipeline, ingest functions), and the MCP server (cmd/server/main.go). Data flows: user messages are persisted to the Zep graph, context is retrieved and injected into agent prompts via hooks/callbacks or search tools. External dependencies: Zep Cloud API, optional LLM clients (OpenAI, Anthropic) for ingestion transforms and contextualization.
The LLM identified 3 files worth highlighting for reuse:
Defines runtime-checkable protocols (Loader, Transform, Submitter, LLMClient) using Python's typing.Protocol. This enables a clean, pluggable pipeline architecture where any object conforming to the protocol can be used without inheritance. The protocols are minimal and focused, making them easy to implement for custom data sources or transformations. This pattern is reusable for any data ingestion or ETL system.
Implements the pin-or-expose pattern for Zep search tools, allowing tool parameters (scope, reranker, limit, etc.) to be pinned (fixed value, hidden from model), hidden (omitted, using Zep defaults), or exposed (model-choosable with documented defaults). Includes auto-scope reranker handling, result formatting per scope, and exhaustive switch with never guard. This pattern is reusable for any tool that needs fine-grained control over which parameters the LLM can set.
LimitGuard transform that enforces character limits (e.g., 10k for graph data) with smart splitting for different content types: text (paragraph-aware), message (truncate), JSON (split at valid boundaries), and other (hard split). Logs lengths without PII. This is a reusable component for any pipeline that needs to enforce API size constraints while preserving content structure.