Urgent.News

What's breaking now, across hundreds of outlets.

AI

6 context types for agent memory

Graphiti is an open-source framework for constructing and querying temporal context graphs tailored for AI agents. These context graphs track how facts evolve over time, maintain provenance to their source data, and support both prescribed and learned ontologies. Unlike static knowledge graphs, Graphiti's context graphs can handle evolving, real-world data, making them ideal for agents that operate on dynamic datasets.

A key feature of Graphiti is its ability to integrate user interactions, structured and unstructured enterprise data, and external information into a coherent, queryable graph continuously. This integration enables incremental data updates, efficient retrieval, and precise historical queries without necessitating a complete graph recomputation. Consequently, Graphiti is well-suited for developing interactive, context-aware AI applications.

Each fact in a Graphiti context graph is associated with a validity window, specifying when it became true and when (if ever) it was superseded. This feature ensures that the information remains accurate and relevant over time. Entities in Graphiti's context graphs evolve with updated summaries, reflecting changes over time. All changes trace back to episodes, which are the raw data that produced them.

What sets Graphiti apart is its capacity to autonomously build context graphs from both unstructured and structured data. It adeptly manages changing relationships while preserving the full temporal history of the data. Graphiti serves as the open-source framework powering Zep's context infrastructure, enabling the development of scalable, low-latency context retrieval and assembly at scale.

Zep, the company behind Graphiti, offers a turnkey, enterprise-grade platform that provides governed, low-latency context retrieval and assembly for production deployments. This platform includes a proprietary graph database — the Context Graph Engine — designed for millions of context graphs with low-latency retrieval. This makes production deployments unnecessary to set up a separate third-party graph database.

Graphiti is particularly well-suited for applications that require real-time interaction and precise historical queries. It is designed to address the challenges posed by dynamic and frequently updated datasets, making it an excellent choice for AI applications that need to maintain up-to-date information and provide accurate historical context.

Graphiti is optimized to work with LLM services that support Structured Output, such as OpenAI, Anthropic, and Gemini. Using other services may lead to incorrect output schemas and ingestion failures, especially when using smaller models. This issue is compounded by the reliance on Neo4j or FalkorDB as the graph database backend.

While Kuzu, another graph database option, is deprecated and will be removed in a future release, Graphiti supports Neo4j, FalkorDB, Amazon Neptune, and other OpenAI-compatible providers. This flexibility allows Graphiti to integrate with various graph database systems, providing users with the option to choose the backend that best suits their needs.

The Graphiti framework is designed for high concurrency, making it efficient in handling multiple simultaneous tasks. However, to prevent LLM provider rate limit errors, concurrency is initially set low. Users can increase concurrency by adjusting the SEMAPHORE_LIMIT environment variable to boost episode ingestion performance. By default, Graphiti uses OpenAI for LLM inference and embedding, but it also supports Anthropic, Gemini, and Groq.

Graphiti provides a Model Context Protocol (MCP) server implementation that allows AI assistants to interact with its context graph capabilities via the MCP protocol. This server can be deployed using Docker and Neo4j, making it easy to integrate Graphiti into AI assistant workflows. The framework also includes an API service built with FastAPI for interacting with the Graphiti API.

To get started with Graphiti, users can follow the Quickstart Example provided in the examples directory. This example demonstrates the installation process, including the setup of Neo4j or FalkorDB as the graph database backend, the MCP server, and the API service. The quickstart is fully documented, providing clear explanations of each functionality and setup instructions, ensuring users can quickly begin utilizing Graphiti's capabilities in their AI applications.

Rewritten by urgent.news; may contain errors — check the original.

Source: github.com

Read the original at github.com →

Report a problem with this story

More in AI

What To Do When a Free LLM API Says 429

Every free LLM API says yes right up until the moment it says no. The no arrives as an HTTP 429, usually forty requests into a demo or halfway through a batch job, and most tutorials end the story at…

More from Friday 9 October →