{"id":15303893,"url":"https://github.com/getzep/graphiti","last_synced_at":"2026-02-11T16:03:34.343Z","repository":{"id":255058982,"uuid":"840056306","full_name":"getzep/graphiti","owner":"getzep","description":"Build Real-Time Knowledge Graphs for AI Agents","archived":false,"fork":false,"pushed_at":"2025-05-08T22:26:06.000Z","size":8136,"stargazers_count":8335,"open_issues_count":34,"forks_count":559,"subscribers_count":52,"default_branch":"main","last_synced_at":"2025-05-09T00:59:12.888Z","etag":null,"topics":["agents","graph","llms","rag"],"latest_commit_sha":null,"homepage":"https://help.getzep.com/graphiti","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/getzep.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-08-08T22:08:30.000Z","updated_at":"2025-05-08T23:58:22.000Z","dependencies_parsed_at":"2024-11-04T16:31:39.474Z","dependency_job_id":"9be8f222-9aa8-4e7f-9da9-ce1243d1d1e5","html_url":"https://github.com/getzep/graphiti","commit_stats":{"total_commits":212,"total_committers":6,"mean_commits":"35.333333333333336","dds":0.6367924528301887,"last_synced_commit":"77cb67cdfea7a080f217236b56f8ca39b25ca0e4"},"previous_names":["getzep/graphiti"],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getzep%2Fgraphiti","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getzep%2Fgraphiti/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getzep%2Fgraphiti/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/getzep%2Fgraphiti/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/getzep","download_url":"https://codeload.github.com/getzep/graphiti/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254448578,"owners_count":22072764,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agents","graph","llms","rag"],"created_at":"2024-10-01T07:01:09.004Z","updated_at":"2026-01-17T14:55:23.877Z","avatar_url":"https://github.com/getzep.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.getzep.com/\"\u003e\n    \u003cimg src=\"https://github.com/user-attachments/assets/119c5682-9654-4257-8922-56b7cb8ffd73\" width=\"150\" alt=\"Zep Logo\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003e\nGraphiti\n\u003c/h1\u003e\n\u003ch2 align=\"center\"\u003e Build Real-Time Knowledge Graphs for AI Agents\u003c/h2\u003e\n\u003cdiv align=\"center\"\u003e\n\n[![Lint](https://github.com/getzep/Graphiti/actions/workflows/lint.yml/badge.svg?style=flat)](https://github.com/getzep/Graphiti/actions/workflows/lint.yml)\n[![Unit Tests](https://github.com/getzep/Graphiti/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/getzep/Graphiti/actions/workflows/unit_tests.yml)\n[![MyPy Check](https://github.com/getzep/Graphiti/actions/workflows/typecheck.yml/badge.svg)](https://github.com/getzep/Graphiti/actions/workflows/typecheck.yml)\n\n![GitHub Repo stars](https://img.shields.io/github/stars/getzep/graphiti)\n[![Discord](https://img.shields.io/badge/Discord-%235865F2.svg?\u0026logo=discord\u0026logoColor=white)](https://discord.com/invite/W8Kw6bsgXQ)\n[![arXiv](https://img.shields.io/badge/arXiv-2501.13956-b31b1b.svg?style=flat)](https://arxiv.org/abs/2501.13956)\n[![Release](https://img.shields.io/github/v/release/getzep/graphiti?style=flat\u0026label=Release\u0026color=limegreen)](https://github.com/getzep/graphiti/releases)\n\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\n\u003ca href=\"https://trendshift.io/repositories/12986\" target=\"_blank\"\u003e\u003cimg src=\"https://trendshift.io/api/badge/repositories/12986\" alt=\"getzep%2Fgraphiti | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"/\u003e\u003c/a\u003e\n\n\u003c/div\u003e\n\n:star: _Help us reach more developers and grow the Graphiti community. Star this repo!_\n\n\u003cbr /\u003e\n\n\u003e [!TIP]\n\u003e Check out the new [MCP server for Graphiti](mcp_server/README.md)! Give Claude, Cursor, and other MCP clients powerful\n\u003e Knowledge Graph-based memory.\n\nGraphiti is a framework for building and querying temporally-aware knowledge graphs, specifically tailored for AI agents\noperating in dynamic environments. Unlike traditional retrieval-augmented generation (RAG) methods, Graphiti\ncontinuously integrates user interactions, structured and unstructured enterprise data, and external information into a\ncoherent, queryable graph. The framework supports incremental data updates, efficient retrieval, and precise historical\nqueries without requiring complete graph recomputation, making it suitable for developing interactive, context-aware AI\napplications.\n\nUse Graphiti to:\n\n- Integrate and maintain dynamic user interactions and business data.\n- Facilitate state-based reasoning and task automation for agents.\n- Query complex, evolving data with semantic, keyword, and graph-based search methods.\n\n\u003cbr /\u003e\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"images/graphiti-graph-intro.gif\" alt=\"Graphiti temporal walkthrough\" width=\"700px\"\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\nA knowledge graph is a network of interconnected facts, such as _\"Kendra loves Adidas shoes.\"_ Each fact is a \"triplet\"\nrepresented by two entities, or\nnodes (\"Kendra\", \"Adidas shoes\"), and their relationship, or edge (\"loves\"). Knowledge Graphs have been explored\nextensively for information retrieval. What makes Graphiti unique is its ability to autonomously build a knowledge graph\nwhile handling changing relationships and maintaining historical context.\n\n## Graphiti and Zep's Context Engineering Platform.\n\nGraphiti powers the core of [Zep's context engineering platform](https://www.getzep.com) for AI Agents. Zep\noffers agent memory, Graph RAG for dynamic data, and context retrieval and assembly.\n\nUsing Graphiti, we've demonstrated Zep is\nthe [State of the Art in Agent Memory](https://blog.getzep.com/state-of-the-art-agent-memory/).\n\nRead our paper: [Zep: A Temporal Knowledge Graph Architecture for Agent Memory](https://arxiv.org/abs/2501.13956).\n\nWe're excited to open-source Graphiti, believing its potential reaches far beyond AI memory applications.\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://arxiv.org/abs/2501.13956\"\u003e\u003cimg src=\"images/arxiv-screenshot.png\" alt=\"Zep: A Temporal Knowledge Graph Architecture for Agent Memory\" width=\"700px\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n## Zep vs Graphiti\n\n| Aspect | Zep | Graphiti |\n|--------|-----|----------|\n| **What they are** | Fully managed platform for context engineering and AI memory | Open-source graph framework |\n| **User \u0026 conversation management** | Built-in users, threads, and message storage | Build your own |\n| **Retrieval \u0026 performance** | Pre-configured, production-ready retrieval with sub-200ms performance at scale | Custom implementation required; performance depends on your setup |\n| **Developer tools** | Dashboard with graph visualization, debug logs, API logs; SDKs for Python, TypeScript, and Go | Build your own tools |\n| **Enterprise features** | SLAs, support, security guarantees | Self-managed |\n| **Deployment** | Fully managed or in your cloud | Self-hosted only |\n\n### When to choose which\n\n**Choose Zep** if you want a turnkey, enterprise-grade platform with security, performance, and support baked in.\n\n**Choose Graphiti** if you want a flexible OSS core and you're comfortable building/operating the surrounding system.\n\n## Why Graphiti?\n\nTraditional RAG approaches often rely on batch processing and static data summarization, making them inefficient for\nfrequently changing data. Graphiti addresses these challenges by providing:\n\n- **Real-Time Incremental Updates:** Immediate integration of new data episodes without batch recomputation.\n- **Bi-Temporal Data Model:** Explicit tracking of event occurrence and ingestion times, allowing accurate point-in-time\n  queries.\n- **Efficient Hybrid Retrieval:** Combines semantic embeddings, keyword (BM25), and graph traversal to achieve\n  low-latency queries without reliance on LLM summarization.\n- **Custom Entity Definitions:** Flexible ontology creation and support for developer-defined entities through\n  straightforward Pydantic models.\n- **Scalability:** Efficiently manages large datasets with parallel processing, suitable for enterprise environments.\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"/images/graphiti-intro-slides-stock-2.gif\" alt=\"Graphiti structured + unstructured demo\" width=\"700px\"\u003e\n\u003c/p\u003e\n\n## Graphiti vs. GraphRAG\n\n| Aspect                     | GraphRAG                              | Graphiti                                         |\n|----------------------------|---------------------------------------|--------------------------------------------------|\n| **Primary Use**            | Static document summarization         | Dynamic data management                          |\n| **Data Handling**          | Batch-oriented processing             | Continuous, incremental updates                  |\n| **Knowledge Structure**    | Entity clusters \u0026 community summaries | Episodic data, semantic entities, communities    |\n| **Retrieval Method**       | Sequential LLM summarization          | Hybrid semantic, keyword, and graph-based search |\n| **Adaptability**           | Low                                   | High                                             |\n| **Temporal Handling**      | Basic timestamp tracking              | Explicit bi-temporal tracking                    |\n| **Contradiction Handling** | LLM-driven summarization judgments    | Temporal edge invalidation                       |\n| **Query Latency**          | Seconds to tens of seconds            | Typically sub-second latency                     |\n| **Custom Entity Types**    | No                                    | Yes, customizable                                |\n| **Scalability**            | Moderate                              | High, optimized for large datasets               |\n\nGraphiti is specifically designed to address the challenges of dynamic and frequently updated datasets, making it\nparticularly suitable for applications requiring real-time interaction and precise historical queries.\n\n## Installation\n\nRequirements:\n\n- Python 3.10 or higher\n- Neo4j 5.26 / FalkorDB 1.1.2 / Kuzu 0.11.2 / Amazon Neptune Database Cluster or Neptune Analytics Graph + Amazon\n  OpenSearch Serverless collection (serves as the full text search backend)\n- OpenAI API key (Graphiti defaults to OpenAI for LLM inference and embedding)\n\n\u003e [!IMPORTANT]\n\u003e Graphiti works best with LLM services that support Structured Output (such as OpenAI and Gemini).\n\u003e Using other services may result in incorrect output schemas and ingestion failures. This is particularly\n\u003e problematic when using smaller models.\n\nOptional:\n\n- Google Gemini, Anthropic, or Groq API key (for alternative LLM providers)\n\n\u003e [!TIP]\n\u003e The simplest way to install Neo4j is via [Neo4j Desktop](https://neo4j.com/download/). It provides a user-friendly\n\u003e interface to manage Neo4j instances and databases.\n\u003e Alternatively, you can use FalkorDB on-premises via Docker and instantly start with the quickstart example:\n\n```bash\ndocker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest\n\n```\n\n```bash\npip install graphiti-core\n```\n\nor\n\n```bash\nuv add graphiti-core\n```\n\n### Installing with FalkorDB Support\n\nIf you plan to use FalkorDB as your graph database backend, install with the FalkorDB extra:\n\n```bash\npip install graphiti-core[falkordb]\n\n# or with uv\nuv add graphiti-core[falkordb]\n```\n\n### Installing with Kuzu Support\n\nIf you plan to use Kuzu as your graph database backend, install with the Kuzu extra:\n\n```bash\npip install graphiti-core[kuzu]\n\n# or with uv\nuv add graphiti-core[kuzu]\n```\n\n### Installing with Amazon Neptune Support\n\nIf you plan to use Amazon Neptune as your graph database backend, install with the Amazon Neptune extra:\n\n```bash\npip install graphiti-core[neptune]\n\n# or with uv\nuv add graphiti-core[neptune]\n```\n\n### You can also install optional LLM providers as extras:\n\n```bash\n# Install with Anthropic support\npip install graphiti-core[anthropic]\n\n# Install with Groq support\npip install graphiti-core[groq]\n\n# Install with Google Gemini support\npip install graphiti-core[google-genai]\n\n# Install with multiple providers\npip install graphiti-core[anthropic,groq,google-genai]\n\n# Install with FalkorDB and LLM providers\npip install graphiti-core[falkordb,anthropic,google-genai]\n\n# Install with Amazon Neptune\npip install graphiti-core[neptune]\n```\n\n## Default to Low Concurrency; LLM Provider 429 Rate Limit Errors\n\nGraphiti's ingestion pipelines are designed for high concurrency. By default, concurrency is set low to avoid LLM\nProvider 429 Rate Limit Errors. If you find Graphiti slow, please increase concurrency as described below.\n\nConcurrency controlled by the `SEMAPHORE_LIMIT` environment variable. By default, `SEMAPHORE_LIMIT` is set to `10`\nconcurrent operations to help prevent `429` rate limit errors from your LLM provider. If you encounter such errors, try\nlowering this value.\n\nIf your LLM provider allows higher throughput, you can increase `SEMAPHORE_LIMIT` to boost episode ingestion\nperformance.\n\n## Quick Start\n\n\u003e [!IMPORTANT]\n\u003e Graphiti defaults to using OpenAI for LLM inference and embedding. Ensure that an `OPENAI_API_KEY` is set in your\n\u003e environment.\n\u003e Support for Anthropic and Groq LLM inferences is available, too. Other LLM providers may be supported via OpenAI\n\u003e compatible APIs.\n\nFor a complete working example, see the [Quickstart Example](./examples/quickstart/README.md) in the examples directory.\nThe quickstart demonstrates:\n\n1. Connecting to a Neo4j, Amazon Neptune, FalkorDB, or Kuzu database\n2. Initializing Graphiti indices and constraints\n3. Adding episodes to the graph (both text and structured JSON)\n4. Searching for relationships (edges) using hybrid search\n5. Reranking search results using graph distance\n6. Searching for nodes using predefined search recipes\n\nThe example is fully documented with clear explanations of each functionality and includes a comprehensive README with\nsetup instructions and next steps.\n\n### Running with Docker Compose\n\nYou can use Docker Compose to quickly start the required services:\n\n- **Neo4j Docker:**\n  ```sh\n  docker compose up\n  ```\n  This will start the Neo4j Docker service and related components.\n\n- **FalkorDB Docker:**\n  ```sh\n  docker compose --profile falkordb up\n  ```\n  This will start the FalkorDB Docker service and related components.\n\n## MCP Server\n\nThe `mcp_server` directory contains a Model Context Protocol (MCP) server implementation for Graphiti. This server\nallows AI assistants to interact with Graphiti's knowledge graph capabilities through the MCP protocol.\n\nKey features of the MCP server include:\n\n- Episode management (add, retrieve, delete)\n- Entity management and relationship handling\n- Semantic and hybrid search capabilities\n- Group management for organizing related data\n- Graph maintenance operations\n\nThe MCP server can be deployed using Docker with Neo4j, making it easy to integrate Graphiti into your AI assistant\nworkflows.\n\nFor detailed setup instructions and usage examples, see the [MCP server README](./mcp_server/README.md).\n\n## REST Service\n\nThe `server` directory contains an API service for interacting with the Graphiti API. It is built using FastAPI.\n\nPlease see the [server README](./server/README.md) for more information.\n\n## Optional Environment Variables\n\nIn addition to the Neo4j and OpenAi-compatible credentials, Graphiti also has a few optional environment variables.\nIf you are using one of our supported models, such as Anthropic or Voyage models, the necessary environment variables\nmust be set.\n\n### Database Configuration\n\nDatabase names are configured directly in the driver constructors:\n\n- **Neo4j**: Database name defaults to `neo4j` (hardcoded in Neo4jDriver)\n- **FalkorDB**: Database name defaults to `default_db` (hardcoded in FalkorDriver)\n\nAs of v0.17.0, if you need to customize your database configuration, you can instantiate a database driver and pass it\nto the Graphiti constructor using the `graph_driver` parameter.\n\n#### Neo4j with Custom Database Name\n\n```python\nfrom graphiti_core import Graphiti\nfrom graphiti_core.driver.neo4j_driver import Neo4jDriver\n\n# Create a Neo4j driver with custom database name\ndriver = Neo4jDriver(\n    uri=\"bolt://localhost:7687\",\n    user=\"neo4j\",\n    password=\"password\",\n    database=\"my_custom_database\"  # Custom database name\n)\n\n# Pass the driver to Graphiti\ngraphiti = Graphiti(graph_driver=driver)\n```\n\n#### FalkorDB with Custom Database Name\n\n```python\nfrom graphiti_core import Graphiti\nfrom graphiti_core.driver.falkordb_driver import FalkorDriver\n\n# Create a FalkorDB driver with custom database name\ndriver = FalkorDriver(\n    host=\"localhost\",\n    port=6379,\n    username=\"falkor_user\",  # Optional\n    password=\"falkor_password\",  # Optional\n    database=\"my_custom_graph\"  # Custom database name\n)\n\n# Pass the driver to Graphiti\ngraphiti = Graphiti(graph_driver=driver)\n```\n\n#### Kuzu\n\n```python\nfrom graphiti_core import Graphiti\nfrom graphiti_core.driver.kuzu_driver import KuzuDriver\n\n# Create a Kuzu driver\ndriver = KuzuDriver(db=\"/tmp/graphiti.kuzu\")\n\n# Pass the driver to Graphiti\ngraphiti = Graphiti(graph_driver=driver)\n```\n\n#### Amazon Neptune\n\n```python\nfrom graphiti_core import Graphiti\nfrom graphiti_core.driver.neptune_driver import NeptuneDriver\n\n# Create a FalkorDB driver with custom database name\ndriver = NeptuneDriver(\n    host= \u003c NEPTUNE\nENDPOINT \u003e,\naoss_host = \u003c Amazon\nOpenSearch\nServerless\nHost \u003e,\nport = \u003c PORT \u003e  # Optional, defaults to 8182,\n         aoss_port = \u003c PORT \u003e  # Optional, defaults to 443\n)\n\ndriver = NeptuneDriver(host=neptune_uri, aoss_host=aoss_host, port=neptune_port)\n\n# Pass the driver to Graphiti\ngraphiti = Graphiti(graph_driver=driver)\n```\n\n## Using Graphiti with Azure OpenAI\n\nGraphiti supports Azure OpenAI for both LLM inference and embeddings using Azure's OpenAI v1 API compatibility layer.\n\n### Quick Start\n\n```python\nfrom openai import AsyncOpenAI\nfrom graphiti_core import Graphiti\nfrom graphiti_core.llm_client.azure_openai_client import AzureOpenAILLMClient\nfrom graphiti_core.llm_client.config import LLMConfig\nfrom graphiti_core.embedder.azure_openai import AzureOpenAIEmbedderClient\n\n# Initialize Azure OpenAI client using the standard OpenAI client\n# with Azure's v1 API endpoint\nazure_client = AsyncOpenAI(\n    base_url=\"https://your-resource-name.openai.azure.com/openai/v1/\",\n    api_key=\"your-api-key\",\n)\n\n# Create LLM and Embedder clients\nllm_client = AzureOpenAILLMClient(\n    azure_client=azure_client,\n    config=LLMConfig(model=\"gpt-5-mini\", small_model=\"gpt-5-mini\")  # Your Azure deployment name\n)\nembedder_client = AzureOpenAIEmbedderClient(\n    azure_client=azure_client,\n    model=\"text-embedding-3-small\"  # Your Azure embedding deployment name\n)\n\n# Initialize Graphiti with Azure OpenAI clients\ngraphiti = Graphiti(\n    \"bolt://localhost:7687\",\n    \"neo4j\",\n    \"password\",\n    llm_client=llm_client,\n    embedder=embedder_client,\n)\n\n# Now you can use Graphiti with Azure OpenAI\n```\n\n**Key Points:**\n- Use the standard `AsyncOpenAI` client with Azure's v1 API endpoint format: `https://your-resource-name.openai.azure.com/openai/v1/`\n- The deployment names (e.g., `gpt-5-mini`, `text-embedding-3-small`) should match your Azure OpenAI deployment names\n- See `examples/azure-openai/` for a complete working example\n\nMake sure to replace the placeholder values with your actual Azure OpenAI credentials and deployment names.\n\n## Using Graphiti with Google Gemini\n\nGraphiti supports Google's Gemini models for LLM inference, embeddings, and cross-encoding/reranking. To use Gemini,\nyou'll need to configure the LLM client, embedder, and the cross-encoder with your Google API key.\n\nInstall Graphiti:\n\n```bash\nuv add \"graphiti-core[google-genai]\"\n\n# or\n\npip install \"graphiti-core[google-genai]\"\n```\n\n```python\nfrom graphiti_core import Graphiti\nfrom graphiti_core.llm_client.gemini_client import GeminiClient, LLMConfig\nfrom graphiti_core.embedder.gemini import GeminiEmbedder, GeminiEmbedderConfig\nfrom graphiti_core.cross_encoder.gemini_reranker_client import GeminiRerankerClient\n\n# Google API key configuration\napi_key = \"\u003cyour-google-api-key\u003e\"\n\n# Initialize Graphiti with Gemini clients\ngraphiti = Graphiti(\n    \"bolt://localhost:7687\",\n    \"neo4j\",\n    \"password\",\n    llm_client=GeminiClient(\n        config=LLMConfig(\n            api_key=api_key,\n            model=\"gemini-2.0-flash\"\n        )\n    ),\n    embedder=GeminiEmbedder(\n        config=GeminiEmbedderConfig(\n            api_key=api_key,\n            embedding_model=\"embedding-001\"\n        )\n    ),\n    cross_encoder=GeminiRerankerClient(\n        config=LLMConfig(\n            api_key=api_key,\n            model=\"gemini-2.5-flash-lite\"\n        )\n    )\n)\n\n# Now you can use Graphiti with Google Gemini for all components\n```\n\nThe Gemini reranker uses the `gemini-2.5-flash-lite` model by default, which is optimized for\ncost-effective and low-latency classification tasks. It uses the same boolean classification approach as the OpenAI\nreranker, leveraging Gemini's log probabilities feature to rank passage relevance.\n\n## Using Graphiti with Ollama (Local LLM)\n\nGraphiti supports Ollama for running local LLMs and embedding models via Ollama's OpenAI-compatible API. This is ideal\nfor privacy-focused applications or when you want to avoid API costs.\n\n**Note:** Use `OpenAIGenericClient` (not `OpenAIClient`) for Ollama and other OpenAI-compatible providers like LM Studio. The `OpenAIGenericClient` is optimized for local models with a higher default max token limit (16K vs 8K) and full support for structured outputs.\n\nInstall the models:\n\n```bash\nollama pull deepseek-r1:7b # LLM\nollama pull nomic-embed-text # embeddings\n```\n\n```python\nfrom graphiti_core import Graphiti\nfrom graphiti_core.llm_client.config import LLMConfig\nfrom graphiti_core.llm_client.openai_generic_client import OpenAIGenericClient\nfrom graphiti_core.embedder.openai import OpenAIEmbedder, OpenAIEmbedderConfig\nfrom graphiti_core.cross_encoder.openai_reranker_client import OpenAIRerankerClient\n\n# Configure Ollama LLM client\nllm_config = LLMConfig(\n    api_key=\"ollama\",  # Ollama doesn't require a real API key, but some placeholder is needed\n    model=\"deepseek-r1:7b\",\n    small_model=\"deepseek-r1:7b\",\n    base_url=\"http://localhost:11434/v1\",  # Ollama's OpenAI-compatible endpoint\n)\n\nllm_client = OpenAIGenericClient(config=llm_config)\n\n# Initialize Graphiti with Ollama clients\ngraphiti = Graphiti(\n    \"bolt://localhost:7687\",\n    \"neo4j\",\n    \"password\",\n    llm_client=llm_client,\n    embedder=OpenAIEmbedder(\n        config=OpenAIEmbedderConfig(\n            api_key=\"ollama\",  # Placeholder API key\n            embedding_model=\"nomic-embed-text\",\n            embedding_dim=768,\n            base_url=\"http://localhost:11434/v1\",\n        )\n    ),\n    cross_encoder=OpenAIRerankerClient(client=llm_client, config=llm_config),\n)\n\n# Now you can use Graphiti with local Ollama models\n```\n\nEnsure Ollama is running (`ollama serve`) and that you have pulled the models you want to use.\n\n## Documentation\n\n- [Guides and API documentation](https://help.getzep.com/graphiti).\n- [Quick Start](https://help.getzep.com/graphiti/graphiti/quick-start)\n- [Building an agent with LangChain's LangGraph and Graphiti](https://help.getzep.com/graphiti/integrations/lang-graph-agent)\n\n## Telemetry\n\nGraphiti collects anonymous usage statistics to help us understand how the framework is being used and improve it for\neveryone. We believe transparency is important, so here's exactly what we collect and why.\n\n### What We Collect\n\nWhen you initialize a Graphiti instance, we collect:\n\n- **Anonymous identifier**: A randomly generated UUID stored locally in `~/.cache/graphiti/telemetry_anon_id`\n- **System information**: Operating system, Python version, and system architecture\n- **Graphiti version**: The version you're using\n- **Configuration choices**:\n    - LLM provider type (OpenAI, Azure, Anthropic, etc.)\n    - Database backend (Neo4j, FalkorDB, Kuzu, Amazon Neptune Database or Neptune Analytics)\n    - Embedder provider (OpenAI, Azure, Voyage, etc.)\n\n### What We Don't Collect\n\nWe are committed to protecting your privacy. We **never** collect:\n\n- Personal information or identifiers\n- API keys or credentials\n- Your actual data, queries, or graph content\n- IP addresses or hostnames\n- File paths or system-specific information\n- Any content from your episodes, nodes, or edges\n\n### Why We Collect This Data\n\nThis information helps us:\n\n- Understand which configurations are most popular to prioritize support and testing\n- Identify which LLM and database providers to focus development efforts on\n- Track adoption patterns to guide our roadmap\n- Ensure compatibility across different Python versions and operating systems\n\nBy sharing this anonymous information, you help us make Graphiti better for everyone in the community.\n\n### View the Telemetry Code\n\nThe Telemetry code [may be found here](graphiti_core/telemetry/telemetry.py).\n\n### How to Disable Telemetry\n\nTelemetry is **opt-out** and can be disabled at any time. To disable telemetry collection:\n\n**Option 1: Environment Variable**\n\n```bash\nexport GRAPHITI_TELEMETRY_ENABLED=false\n```\n\n**Option 2: Set in your shell profile**\n\n```bash\n# For bash users (~/.bashrc or ~/.bash_profile)\necho 'export GRAPHITI_TELEMETRY_ENABLED=false' \u003e\u003e ~/.bashrc\n\n# For zsh users (~/.zshrc)\necho 'export GRAPHITI_TELEMETRY_ENABLED=false' \u003e\u003e ~/.zshrc\n```\n\n**Option 3: Set for a specific Python session**\n\n```python\nimport os\n\nos.environ['GRAPHITI_TELEMETRY_ENABLED'] = 'false'\n\n# Then initialize Graphiti as usual\nfrom graphiti_core import Graphiti\n\ngraphiti = Graphiti(...)\n```\n\nTelemetry is automatically disabled during test runs (when `pytest` is detected).\n\n### Technical Details\n\n- Telemetry uses PostHog for anonymous analytics collection\n- All telemetry operations are designed to fail silently - they will never interrupt your application or affect Graphiti\n  functionality\n- The anonymous ID is stored locally and is not tied to any personal information\n\n## Status and Roadmap\n\nGraphiti is under active development. We aim to maintain API stability while working on:\n\n- [x] Supporting custom graph schemas:\n    - Allow developers to provide their own defined node and edge classes when ingesting episodes\n    - Enable more flexible knowledge representation tailored to specific use cases\n- [x] Enhancing retrieval capabilities with more robust and configurable options\n- [x] Graphiti MCP Server\n- [ ] Expanding test coverage to ensure reliability and catch edge cases\n\n## Contributing\n\nWe encourage and appreciate all forms of contributions, whether it's code, documentation, addressing GitHub Issues, or\nanswering questions in the Graphiti Discord channel. For detailed guidelines on code contributions, please refer\nto [CONTRIBUTING](CONTRIBUTING.md).\n\n## Support\n\nJoin the [Zep Discord server](https://discord.com/invite/W8Kw6bsgXQ) and make your way to the **#Graphiti** channel!\n","funding_links":[],"categories":["AI Agent Frameworks","SDKs \u0026 Libraries","Python","Software","A01_文本生成_文本对话","🙏 Acknowledgments","Tools","Real-Time Collaboration","HarmonyOS","Memory Management","Repos","Runtime","Corporate and Analytical Applications","App","Machine Learning \u0026 AI","✍️ Write Context","🤖 Agentic Coding","Knowledge Graphs and Memory"],"sub_categories":["General Agent Frameworks","RAG","大语言对话模型及数据","Planned Features","Retrieval-Augmented Generation","Windows Manager","Tool","Data Integration and Specialized Solutions","Long-term memory","📚 Repos","Benchmark Reality Check (real-world tool use)"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetzep%2Fgraphiti","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetzep%2Fgraphiti","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetzep%2Fgraphiti/lists"}