https://github.com/getzep/zep Skip to content Toggle navigation Sign up * Product + Actions Automate any workflow + Packages Host and manage packages + Security Find and fix vulnerabilities + Codespaces Instant dev environments + Copilot Write better code with AI + Code review Manage code changes + Issues Plan and track work + Discussions Collaborate outside of code Explore + All features + Documentation + GitHub Skills + Blog * Solutions For + Enterprise + Teams + Startups + Education By Solution + CI/CD & Automation + DevOps + DevSecOps Resources + Customer Stories + White papers, Ebooks, Webinars + Partners * Open Source + GitHub Sponsors Fund open source developers + The ReadME Project GitHub community articles Repositories + Topics + Trending + Collections * Pricing Search or jump to... Search code, repositories, users, issues, pull requests... Search [ ] Clear Search syntax tips Provide feedback We read every piece of feedback, and take your input very seriously. [ ] [ ] Include my email address so I can be contacted Cancel Submit feedback Saved searches Use saved searches to filter your results more quickly Name [ ] Query [ ] To see all available qualifiers, see our documentation. Cancel Create saved search Sign in Sign up You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session. Dismiss alert {{ message }} getzep / zep Public * Notifications * Fork 141 * Star 1.2k Zep: Fast, scalable building blocks for production LLM apps docs.getzep.com License Apache-2.0 license 1.2k stars 141 forks Activity Star Notifications * Code * Issues 4 * Pull requests 1 * Actions * Security * Insights More * Code * Issues * Pull requests * Actions * Security * Insights getzep/zep This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository. main Switch branches/tags [ ] Branches Tags Could not load branches Nothing to show {{ refName }} default View all branches Could not load tags Nothing to show {{ refName }} default View all tags Name already in use A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch? Cancel Create 2 branches 25 tags Code * Local * Codespaces * Clone HTTPS GitHub CLI [https://github.com/g] Use Git or checkout with SVN using the web URL. [gh repo clone getzep] Work fast with our official CLI. Learn more about the CLI. * Open with GitHub Desktop * Download ZIP Sign In Required Please sign in to use Codespaces. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching GitHub Desktop If nothing happens, download GitHub Desktop and try again. Launching Xcode If nothing happens, download Xcode and try again. Launching Visual Studio Code Your codespace will open once ready. There was a problem preparing your codespace, please try again. Latest commit @danielchalef danielchalef improve messaging (#197) ... 7dc6076 Sep 22, 2023 improve messaging (#197) 7dc6076 Git stats * 191 commits Files Permalink Failed to load latest commit information. Type Name Latest commit message Commit time .github WebUI (#186) September 17, 2023 16:38 assets pngs August 5, 2023 16:20 cmd/zep log webadmin url on startup (#194) September 18, 2023 20:55 config WebUI (#186) September 17, 2023 16:38 docs move apierror to apihandlers package (#192) September 18, 2023 15:24 internal openai passing tests August 14, 2023 11:19 pkg move apierror to apihandlers package (#192) September 18, 2023 15:24 test_data WebUI (#186) September 17, 2023 16:38 .gitignore feat/User; Session Refactor; Test data; more (#170) August 28, 2023 10:19 CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md (#178) September 4, 2023 07:28 CONTRIBUTING.md WebUI (#186) September 17, 2023 16:38 Dockerfile Document VectorStore [?]; Refactoring (#143) August 1, 2023 16:43 Dockerfile.cloud beta cleanup August 7, 2023 21:36 Dockerfile.postgres Postgres build OPTFLAGS="" (#71) May 20, 2023 11:28 LICENSE Initial commit April 29, 2023 07:06 Makefile WebUI (#186) September 17, 2023 16:38 README.md improve messaging (#197) September 22, 2023 09:38 SECURITY.md Create SECURITY.md (#81) May 29, 2023 08:16 cloud_start.sh cloud_start to address render config issues (#79) May 26, 2023 14:24 config.yaml WebUI (#186) September 17, 2023 16:38 docker-compose.yaml persistant db volume (#195) September 21, 2023 12:15 go.mod WebUI (#186) September 17, 2023 16:38 go.sum WebUI (#186) September 17, 2023 16:38 golangci.yaml refactor testutils, exclude from build, modify build/test triggers (# 84) May 31, 2023 16:18 main.go rename module (#30) May 12, 2023 15:30 render.yaml WebUI (#186) September 17, 2023 16:38 zep-deployment.yaml Update zep-deployment.yaml (#118) July 3, 2023 10:55 View code [ ] Zep: Fast, scalable building blocks for LLM apps Chat history memory, embedding, vector search, data enrichment, and more. What is Zep? [?] Core Features Designed for building conversational LLM applications [?][?] Fast, scalable, low-latency APIs and stateless deployments [?] Use as drop-in replacements for LangChain or LlamaIndex components, or with a frameworkless app. Vector Database with Hybrid Search Batteries Included Embedding & Enrichment Learn more Examples Create Users, Chat Sessions, and Chat Messages (Zep Python SDK) Persist Chat History with LangChain.js (Zep TypeScript SDK) Hybrid similarity search over a document collection with text input and JSONPath filters (TypeScript) Create a LlamaIndex Index using Zep as a VectorStore (Python) Search by embedding (Zep Python SDK) Get Started Install Server Install SDK README.md Zep Logo Zep: Fast, scalable building blocks for LLM apps Chat history memory, embedding, vector search, data enrichment, and more. Chat on Discord Twitter Follow PyPI - Downloads @getzep/zep-js build/ test GoLangCI Lint Quick Start | Documentation | LangChain and LlamaIndex Support | Discord www.getzep.com What is Zep? Zep is an open source platform for productionizing LLM apps. Zep summarizes, embeds, and enriches chat histories and documents asynchronously, ensuring these operations don't impact your user's chat experience. Data is persisted to database, allowing you to scale out when growth demands. As drop-in replacements for popular LangChain components, you can get to production in minutes without rewriting code. Zep Demo Video [?] Core Features Designed for building conversational LLM applications * Manage users, sessions, chat messages, chat roles, and more, not just texts and embeddings. * Build autopilots, agents, Q&A over docs apps, chatbots, and more. [?][?] Fast, scalable, low-latency APIs and stateless deployments * Zep's local embedding models and async enrichment ensure a snappy user experience. * Storing documents and history in Zep and not in memory enables stateless deployment. [?] Use as drop-in replacements for LangChain or LlamaIndex components, or with a frameworkless app. * Zep Memory and VectorStore implementations are shipped with LangChain, LangChain.js, and LlamaIndex. * Python & TypeScript/JS SDKs for easy integration with your LLM app. * TypeScript/JS SDK supports edge deployment. Vector Database with Hybrid Search * Populate your prompts with relevant documents and chat history. * Rich metadata and JSONPath query filters offer a powerful hybrid search over texts. Batteries Included Embedding & Enrichment * Automatically embed texts and messages using state-of-the-art open source models, OpenAI, or bring your own vectors. * Enrichment of chat histories with summaries, named entities, token counts. Use these as search filters. * Associate your own metadata with sessions, documents & chat histories. Learn more * [?] Quick Start Guide: Docker or cloud deployment, and coding, in < 5 minutes. * Zep By Example: Learn how to use Zep by example. * Building Apps with LlamaIndex * [?][?] Building Apps with LangChain * [?] Getting Started with TypeScript/JS or Python Examples Create Users, Chat Sessions, and Chat Messages (Zep Python SDK) user_request = CreateUserRequest( user_id=user_id, email="user@example.com", first_name="Jane", last_name="Smith", metadata={"foo": "bar"}, ) new_user = client.user.add(user_request) # create a chat session session_id = uuid.uuid4().hex # A new session identifier session = Session( session_id=session_id, user_id=user_id, metadata={"foo" : "bar"} ) client.memory.add_session(session) # Add a chat message to the session history = [ { role: "human", content: "Who was Octavia Butler?" }, ] messages = [Message(role=m.role, content=m.content) for m in history] memory = Memory(messages=messages) client.memory.add_memory(session_id, memory) # Get all sessions for user_id sessions = client.user.getSessions(user_id) Persist Chat History with LangChain.js (Zep TypeScript SDK) const memory = new ZepMemory({ sessionId, baseURL: zepApiURL, apiKey: zepApiKey, }); const chain = new ConversationChain({ llm: model, memory }); const response = await chain.run( { input="What is the book's relevance to the challenges facing contemporary society?" }, ); Hybrid similarity search over a document collection with text input and JSONPath filters (TypeScript) const query = "Who was Octavia Butler?"; const searchResults = await collection.search({ text: query }, 3); // Search for documents using both text and metadata const metadataQuery = { where: { jsonpath: '$[*] ? (@.genre == "scifi")' }, }; const newSearchResults = await collection.search( { text: query, metadata: metadataQuery, }, 3 ); Create a LlamaIndex Index using Zep as a VectorStore (Python) from llama_index import VectorStoreIndex, SimpleDirectoryReader from llama_index.vector_stores import ZepVectorStore from llama_index.storage.storage_context import StorageContext vector_store = ZepVectorStore( api_url=zep_api_url, api_key=zep_api_key, collection_name=collection_name ) documents = SimpleDirectoryReader("documents/").load_data() storage_context = StorageContext.from_defaults(vector_store=vector_store) index = VectorStoreIndex.from_documents( documents, storage_context=storage_context ) Search by embedding (Zep Python SDK) # Search by embedding vector, rather than text query # embedding is a list of floats results = collection.search( embedding=embedding, limit=5 ) Get Started Install Server Please see the Zep Quick Start Guide for important configuration information. docker compose up Looking for other deployment options? Install SDK Please see the Zep Develoment Guide for important beta information and usage instructions. pip install zep-python or npm i @getzep/zep-js About Zep: Fast, scalable building blocks for production LLM apps docs.getzep.com Topics ai language-model llm vectorsearch langchain llamaindex Resources Readme License Apache-2.0 license Code of conduct Code of conduct Security policy Security policy Activity Stars 1.2k stars Watchers 12 watching Forks 141 forks Report repository Releases 25 v0.12.0 - New Web Admin UI! Latest Sep 19, 2023 + 24 releases Packages 4 Contributors 7 * * * * * * * Languages * Go 78.6% * HTML 13.5% * CSS 6.3% * JavaScript 0.9% * Makefile 0.5% * Shell 0.1% * Dockerfile 0.1% Footer (c) 2023 GitHub, Inc. Footer navigation * Terms * Privacy * Security * Status * Docs * Contact GitHub * Pricing * API * Training * Blog * About You can't perform that action at this time.