[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2208":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":16,"starSnapshotCount":16,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},2208,"graphiti","getzep\u002Fgraphiti","getzep","Build Real-Time Knowledge Graphs for AI Agents","https:\u002F\u002Fhelp.getzep.com\u002Fgraphiti",null,"Python",27296,2725,158,240,0,37,298,1360,192,120,"Apache License 2.0",false,"main",[26,27,28,29],"agents","graph","llms","rag","2026-06-12 04:00:13","\u003Cp align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fwww.getzep.com\u002F\">\n    \u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F119c5682-9654-4257-8922-56b7cb8ffd73\" width=\"150\" alt=\"Zep Logo\">\n  \u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">\nGraphiti\n\u003C\u002Fh1>\n\u003Ch2 align=\"center\">Build Temporal Context Graphs for AI Agents\u003C\u002Fh2>\n\n\u003Cdiv align=\"center\">\n\n[![Lint](https:\u002F\u002Fgithub.com\u002Fgetzep\u002FGraphiti\u002Factions\u002Fworkflows\u002Flint.yml\u002Fbadge.svg?style=flat)](https:\u002F\u002Fgithub.com\u002Fgetzep\u002FGraphiti\u002Factions\u002Fworkflows\u002Flint.yml)\n[![Unit Tests](https:\u002F\u002Fgithub.com\u002Fgetzep\u002FGraphiti\u002Factions\u002Fworkflows\u002Funit_tests.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgetzep\u002FGraphiti\u002Factions\u002Fworkflows\u002Funit_tests.yml)\n[![MyPy Check](https:\u002F\u002Fgithub.com\u002Fgetzep\u002FGraphiti\u002Factions\u002Fworkflows\u002Ftypecheck.yml\u002Fbadge.svg)](https:\u002F\u002Fgithub.com\u002Fgetzep\u002FGraphiti\u002Factions\u002Fworkflows\u002Ftypecheck.yml)\n\n[![GitHub Repo stars](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fstars\u002Fgetzep\u002Fgraphiti)](https:\u002F\u002Fgithub.com\u002Fgetzep\u002Fgraphiti\u002Fstargazers)\n[![Discord](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDiscord-%235865F2.svg?&logo=discord&logoColor=white)](https:\u002F\u002Fdiscord.com\u002Finvite\u002FW8Kw6bsgXQ)\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2501.13956-b31b1b.svg?style=flat)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2501.13956)\n[![Release](https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fv\u002Frelease\u002Fgetzep\u002Fgraphiti?style=flat&label=Release&color=limegreen)](https:\u002F\u002Fgithub.com\u002Fgetzep\u002Fgraphiti\u002Freleases)\n\n\u003C\u002Fdiv>\n\u003Cdiv align=\"center\">\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F12986\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F12986\" alt=\"getzep%2Fgraphiti | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n\u003C\u002Fdiv>\n\n> [!NOTE]\n> **We're Hiring!** Build context graphs that power reliable, personalized, fast production AI agents.\n> Come build with us — we're hiring Engineers and Developer Relations folks. [View open roles](https:\u002F\u002Fwww.getzep.com\u002Fcareers\u002F).\n\n⭐ *Help us reach more developers and grow the Graphiti community. Star this repo!*\n\n&nbsp;\n\n> [!TIP]\n> Check out the new [MCP server for Graphiti](mcp_server\u002FREADME.md)! Give Claude, Cursor, and other MCP clients powerful\n> context graph-based memory with temporal awareness.\n\nGraphiti is a framework for building and querying temporal context graphs for AI agents. Unlike static knowledge graphs,\nGraphiti's context graphs track how facts change over time, maintain provenance to source data, and support both\nprescribed and learned ontology — making them purpose-built for agents operating on evolving, real-world data.\n\nUnlike traditional retrieval-augmented generation (RAG) methods, Graphiti continuously integrates user interactions,\nstructured and unstructured enterprise data, and external information into a coherent, queryable graph. The framework\nsupports incremental data updates, efficient retrieval, and precise historical queries without requiring complete graph\nrecomputation, making it suitable for developing interactive, context-aware AI applications.\n\nUse Graphiti to:\n\n- Build context graphs that evolve with every interaction — tracking what's true now and what was true before.\n- Give agents rich, structured context instead of flat document chunks or raw chat history.\n- Query across time, meaning, and relationships with hybrid retrieval (semantic + keyword + graph traversal).\n\n&nbsp;\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"images\u002Fgraphiti-graph-intro.gif\" alt=\"Graphiti temporal walkthrough\" width=\"700px\">\n\u003C\u002Fp>\n\n&nbsp;\n\n## What is a Context Graph?\n\nA **context graph** is a temporal graph of entities, relationships, and facts — like *\"Kendra loves Adidas shoes (as of\nMarch 2026).\"* Unlike traditional knowledge graphs, each fact in a context graph has a validity window: when it became\ntrue, and when (if ever) it was superseded. Entities evolve over time with updated summaries. Everything traces back to\n**episodes** — the raw data that produced it.\n\nWhat makes Graphiti unique is its ability to autonomously build context graphs from unstructured and structured data,\nhandling changing relationships while preserving full temporal history.\n\nA context graph contains:\n\n| Component | What it stores |\n|-----------|---------------|\n| **Entities** (nodes) | People, products, policies, concepts — with summaries that evolve over time |\n| **Facts \u002F Relationships** (edges) | Triplets (Entity → Relationship → Entity) with temporal validity windows |\n| **Episodes** (provenance) | Raw data as ingested — the ground truth stream. Every derived fact traces back here |\n| **Custom Types** (ontology) | Developer-defined entity and edge types via Pydantic models |\n\n## Graphiti and Zep\n\nGraphiti is the open-source temporal context graph engine at the core of\n[Zep's](https:\u002F\u002Fwww.getzep.com) context infrastructure for AI agents. Zep manages context graphs at scale, providing\ngoverned, low-latency context retrieval and assembly for production agent deployments.\n\nUsing Graphiti, we've demonstrated Zep is\nthe [State of the Art in Agent Memory](https:\u002F\u002Fblog.getzep.com\u002Fstate-of-the-art-agent-memory\u002F).\n\nRead our paper: [Zep: A Temporal Knowledge Graph Architecture for Agent Memory](https:\u002F\u002Farxiv.org\u002Fabs\u002F2501.13956).\n\nWe're excited to open-source Graphiti, believing its potential as a context graph engine reaches far beyond memory\napplications.\n\n\u003Cp align=\"center\">\n    \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2501.13956\">\u003Cimg src=\"images\u002Farxiv-screenshot.png\" alt=\"Zep: A Temporal Knowledge Graph Architecture for Agent Memory\" width=\"700px\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Zep vs Graphiti\n\n| Aspect | Zep | Graphiti |\n|--------|-----|---------|\n| **What they are** | Managed context graph infrastructure for AI agents | Open-source temporal context graph engine |\n| **Context graphs** | Manages vast numbers of per-user\u002Fentity context graphs with governance | Build and query individual context graphs |\n| **User & conversation management** | Built-in users, threads, and message storage | Build your own |\n| **Retrieval & 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\u002Foperating 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- **Temporal Fact Management:** Facts have validity windows. When information changes, old facts are\n  invalidated — not deleted. Query what's true now, or what was true at any point in time.\n- **Episodes & Provenance:** Every entity and relationship traces back to the episodes (raw data) that produced it.\n  Full lineage from derived fact to source.\n- **Prescribed & Learned Ontology:** Define entity and edge types upfront via Pydantic models (prescribed), or let\n  structure emerge from your data (learned). Start simple, evolve as patterns appear.\n- **Incremental Graph Construction:** New data integrates immediately without batch recomputation. The graph evolves\n  in real-time as episodes are ingested.\n- **Hybrid Retrieval:** Combines semantic embeddings, keyword (BM25), and graph traversal for low-latency,\n  high-precision queries without reliance on LLM summarization.\n- **Scalability:** Efficiently manages large datasets with parallel processing, pluggable graph backends, suitable\n  for enterprise workloads.\n\n\u003Cp align=\"center\">\n    \u003Cimg src=\"\u002Fimages\u002Fgraphiti-intro-slides-stock-2.gif\" alt=\"Graphiti structured + unstructured demo\" width=\"700px\">\n\u003C\u002Fp>\n\n## Graphiti vs. GraphRAG\n\n| Aspect | GraphRAG | Graphiti |\n|--------|----------|---------|\n| **Primary Use** | Static document summarization | Dynamic, evolving context for agents |\n| **Data Handling** | Batch-oriented processing | Continuous, incremental updates |\n| **Knowledge Structure** | Entity clusters & community summaries | Temporal context graph — entities, facts with validity windows, episodes, 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 with automatic fact invalidation |\n| **Contradiction Handling** | LLM-driven summarization judgments | Automatic fact invalidation with temporal history preserved |\n| **Query Latency** | Seconds to tens of seconds | Typically sub-second latency |\n| **Custom Entity Types** | No | Yes, customizable via Pydantic models |\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 \u002F FalkorDB 1.1.2 \u002F Kuzu 0.11.2 \u002F 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> [!IMPORTANT]\n> Graphiti works best with LLM services that support Structured Output (such as OpenAI and Gemini).\n> Using other services may result in incorrect output schemas and ingestion failures. This is particularly\n> problematic when using smaller models.\n\nOptional:\n\n- Google Gemini, Anthropic, or Groq API key (for alternative LLM providers)\n\n> [!TIP]\n> The simplest way to install Neo4j is via [Neo4j Desktop](https:\u002F\u002Fneo4j.com\u002Fdownload\u002F). It provides a user-friendly\n> interface to manage Neo4j instances and databases.\n> Alternatively, you can use FalkorDB on-premises via Docker and instantly start with the quickstart example:\n> ```\n> docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb\u002Ffalkordb:latest\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> [!IMPORTANT]\n> Graphiti defaults to using OpenAI for LLM inference and embedding. Ensure that an `OPENAI_API_KEY` is set in your\n> environment.\n> Support for Anthropic and Groq LLM inferences is available, too. Other LLM providers may be supported via OpenAI\n> compatible APIs.\n\nFor a complete working example, see the [Quickstart Example](examples\u002Fquickstart\u002FREADME.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\n  ```bash\n  docker compose up\n  ```\n\n  This will start the Neo4j Docker service and related components.\n\n- **FalkorDB Docker:**\n\n  ```bash\n  docker compose --profile falkordb up\n  ```\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 context 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\u002FREADME.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\u002FREADME.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:\u002F\u002Flocalhost: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=\"\u002Ftmp\u002Fgraphiti.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 Neptune driver\ndriver = NeptuneDriver(\n    host='\u003CNEPTUNE_ENDPOINT>',\n    aoss_host='\u003CAMAZON_OPENSEARCH_SERVERLESS_HOST>',\n    port=8182,      # Optional, defaults to 8182\n    aoss_port=443,  # Optional, defaults to 443\n)\n\n# Pass the driver to Graphiti\ngraphiti = Graphiti(graph_driver=driver)\n```\n\nContributing a new graph backend? See [Adding a graph driver](CONTRIBUTING.md#adding-a-graph-driver).\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:\u002F\u002Fyour-resource-name.openai.azure.com\u002Fopenai\u002Fv1\u002F\",\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:\u002F\u002Flocalhost: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\n- Use the standard `AsyncOpenAI` client with Azure's v1 API endpoint format:\n  `https:\u002F\u002Fyour-resource-name.openai.azure.com\u002Fopenai\u002Fv1\u002F`\n- The deployment names (e.g., `gpt-5-mini`, `text-embedding-3-small`) should match your Azure OpenAI deployment names\n- See `examples\u002Fazure-openai\u002F` 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\u002Freranking. 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>\"\n\n# Initialize Graphiti with Gemini clients\ngraphiti = Graphiti(\n    \"bolt:\u002F\u002Flocalhost: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\nStudio. The `OpenAIGenericClient` is optimized for local models with a higher default max token limit (16K vs 8K) and\nfull 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:\u002F\u002Flocalhost:11434\u002Fv1\",  # Ollama's OpenAI-compatible endpoint\n)\n\nllm_client = OpenAIGenericClient(config=llm_config)\n\n# Initialize Graphiti with Ollama clients\ngraphiti = Graphiti(\n    \"bolt:\u002F\u002Flocalhost: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:\u002F\u002Flocalhost:11434\u002Fv1\",\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:\u002F\u002Fhelp.getzep.com\u002Fgraphiti).\n- [Quick Start](https:\u002F\u002Fhelp.getzep.com\u002Fgraphiti\u002Fgraphiti\u002Fquick-start)\n- [Building an agent with LangChain's LangGraph and Graphiti](https:\u002F\u002Fhelp.getzep.com\u002Fgraphiti\u002Fintegrations\u002Flang-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 `~\u002F.cache\u002Fgraphiti\u002Ftelemetry_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\u002Ftelemetry\u002Ftelemetry.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 (~\u002F.bashrc or ~\u002F.bash_profile)\necho 'export GRAPHITI_TELEMETRY_ENABLED=false' >> ~\u002F.bashrc\n\n# For zsh users (~\u002F.zshrc)\necho 'export GRAPHITI_TELEMETRY_ENABLED=false' >> ~\u002F.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## 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:\u002F\u002Fdiscord.com\u002Finvite\u002FW8Kw6bsgXQ) and make your way to the **#Graphiti** channel!\n","Graphiti 是一个用于构建和查询面向AI代理的实时知识图谱的框架。其核心功能包括跟踪随时间变化的事实、维护数据来源的溯源，并支持预定义和学习本体，从而特别适用于处理不断演变的真实世界数据。与传统的检索增强生成（RAG）方法不同，Graphiti 能够持续整合用户交互、企业结构化及非结构化数据以及外部信息，形成连贯且可查询的图谱，支持增量数据更新和高效检索。该工具非常适合开发需要具备上下文感知能力的互动式AI应用，如智能客服、虚拟助手等场景。",2,"2026-06-11 02:48:52","top_language"]