graphiti-core 0.8.1__py3-none-any.whl → 0.8.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of graphiti-core might be problematic. Click here for more details.

@@ -30,10 +30,10 @@ EPISODIC_NODE_SAVE_BULK = """
30
30
  """
31
31
 
32
32
  ENTITY_NODE_SAVE = """
33
- MERGE (n:Entity {uuid: $uuid})
33
+ MERGE (n:Entity {uuid: $entity_data.uuid})
34
34
  SET n:$($labels)
35
35
  SET n = $entity_data
36
- WITH n CALL db.create.setNodeVectorProperty(n, "name_embedding", $name_embedding)
36
+ WITH n CALL db.create.setNodeVectorProperty(n, "name_embedding", $entity_data.name_embedding)
37
37
  RETURN n.uuid AS uuid"""
38
38
 
39
39
  ENTITY_NODE_SAVE_BULK = """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: graphiti-core
3
- Version: 0.8.1
3
+ Version: 0.8.2
4
4
  Summary: A temporal graph building library
5
5
  License: Apache-2.0
6
6
  Author: Paul Paliychuk
@@ -29,7 +29,7 @@ Description-Content-Type: text/markdown
29
29
  <h1 align="center">
30
30
  Graphiti
31
31
  </h1>
32
- <h2 align="center"> Temporal Knowledge Graphs for Agentic Applications</h2>
32
+ <h2 align="center"> Build Real-Time Knowledge Graphs for AI Agents</h2>
33
33
  <br />
34
34
 
35
35
  [![Discord](https://dcbadge.vercel.app/api/server/W8Kw6bsgXQ?style=flat)](https://discord.com/invite/W8Kw6bsgXQ)
@@ -41,9 +41,13 @@ Graphiti
41
41
  :star: _Help us reach more developers and grow the Graphiti community. Star this repo!_
42
42
  <br />
43
43
 
44
- Graphiti builds dynamic, temporally aware Knowledge Graphs that represent complex, evolving relationships between
45
- entities over time. Graphiti ingests both unstructured and structured data, and the resulting graph may be queried using
46
- a fusion of time, full-text, semantic, and graph algorithm approaches, effectively serving as a powerful memory layer for AI applications.
44
+ Graphiti is a framework for building and querying temporally-aware knowledge graphs, specifically tailored for AI agents operating in dynamic environments. Unlike traditional retrieval-augmented generation (RAG) methods, Graphiti continuously integrates user interactions, structured and unstructured enterprise data, and external information into a coherent, queryable graph. The framework supports incremental data updates, efficient retrieval, and precise historical queries without requiring complete graph recomputation, making it suitable for developing interactive, context-aware AI applications.
45
+
46
+ Use Graphiti to:
47
+
48
+ - Integrate and maintain dynamic user interactions and business data.
49
+ - Facilitate state-based reasoning and task automation for agents.
50
+ - Query complex, evolving data with semantic, keyword, and graph-based search methods.
47
51
 
48
52
  <br />
49
53
 
@@ -53,23 +57,14 @@ a fusion of time, full-text, semantic, and graph algorithm approaches, effective
53
57
 
54
58
  <br />
55
59
 
56
- Graphiti helps you create and query Knowledge Graphs that evolve over time. A knowledge graph is a network of
57
- interconnected facts, such as _“Kendra loves Adidas shoes.”_ Each fact is a “triplet” represented by two entities, or
60
+ A knowledge graph is a network of interconnected facts, such as _“Kendra loves Adidas shoes.”_ Each fact is a “triplet” represented by two entities, or
58
61
  nodes (_”Kendra”_, _“Adidas shoes”_), and their relationship, or edge (_”loves”_). Knowledge Graphs have been explored
59
62
  extensively for information retrieval. What makes Graphiti unique is its ability to autonomously build a knowledge graph
60
63
  while handling changing relationships and maintaining historical context.
61
64
 
62
- With Graphiti, you can build LLM applications such as:
63
-
64
- - Assistants that learn from user interactions, fusing personal knowledge with dynamic data from business systems like
65
- CRMs and billing platforms through robust conversation history management.
66
- - Agents that autonomously execute complex tasks, reasoning with state changes from multiple dynamic sources through persistent memory.
67
-
68
- Graphiti supports a wide range of applications in sales, customer service, health, finance, and more, enabling long-term recall and state-based reasoning for both assistants and agents.
69
-
70
65
  ## Graphiti and Zep Memory
71
66
 
72
- Graphiti powers the core of [Zep's memory layer](https://www.getzep.com) for LLM-powered Assistants and Agents.
67
+ Graphiti powers the core of [Zep's memory layer](https://www.getzep.com) for AI Agents.
73
68
 
74
69
  Using Graphiti, we've demonstrated Zep is
75
70
  the [State of the Art in Agent Memory](https://blog.getzep.com/state-of-the-art-agent-memory/).
@@ -84,28 +79,35 @@ We're excited to open-source Graphiti, believing its potential reaches far beyon
84
79
 
85
80
  ## Why Graphiti?
86
81
 
87
- We were intrigued by Microsoft's GraphRAG, which expanded on RAG (Retrieval-Augmented Generation) text chunking by using a graph to better model a
88
- document corpus and making this representation available via semantic and graph search techniques. However, GraphRAG did
89
- not address our core problem: It's primarily designed for static documents and doesn't inherently handle temporal
90
- aspects of data.
82
+ Traditional RAG approaches often rely on batch processing and static data summarization, making them inefficient for frequently changing data. Graphiti addresses these challenges by providing:
91
83
 
92
- Graphiti is designed from the ground up to handle constantly changing information, hybrid semantic and graph search, and
93
- scale:
94
-
95
- - **Temporal Awareness:** Tracks changes in facts and relationships over time, enabling point-in-time queries. Graph
96
- edges include temporal metadata to record relationship lifecycles, creating a comprehensive context window extension.
97
- - **Episodic Processing:** Ingests data as discrete episodes, maintaining data provenance and allowing incremental
98
- entity and relationship extraction, ideal for chat state management.
99
- - **Hybrid Search:** Combines semantic and BM25 full-text search, with the ability to rerank results by distance from a
100
- central node e.g. "Kendra".
101
- - **Scalable:** Designed for processing large datasets, with parallelization of LLM calls for bulk processing while
102
- preserving the chronology of events and enabling efficient knowledge retrieval.
103
- - **Supports Varied Sources:** Can ingest both unstructured text and structured JSON data.
84
+ - **Real-Time Incremental Updates:** Immediate integration of new data episodes without batch recomputation.
85
+ - **Bi-Temporal Data Model:** Explicit tracking of event occurrence and ingestion times, allowing accurate point-in-time queries.
86
+ - **Efficient Hybrid Retrieval:** Combines semantic embeddings, keyword (BM25), and graph traversal to achieve low-latency queries without reliance on LLM summarization.
87
+ - **Custom Entity Definitions:** Flexible ontology creation and support for developer-defined entities through straightforward Pydantic models.
88
+ - **Scalability:** Efficiently manages large datasets with parallel processing, suitable for enterprise environments.
104
89
 
105
90
  <p align="center">
106
91
  <img src="/images/graphiti-intro-slides-stock-2.gif" alt="Graphiti structured + unstructured demo" width="700px">
107
92
  </p>
108
93
 
94
+ ## Graphiti vs. GraphRAG
95
+
96
+ | Aspect | GraphRAG | Graphiti |
97
+ | -------------------------- | ------------------------------------- | ------------------------------------------------ |
98
+ | **Primary Use** | Static document summarization | Dynamic data management |
99
+ | **Data Handling** | Batch-oriented processing | Continuous, incremental updates |
100
+ | **Knowledge Structure** | Entity clusters & community summaries | Episodic data, semantic entities, communities |
101
+ | **Retrieval Method** | Sequential LLM summarization | Hybrid semantic, keyword, and graph-based search |
102
+ | **Adaptability** | Low | High |
103
+ | **Temporal Handling** | Basic timestamp tracking | Explicit bi-temporal tracking |
104
+ | **Contradiction Handling** | LLM-driven summarization judgments | Temporal edge invalidation |
105
+ | **Query Latency** | Seconds to tens of seconds | Typically sub-second latency |
106
+ | **Custom Entity Types** | No | Yes, customizable |
107
+ | **Scalability** | Moderate | High, optimized for large datasets |
108
+
109
+ Graphiti is specifically designed to address the challenges of dynamic and frequently updated datasets, making it particularly suitable for applications requiring real-time interaction and precise historical queries.
110
+
109
111
  ## Installation
110
112
 
111
113
  Requirements:
@@ -280,6 +282,7 @@ Graphiti is under active development. We aim to maintain API stability while wor
280
282
  - Allow developers to provide their own defined node and edge classes when ingesting episodes
281
283
  - Enable more flexible knowledge representation tailored to specific use cases
282
284
  - [x] Enhancing retrieval capabilities with more robust and configurable options
285
+ - [ ] Graphiti MCP Server
283
286
  - [ ] Expanding test coverage to ensure reliability and catch edge cases
284
287
 
285
288
  ## Contributing
@@ -24,7 +24,7 @@ graphiti_core/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
24
24
  graphiti_core/models/edges/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
25
25
  graphiti_core/models/edges/edge_db_queries.py,sha256=2UoLkmazO-FJYqjc3g0LuL-pyjekzQxxed_XHVv_HZE,2671
26
26
  graphiti_core/models/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- graphiti_core/models/nodes/node_db_queries.py,sha256=f4_UT6XL8UDt4_CO9YIHeI8pvpw_vrutA9SYrgi6QCU,2121
27
+ graphiti_core/models/nodes/node_db_queries.py,sha256=AQgRGVO-GgFWfLq1G6k8s86WItwpXruy3Mj4DBli-vM,2145
28
28
  graphiti_core/nodes.py,sha256=0lH8SOpnzTtNIvG4ScnJ3SeQudviCsZwsnM867kY1aI,16998
29
29
  graphiti_core/prompts/__init__.py,sha256=EA-x9xUki9l8wnu2l8ek_oNf75-do5tq5hVq7Zbv8Kw,101
30
30
  graphiti_core/prompts/dedupe_edges.py,sha256=EuX8ngeItBzrlMBOgeHrpExzxIFHD2aoDyaX1ZniF6I,3556
@@ -55,7 +55,7 @@ graphiti_core/utils/maintenance/graph_data_operations.py,sha256=qds9ALk9PhpQs1CN
55
55
  graphiti_core/utils/maintenance/node_operations.py,sha256=H0DAL2Qau4weIcEIrVVSdntVQtN_y4Hzoik6GldP1XA,15223
56
56
  graphiti_core/utils/maintenance/temporal_operations.py,sha256=RdNtubCyYhOVrvcOIq2WppHls1Q-BEjtsN8r38l-Rtc,3691
57
57
  graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
58
- graphiti_core-0.8.1.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
59
- graphiti_core-0.8.1.dist-info/METADATA,sha256=uc7lXSL18BV_rym3hPlfLvA9l27Mrnx206rWvr9bT00,12583
60
- graphiti_core-0.8.1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
61
- graphiti_core-0.8.1.dist-info/RECORD,,
58
+ graphiti_core-0.8.2.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
59
+ graphiti_core-0.8.2.dist-info/METADATA,sha256=NtjJHZn-nXyZb4ojlhL5ZLPmlWn3kk7t6j5xdv9KQPE,13585
60
+ graphiti_core-0.8.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
61
+ graphiti_core-0.8.2.dist-info/RECORD,,