Graphiti

by getzep

Community Database 30k likes

Graphiti's MCP server exposes a temporally-aware knowledge graph, so an agent can add episodes, query facts as of a specific date, and track how a relationship changed.

Run with Docker Compose

git clone https://github.com/getzep/graphiti.git && cd graphiti/mcp_server && docker compose up

Source: https://github.com/getzep/graphiti

About

Graphiti (from Zep) builds knowledge graphs that are bi-temporal by design (every fact carries both when it was recorded and when it was actually true), and the mcp_server package exposes that engine as MCP tools. add_memory ingests an 'episode' (text, JSON, or a message transcript) and extracts entities and facts from it incrementally, without recomputing the whole graph; add_triplet skips extraction entirely and writes a single source-fact-target triple directly when you already know exactly what you want stored.

Query-side tools reflect that same time-awareness: search_memory_facts supports valid_at/invalid_at filtering, so an agent can ask what was true as of a given moment rather than only what's true now, and search_nodes finds entities with optional filtering by type or proximity to a center node. build_communities detects clusters of related entities and produces higher-level summaries, and get_episode_entities traces which facts originated from which ingested episode, useful for auditing where a piece of graph knowledge actually came from.

Key features

  • Bi-temporal facts: every edge tracks both when it was recorded and when it was valid, enabling as-of queries
  • add_memory ingests text, JSON, or message-format episodes with incremental extraction (no full graph recompute)
  • add_triplet for writing a single known fact directly, bypassing LLM extraction
  • search_memory_facts supports valid_at/invalid_at date-range filtering for historical queries
  • build_communities clusters related entities and generates higher-level community summaries
  • Deployable via Docker Compose with FalkorDB, or directly against Neo4j

Use cases

  • Tracking how a fast-moving situation's facts changed over time and querying 'what was true then'
  • Giving a long-running agent a knowledge graph that updates incrementally as new information arrives
  • Auditing which conversation or document a specific fact in the graph actually came from
  • Summarizing clusters of related entities into higher-level themes via community detection

Available tools

add_memory

Adds an episode (text, JSON, or messages) to the graph, extracting entities and facts incrementally.

add_triplet

Writes a single source-fact-target triple directly, bypassing extraction.

search_memory_facts

Searches facts/edges, with optional valid_at/invalid_at date-range filtering.

search_nodes

Searches for entities, optionally filtered by type or proximity to a center node.

build_communities

Detects clusters of related entities and produces higher-level community summaries.

Frequently asked questions

Can I query the graph as it existed at a past point in time?

Yes. Because every fact is bi-temporal, search_memory_facts accepts valid_at/invalid_at filters so you can ask what was true as of a given date, not just the current state.

What database does it need behind it?

The Docker Compose path pairs it with FalkorDB; it can also run against Neo4j if you already have that set up.