CLAUDE.md · getzep/graphiti
CLAUDE.md from getzep/graphiti: 183 lines covering Project Overview, Development Commands, Code Architecture, Testing and more.
Template by getzep
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/getzep/graphiti/main/CLAUDE.md -o CLAUDE.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: prompt-engineering
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A CLAUDE.md file: project memory Claude Code loads at the start of every session.
- For
- Claude Code
- Length
- 183 lines
- File
CLAUDE.md
Sections
- Project Overview
- Development Commands
- Code Architecture
- Testing
- Configuration
- Development Guidelines
First lines (shown under the repo's Apache-2.0 license)
# CLAUDE.md This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. ## Project Overview Graphiti is a Python framework for building temporally-aware knowledge graphs designed for AI agents. It enables real-time incremental updates to knowledge graphs without batch recomputation, making it suitable for dynamic environments. Key features: - Bi-temporal data model with explicit tracking of event occurrence times - Hybrid retrieval combining semantic embeddings, keyword search (BM25), and graph traversal - Support for custom entity definitions via Pydantic models - Integration with Neo4j and FalkorDB as graph storage backends - Optional OpenTelemetry distributed tracing support ## Development Commands ### Main Development Commands (run from project root) ```bash # Install dependencies uv sync --extra dev # Format code (ruff import sorting + formatting) make format # Lint code (ruff + pyright type checking) make lint # Run tests make test # Run all checks (format, lint, test) make check ``` ### Server Development (run from server/ directory) ```bash cd server/ # Install server dependencies uv sync --extra dev # Run server in development mode uvicorn graph_service.main:app --reload # Format, lint, test server code make format make lint make test ``` ### MCP Server Development (run from mcp_server/ directory) ```bash cd mcp_server/ # Install MCP server dependencies uv sync # Run with Docker Compose docker-compose up ``` ## Code Architecture ### Core Library (`graphiti_core/`) - **Main Entry Point**: `graphiti.py` - Contains the main `Graphiti` class that orchestrates all functionality - **Graph Storage**: `driver/` - Database drivers for Neo4j and FalkorDB - **LLM Integration**: `llm_client/` - Clients for OpenAI, Anthropic, Gemini, Groq - **Embeddings**: `embedder/` - Embedding clients for various providers - **Graph Elements**: `nodes.py`, `edges.py` - Core graph data structures - **Search**: `search/` - Hybrid search implementation with configurable strategies - **Prompts**: `prompts/` - LLM prompts for entity extraction, deduplication, summarization - **Utilities**: `utils/` - Maintenance operations, bulk processing, datetime handling ### Server (`server/`) - **FastAPI Service**: `graph_service/main.py` - REST API server - **Routers**: `routers/` - API endpoints for ingestion and retrieval - **DTOs**: `dto/` - Data transfer objects for API contracts ### MCP Server (`mcp_server/`) - **MCP Implementation**: `graphiti_mcp_server.py` - Model Context Protocol server for AI assistants - **Docker Support**: Containerized deployment with Neo4j ## Testing - **Unit Tests**: `tests/` - Comprehensive test suite using pytest - **Integration Tests**: Tests marked with `_int` suffix require database connections - **Evaluation**: `tests/evals/` - End-to-end evaluation scripts ## Configuration ### Environment Variables - `OPENAI_API_KEY` - Required for LLM inference and embeddings - `USE_PARALLEL_RUNTIME` - Optional boolean for Neo4j parallel runtime (enterprise only) - Provider-specific keys: `ANTHROPIC_API_KEY`, `GOOGLE_API_KEY`, `GROQ_API_KEY`, `VOYAGE_API_KEY` ### Database Setup - **Neo4j**: Version 5.26+ required, available via Neo4j Desktop - Database name defaults to `neo4j` (hardcoded in Neo4jDriver) - Override by passing `database` parameter to driver constructor - **FalkorDB**: Version 1.1.2+ as alternative backend - Database name defaults to `default_db` (hardcoded in FalkorDriver) - Override by passing `database` parameter to driver constructor ## Development Guidelines ### Code Style - Use Ruff for formatting and linting (configured in pyproject.toml) - Line length: 100 characters - Quote style: single quotes - Type checking with Pyright is enforced - Main project uses `typeCheckingMode = "basic"`, server uses `typeCheckingMode = "standard"` ### Testing Requirements - Run tests with `make test` or `pytest` - Integration tests require database connections and are marked with `_int` suffix - Use `pytest-xdist` for parallel test execution - Run specific test files: `pytest tests/test_specific_file.py` - Run specific test methods: `pytest tests/test_file.py::test_method_name` - Run only integration tests: `pytest tests/ -k "_int"` - Run only unit tests: `pytest tests/ -k "not _int"` ### LLM Provider Support The codebase supports multiple LLM providers but works best with services supporting structured output (OpenAI, Gemini). Other providers may cause schema validation issues, especially with smaller models. #### Current LLM Models (as of November 2025) **OpenAI Models:** - **GPT-6 Family** (Reasoning models): - `gpt-6-luna` - Default OpenAI model; Graphiti sends reasoning effort `none` and turns off prompt caching - **GPT-5 Family** (Reasoning models, require temperature=0): - `gpt-5-mini` - Fast reasoning model - `gpt-5-nano` - Smallest reasoning model - **GPT-4.1 Family** (Standard models): - `gpt-4.1` - Full capability model - `gpt-4.1-mini` - Efficient model for most tasks - **Legacy Models** (Still supported): - `gpt-4o` - Previous generation flagship - `gpt-4o-mini` - Previous generation efficient **Anthropic Models:** - **Claude 5 Family**: - `claude-haiku-5-5` - Default Anthropic model - `claude-sonnet-5` - Sonnet 5 model - `claude-opus-5` - Opus 5 model - `claude-fable-5` - Fable 5 model **Google Gemini Models:** - **Gemini 2.5 Family** (Latest): - `gemini-2.5-pro` - Flagship reasoning and multimodal
Signals
- Stars
- 32,180
- Forks
- 3,308
- Open issues
- 240
- Last commit (this folder)
- Oct 14, 2026 (15 days ago)
- Last release
- Oct 20, 2026 (9 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/getzep/graphiti
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from getzep
Cite this page
CLAUDE.md · getzep/graphiti. Agent Mart. https://agentmart.dev/templates/getzep-graphiti-claude-md (last updated 2026-10-24)