graphiti-core 0.12.0rc1__py3-none-any.whl → 0.24.3__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.
Files changed (68) hide show
  1. graphiti_core/cross_encoder/bge_reranker_client.py +12 -2
  2. graphiti_core/cross_encoder/gemini_reranker_client.py +161 -0
  3. graphiti_core/cross_encoder/openai_reranker_client.py +7 -5
  4. graphiti_core/decorators.py +110 -0
  5. graphiti_core/driver/__init__.py +19 -0
  6. graphiti_core/driver/driver.py +124 -0
  7. graphiti_core/driver/falkordb_driver.py +362 -0
  8. graphiti_core/driver/graph_operations/graph_operations.py +191 -0
  9. graphiti_core/driver/kuzu_driver.py +182 -0
  10. graphiti_core/driver/neo4j_driver.py +117 -0
  11. graphiti_core/driver/neptune_driver.py +305 -0
  12. graphiti_core/driver/search_interface/search_interface.py +89 -0
  13. graphiti_core/edges.py +287 -172
  14. graphiti_core/embedder/azure_openai.py +71 -0
  15. graphiti_core/embedder/client.py +2 -1
  16. graphiti_core/embedder/gemini.py +116 -22
  17. graphiti_core/embedder/voyage.py +13 -2
  18. graphiti_core/errors.py +8 -0
  19. graphiti_core/graph_queries.py +162 -0
  20. graphiti_core/graphiti.py +705 -193
  21. graphiti_core/graphiti_types.py +4 -2
  22. graphiti_core/helpers.py +87 -10
  23. graphiti_core/llm_client/__init__.py +16 -0
  24. graphiti_core/llm_client/anthropic_client.py +159 -56
  25. graphiti_core/llm_client/azure_openai_client.py +115 -0
  26. graphiti_core/llm_client/client.py +98 -21
  27. graphiti_core/llm_client/config.py +1 -1
  28. graphiti_core/llm_client/gemini_client.py +290 -41
  29. graphiti_core/llm_client/groq_client.py +14 -3
  30. graphiti_core/llm_client/openai_base_client.py +261 -0
  31. graphiti_core/llm_client/openai_client.py +56 -132
  32. graphiti_core/llm_client/openai_generic_client.py +91 -56
  33. graphiti_core/models/edges/edge_db_queries.py +259 -35
  34. graphiti_core/models/nodes/node_db_queries.py +311 -32
  35. graphiti_core/nodes.py +420 -205
  36. graphiti_core/prompts/dedupe_edges.py +46 -32
  37. graphiti_core/prompts/dedupe_nodes.py +67 -42
  38. graphiti_core/prompts/eval.py +4 -4
  39. graphiti_core/prompts/extract_edges.py +27 -16
  40. graphiti_core/prompts/extract_nodes.py +74 -31
  41. graphiti_core/prompts/prompt_helpers.py +39 -0
  42. graphiti_core/prompts/snippets.py +29 -0
  43. graphiti_core/prompts/summarize_nodes.py +23 -25
  44. graphiti_core/search/search.py +158 -82
  45. graphiti_core/search/search_config.py +39 -4
  46. graphiti_core/search/search_filters.py +126 -35
  47. graphiti_core/search/search_helpers.py +5 -6
  48. graphiti_core/search/search_utils.py +1405 -485
  49. graphiti_core/telemetry/__init__.py +9 -0
  50. graphiti_core/telemetry/telemetry.py +117 -0
  51. graphiti_core/tracer.py +193 -0
  52. graphiti_core/utils/bulk_utils.py +364 -285
  53. graphiti_core/utils/datetime_utils.py +13 -0
  54. graphiti_core/utils/maintenance/community_operations.py +67 -49
  55. graphiti_core/utils/maintenance/dedup_helpers.py +262 -0
  56. graphiti_core/utils/maintenance/edge_operations.py +339 -197
  57. graphiti_core/utils/maintenance/graph_data_operations.py +50 -114
  58. graphiti_core/utils/maintenance/node_operations.py +319 -238
  59. graphiti_core/utils/maintenance/temporal_operations.py +11 -3
  60. graphiti_core/utils/ontology_utils/entity_types_utils.py +1 -1
  61. graphiti_core/utils/text_utils.py +53 -0
  62. graphiti_core-0.24.3.dist-info/METADATA +726 -0
  63. graphiti_core-0.24.3.dist-info/RECORD +86 -0
  64. {graphiti_core-0.12.0rc1.dist-info → graphiti_core-0.24.3.dist-info}/WHEEL +1 -1
  65. graphiti_core-0.12.0rc1.dist-info/METADATA +0 -350
  66. graphiti_core-0.12.0rc1.dist-info/RECORD +0 -66
  67. /graphiti_core/{utils/maintenance/utils.py → migrations/__init__.py} +0 -0
  68. {graphiti_core-0.12.0rc1.dist-info → graphiti_core-0.24.3.dist-info/licenses}/LICENSE +0 -0
@@ -0,0 +1,86 @@
1
+ graphiti_core/__init__.py,sha256=e5SWFkRiaUwfprYIeIgVIh7JDedNiloZvd3roU-0aDY,55
2
+ graphiti_core/decorators.py,sha256=tqSICazrXEzQ96MXKbnl_07Y7ah8OuH8rJqRKEOC0q8,4205
3
+ graphiti_core/edges.py,sha256=JZZGo6G2HTYv-aaE-s8P7yIXkdHaNqg5UGGPDV4nZOI,20201
4
+ graphiti_core/errors.py,sha256=cH_v9TPgEPeQE6GFOHIg5TvejpUCBddGarMY2Whxbwc,2707
5
+ graphiti_core/graph_queries.py,sha256=ZWMqAo5pwb8PO5ddg4zZ0ArhHWuWV42g3R9ULIxsHOs,8058
6
+ graphiti_core/graphiti.py,sha256=6HsRHx5CFe7D6XhJ_53pVQr5UJlDM-G1QPzUOKklSQE,47700
7
+ graphiti_core/graphiti_types.py,sha256=_v-XsMgV-bBbi5P-PoRVyGJEdHEDJR-Khmv4cU0oZ-4,1094
8
+ graphiti_core/helpers.py,sha256=q8kbL9gz8igdlh-oMUS-ylUyeMlXZb-ccf-HQkrES_0,5184
9
+ graphiti_core/nodes.py,sha256=W_Lx0x3YbJoNRVDGO2Mf9s3MwDFu2NolQl-15jFpr0U,27383
10
+ graphiti_core/py.typed,sha256=vlmmzQOt7bmeQl9L3XJP4W6Ry0iiELepnOrinKz5KQg,79
11
+ graphiti_core/tracer.py,sha256=5L05H8PdJ1eqhmcHuYTtwMThVGVUdUzTdiFd_-07H4E,6149
12
+ graphiti_core/cross_encoder/__init__.py,sha256=hry59vz21x-AtGZ0MJ7ugw0HTwJkXiddpp_Yqnwsen0,723
13
+ graphiti_core/cross_encoder/bge_reranker_client.py,sha256=y3TfFxZh0Yvj6HUShmfUm6MC7OPXwWUlv1Qe5HF3S3I,1797
14
+ graphiti_core/cross_encoder/client.py,sha256=KLsbfWKOEaAV3adFe3XZlAeb-gje9_sVKCVZTaJP3ac,1441
15
+ graphiti_core/cross_encoder/gemini_reranker_client.py,sha256=DRTZ8uY8_WoaN83FzTm_TppvRay0tH4KEynMXHAYiZY,6194
16
+ graphiti_core/cross_encoder/openai_reranker_client.py,sha256=WHMl6Q6gEslR2EzjwpFSZt2Kh6bnu8alkLvzmi0MDtg,4674
17
+ graphiti_core/driver/__init__.py,sha256=kCWimqQU19airu5gKwCmZtZuXkDfaQfKSUhMDoL-rTA,626
18
+ graphiti_core/driver/driver.py,sha256=BmsOrUoUqfdgd3487Vs4WJtl_srSL-szxGRtVBGUeJc,3789
19
+ graphiti_core/driver/falkordb_driver.py,sha256=siztncHLSMqn-GbxkW5y2ybS6kEpjrV_2ZTb9t7FSIg,12877
20
+ graphiti_core/driver/kuzu_driver.py,sha256=SZfbRffC0hz1i5Xnlkx79Z_o4iNKf4barrxdlfrmBgo,5775
21
+ graphiti_core/driver/neo4j_driver.py,sha256=mnsAStRAid9Y47-_vW0ccCDV6q48SvVgVjMFUxNkgRc,3893
22
+ graphiti_core/driver/neptune_driver.py,sha256=9-MHqgE-Iobzyk1OYO_R1o0AplueSyG25uFYhnCeZi8,11517
23
+ graphiti_core/driver/graph_operations/graph_operations.py,sha256=9Qxs4za1kUNnpGzkO_z2zX4wPvYq6KWan30WlCH-vw8,5284
24
+ graphiti_core/driver/search_interface/search_interface.py,sha256=-lnPsXdv_4feULbOnuWUQN2wmLqcUkGMwmR74jaFyMI,2500
25
+ graphiti_core/embedder/__init__.py,sha256=EL564ZuE-DZjcuKNUK_exMn_XHXm2LdO9fzdXePVKL4,179
26
+ graphiti_core/embedder/azure_openai.py,sha256=9RrwazkMoY6LARFrIXwf1NryIJSg8bCCv8aXiY4gOcQ,2525
27
+ graphiti_core/embedder/client.py,sha256=BXFMXvuPWxaAzPaPILnxtqQQ4JWBFQv9GdBLOXUWgwE,1158
28
+ graphiti_core/embedder/gemini.py,sha256=s3_2xjHdFTIuF-fJlBFwh64XK5BLPHHThuBymDpM5Jo,7194
29
+ graphiti_core/embedder/openai.py,sha256=bIThUoLMeGlHG2-3VikzK6JZfOHKn4PKvUMx5sHxJy8,2192
30
+ graphiti_core/embedder/voyage.py,sha256=oJHAZiNqjdEJOKgoKfGWcxK2-Ewqn5UB3vrBwIwP2u4,2546
31
+ graphiti_core/llm_client/__init__.py,sha256=QgBWUiCeBp6YiA_xqyrDvJ9jIyy1hngH8g7FWahN3nw,776
32
+ graphiti_core/llm_client/anthropic_client.py,sha256=JPi7uMtvSOCL5LNOBMc45TF-o4OBDzRuLbBYO42RSWA,16571
33
+ graphiti_core/llm_client/azure_openai_client.py,sha256=VCiNfDpSbFQYr6AvNhaxHoyr03fu_uUYF1j5HfEoTpo,3909
34
+ graphiti_core/llm_client/client.py,sha256=lbKsM1fSFgsCtdD7mXDh9mnoD3QiqQpDIZW2IfiYllQ,8856
35
+ graphiti_core/llm_client/config.py,sha256=pivp29CDIbDPqgw5NF9Ok2AwcqTV5z5_Q1bgNs1CDGs,2560
36
+ graphiti_core/llm_client/errors.py,sha256=pn6brRiLW60DAUIXJYKBT6MInrS4ueuH1hNLbn_JbQo,1243
37
+ graphiti_core/llm_client/gemini_client.py,sha256=xRYeFXhNfzwt2o__Qv5-rCxuub-4-hgvQpaawEhsN0c,18746
38
+ graphiti_core/llm_client/groq_client.py,sha256=bYLE_cg1QEhugsJOXh4b1vPbxagKeMWqk48240GCzMs,2922
39
+ graphiti_core/llm_client/openai_base_client.py,sha256=GY4PIOFeLSFEIBowxk0JJ5LwiXdnDYpYxIWPZclOlXY,10064
40
+ graphiti_core/llm_client/openai_client.py,sha256=rNLhYJobsDMa4awO0HgPpePdqKjdDZc-K3WCMlONUtw,4235
41
+ graphiti_core/llm_client/openai_generic_client.py,sha256=9cXfGQxAxD8hQOXoHTKiPbqKgHzzneaJCgE_WAJ4zzM,8606
42
+ graphiti_core/llm_client/utils.py,sha256=zKpxXEbKa369m4W7RDEf-m56kH46V1Mx3RowcWZEWWs,1000
43
+ graphiti_core/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
+ graphiti_core/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
45
+ graphiti_core/models/edges/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
+ graphiti_core/models/edges/edge_db_queries.py,sha256=CXl2_HfCjf4YSQl7pYjTwDS_OJBlK-lOUNVoKN1vMS4,10920
47
+ graphiti_core/models/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
+ graphiti_core/models/nodes/node_db_queries.py,sha256=tDmJmRz51FkepRHEhU6eSukQKZZLPkkeN8YfRAiiKyE,12901
49
+ graphiti_core/prompts/__init__.py,sha256=EA-x9xUki9l8wnu2l8ek_oNf75-do5tq5hVq7Zbv8Kw,101
50
+ graphiti_core/prompts/dedupe_edges.py,sha256=nikgVW2P53MtOlT_ycTUyViu2eHFJm2EmQad5ZqfEos,6199
51
+ graphiti_core/prompts/dedupe_nodes.py,sha256=uQrMPAr019KVUzbOslP3VDLaDG4tXp_BqWEtoY0OHbw,8836
52
+ graphiti_core/prompts/eval.py,sha256=GWFkfZoPfY8U7mV8Ngd_5a2S2fHS7KjajChntxv1UEY,5360
53
+ graphiti_core/prompts/extract_edge_dates.py,sha256=3Drs3CmvP0gJN5BidWSxrNvLet3HPoTybU3BUIAoc0Y,4218
54
+ graphiti_core/prompts/extract_edges.py,sha256=8grBkWBKQXFjUZgUiLSu8c0PMs2v7e-WvJmMQcXxFpk,7073
55
+ graphiti_core/prompts/extract_nodes.py,sha256=4424s6Q0617vna1pYfoO4b_nVB4GMZj6LDiqA5cOrq0,10915
56
+ graphiti_core/prompts/invalidate_edges.py,sha256=yfpcs_pyctnoM77ULPZXEtKW0oHr1MeLsJzC5yrE-o4,3547
57
+ graphiti_core/prompts/lib.py,sha256=DCyHePM4_q-CptTpEXGO_dBv9k7xDtclEaB1dGu7EcI,4092
58
+ graphiti_core/prompts/models.py,sha256=NgxdbPHJpBEcpbXovKyScgpBc73Q-GIW-CBDlBtDjto,894
59
+ graphiti_core/prompts/prompt_helpers.py,sha256=YyiFQdSNmNzF-n9n7fAqgeykbkK-BQP3i2GHZ8go-8Q,1423
60
+ graphiti_core/prompts/snippets.py,sha256=E63cWzyYFjEIgVXmtfN1P6vkMgW65ECG34gfgcgBY4k,1649
61
+ graphiti_core/prompts/summarize_nodes.py,sha256=0peLcxk13P4Xl8irXLXqEito1hhJiTUwNjUqL8olcY8,3962
62
+ graphiti_core/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
+ graphiti_core/search/search.py,sha256=pSfyLJDRAv6yF9-A5l43bt0GvtHgCeVQbKQ5XBqDAzU,18436
64
+ graphiti_core/search/search_config.py,sha256=Q7vFALFqgU-IsDYbGjzcLlHzVIB0ieunPKQHpsk1IVc,5276
65
+ graphiti_core/search/search_config_recipes.py,sha256=4GquRphHhJlpXQhAZOySYnCzBWYoTwxlJj44eTOavZQ,7443
66
+ graphiti_core/search/search_filters.py,sha256=cBp88VvlEsmfiNnXAZG3GleFt8mglQAbttGWYJQos28,9269
67
+ graphiti_core/search/search_helpers.py,sha256=oty-IHVPf_0HxXsSGx21iPML9hMACDcECmdhkGltmVg,2691
68
+ graphiti_core/search/search_utils.py,sha256=vT0G62T6JXE9bqRJFeLg4dKcHVtJpIOGkmufuvBHw28,71754
69
+ graphiti_core/telemetry/__init__.py,sha256=5kALLDlU9bb2v19CdN7qVANsJWyfnL9E60J6FFgzm3o,226
70
+ graphiti_core/telemetry/telemetry.py,sha256=47LrzOVBCcZxsYPsnSxWFiztHoxYKKxPwyRX0hnbDGc,3230
71
+ graphiti_core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
+ graphiti_core/utils/bulk_utils.py,sha256=LijfbnUgNfH8BF6DFnmF1YvmKnOIjkJFbcTXo3udzhM,19816
73
+ graphiti_core/utils/datetime_utils.py,sha256=J-zYSq7-H-2n9hYOXNIun12kM10vNX9mMATGR_egTmY,1806
74
+ graphiti_core/utils/text_utils.py,sha256=eHGJwW0jX1CHWBrQy86-KQ-KguzRBNdaLa8zmq8a6bo,1687
75
+ graphiti_core/utils/maintenance/__init__.py,sha256=vW4H1KyapTl-OOz578uZABYcpND4wPx3Vt6aAPaXh78,301
76
+ graphiti_core/utils/maintenance/community_operations.py,sha256=OzNo9DW47YWTy67aoq91wRgnKWVelOYduaJpIERdPFY,10803
77
+ graphiti_core/utils/maintenance/dedup_helpers.py,sha256=B7k6KkB6Sii8PZCWNNTvsNiy4BNTNWpoLeGgrPLq6BE,9220
78
+ graphiti_core/utils/maintenance/edge_operations.py,sha256=KuBPlFXHnlWM7smLOfaM-ExhPdlakLdyJV4cxO9U4tI,27187
79
+ graphiti_core/utils/maintenance/graph_data_operations.py,sha256=vZ1kazYBC-ZRysb13CDFfhoiEH_K_DOW_vfEp1JXEnc,3997
80
+ graphiti_core/utils/maintenance/node_operations.py,sha256=70G-Kf1mQJ_9XTi9MJmq5dqC28VJHRxkoAwgMRx4Gvo,20143
81
+ graphiti_core/utils/maintenance/temporal_operations.py,sha256=LWMw8D8-XOZkl412QKa5qOe9vsX_kOhis_dZlwSXY14,3539
82
+ graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=4eVgxLWY6Q8k9cRJ5pW59IYF--U4nXZsZIGOVb_yHfQ,1285
83
+ graphiti_core-0.24.3.dist-info/METADATA,sha256=9imUX3fGZvz93AlJH_rKUVH7csX5e6SkMiM4hjKFdZc,27853
84
+ graphiti_core-0.24.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
85
+ graphiti_core-0.24.3.dist-info/licenses/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
86
+ graphiti_core-0.24.3.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.1.2
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,350 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: graphiti-core
3
- Version: 0.12.0rc1
4
- Summary: A temporal graph building library
5
- License: Apache-2.0
6
- Author: Paul Paliychuk
7
- Author-email: paul@getzep.com
8
- Requires-Python: >=3.10,<4
9
- Classifier: License :: OSI Approved :: Apache Software License
10
- Classifier: Programming Language :: Python :: 3
11
- Classifier: Programming Language :: Python :: 3.10
12
- Classifier: Programming Language :: Python :: 3.11
13
- Classifier: Programming Language :: Python :: 3.12
14
- Classifier: Programming Language :: Python :: 3.13
15
- Provides-Extra: anthropic
16
- Provides-Extra: google-genai
17
- Provides-Extra: groq
18
- Requires-Dist: anthropic (>=0.49.0) ; extra == "anthropic"
19
- Requires-Dist: diskcache (>=5.6.3)
20
- Requires-Dist: google-genai (>=1.8.0) ; extra == "google-genai"
21
- Requires-Dist: groq (>=0.2.0) ; extra == "groq"
22
- Requires-Dist: neo4j (>=5.23.0)
23
- Requires-Dist: numpy (>=1.0.0)
24
- Requires-Dist: openai (>=1.53.0)
25
- Requires-Dist: pydantic (>=2.8.2)
26
- Requires-Dist: python-dotenv (>=1.0.1)
27
- Requires-Dist: tenacity (>=9.0.0)
28
- Project-URL: Homepage, https://help.getzep.com/graphiti/graphiti/overview
29
- Project-URL: Repository, https://github.com/getzep/graphiti
30
- Description-Content-Type: text/markdown
31
-
32
- <p align="center">
33
- <a href="https://www.getzep.com/">
34
- <img src="https://github.com/user-attachments/assets/119c5682-9654-4257-8922-56b7cb8ffd73" width="150" alt="Zep Logo">
35
- </a>
36
- </p>
37
-
38
- <h1 align="center">
39
- Graphiti
40
- </h1>
41
- <h2 align="center"> Build Real-Time Knowledge Graphs for AI Agents</h2>
42
- <div align="center">
43
-
44
- [![Lint](https://github.com/getzep/Graphiti/actions/workflows/lint.yml/badge.svg?style=flat)](https://github.com/getzep/Graphiti/actions/workflows/lint.yml)
45
- [![Unit Tests](https://github.com/getzep/Graphiti/actions/workflows/unit_tests.yml/badge.svg)](https://github.com/getzep/Graphiti/actions/workflows/unit_tests.yml)
46
- [![MyPy Check](https://github.com/getzep/Graphiti/actions/workflows/typecheck.yml/badge.svg)](https://github.com/getzep/Graphiti/actions/workflows/typecheck.yml)
47
-
48
- ![GitHub Repo stars](https://img.shields.io/github/stars/getzep/graphiti)
49
- [![Discord](https://dcbadge.vercel.app/api/server/W8Kw6bsgXQ?style=flat)](https://discord.com/invite/W8Kw6bsgXQ)
50
- [![arXiv](https://img.shields.io/badge/arXiv-2501.13956-b31b1b.svg?style=flat)](https://arxiv.org/abs/2501.13956)
51
- [![Release](https://img.shields.io/github/v/release/getzep/graphiti?style=flat&label=Release&color=limegreen)](https://github.com/getzep/graphiti/releases)
52
-
53
- </div>
54
- <div align="center">
55
-
56
- <a href="https://trendshift.io/repositories/12986" target="_blank"><img src="https://trendshift.io/api/badge/repositories/12986" alt="getzep%2Fgraphiti | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
57
-
58
- </div>
59
-
60
- :star: _Help us reach more developers and grow the Graphiti community. Star this repo!_
61
-
62
- <br />
63
-
64
- > [!TIP]
65
- > Check out the new [MCP server for Graphiti](mcp_server/README.md)! Give Claude, Cursor, and other MCP clients powerful Knowledge Graph-based memory.
66
-
67
- 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.
68
-
69
- Use Graphiti to:
70
-
71
- - Integrate and maintain dynamic user interactions and business data.
72
- - Facilitate state-based reasoning and task automation for agents.
73
- - Query complex, evolving data with semantic, keyword, and graph-based search methods.
74
-
75
- <br />
76
-
77
- <p align="center">
78
- <img src="images/graphiti-graph-intro.gif" alt="Graphiti temporal walkthrough" width="700px">
79
- </p>
80
-
81
- <br />
82
-
83
- 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
84
- nodes ("Kendra", "Adidas shoes"), and their relationship, or edge ("loves"). Knowledge Graphs have been explored
85
- extensively for information retrieval. What makes Graphiti unique is its ability to autonomously build a knowledge graph
86
- while handling changing relationships and maintaining historical context.
87
-
88
- ## Graphiti and Zep Memory
89
-
90
- Graphiti powers the core of [Zep's memory layer](https://www.getzep.com) for AI Agents.
91
-
92
- Using Graphiti, we've demonstrated Zep is
93
- the [State of the Art in Agent Memory](https://blog.getzep.com/state-of-the-art-agent-memory/).
94
-
95
- Read our paper: [Zep: A Temporal Knowledge Graph Architecture for Agent Memory](https://arxiv.org/abs/2501.13956).
96
-
97
- We're excited to open-source Graphiti, believing its potential reaches far beyond AI memory applications.
98
-
99
- <p align="center">
100
- <a href="https://arxiv.org/abs/2501.13956"><img src="images/arxiv-screenshot.png" alt="Zep: A Temporal Knowledge Graph Architecture for Agent Memory" width="700px"></a>
101
- </p>
102
-
103
- ## Why Graphiti?
104
-
105
- 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:
106
-
107
- - **Real-Time Incremental Updates:** Immediate integration of new data episodes without batch recomputation.
108
- - **Bi-Temporal Data Model:** Explicit tracking of event occurrence and ingestion times, allowing accurate point-in-time queries.
109
- - **Efficient Hybrid Retrieval:** Combines semantic embeddings, keyword (BM25), and graph traversal to achieve low-latency queries without reliance on LLM summarization.
110
- - **Custom Entity Definitions:** Flexible ontology creation and support for developer-defined entities through straightforward Pydantic models.
111
- - **Scalability:** Efficiently manages large datasets with parallel processing, suitable for enterprise environments.
112
-
113
- <p align="center">
114
- <img src="/images/graphiti-intro-slides-stock-2.gif" alt="Graphiti structured + unstructured demo" width="700px">
115
- </p>
116
-
117
- ## Graphiti vs. GraphRAG
118
-
119
- | Aspect | GraphRAG | Graphiti |
120
- | -------------------------- | ------------------------------------- | ------------------------------------------------ |
121
- | **Primary Use** | Static document summarization | Dynamic data management |
122
- | **Data Handling** | Batch-oriented processing | Continuous, incremental updates |
123
- | **Knowledge Structure** | Entity clusters & community summaries | Episodic data, semantic entities, communities |
124
- | **Retrieval Method** | Sequential LLM summarization | Hybrid semantic, keyword, and graph-based search |
125
- | **Adaptability** | Low | High |
126
- | **Temporal Handling** | Basic timestamp tracking | Explicit bi-temporal tracking |
127
- | **Contradiction Handling** | LLM-driven summarization judgments | Temporal edge invalidation |
128
- | **Query Latency** | Seconds to tens of seconds | Typically sub-second latency |
129
- | **Custom Entity Types** | No | Yes, customizable |
130
- | **Scalability** | Moderate | High, optimized for large datasets |
131
-
132
- 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.
133
-
134
- ## Installation
135
-
136
- Requirements:
137
-
138
- - Python 3.10 or higher
139
- - Neo4j 5.26 or higher (serves as the embeddings storage backend)
140
- - OpenAI API key (for LLM inference and embedding)
141
-
142
- > [!IMPORTANT]
143
- > Graphiti works best with LLM services that support Structured Output (such as OpenAI and Gemini).
144
- > Using other services may result in incorrect output schemas and ingestion failures. This is particularly
145
- > problematic when using smaller models.
146
-
147
- Optional:
148
-
149
- - Google Gemini, Anthropic, or Groq API key (for alternative LLM providers)
150
-
151
- > [!TIP]
152
- > The simplest way to install Neo4j is via [Neo4j Desktop](https://neo4j.com/download/). It provides a user-friendly
153
- > interface to manage Neo4j instances and databases.
154
-
155
- ```bash
156
- pip install graphiti-core
157
- ```
158
-
159
- or
160
-
161
- ```bash
162
- poetry add graphiti-core
163
- ```
164
-
165
- You can also install optional LLM providers as extras:
166
-
167
- ```bash
168
- # Install with Anthropic support
169
- pip install graphiti-core[anthropic]
170
-
171
- # Install with Groq support
172
- pip install graphiti-core[groq]
173
-
174
- # Install with Google Gemini support
175
- pip install graphiti-core[google-genai]
176
-
177
- # Install with multiple providers
178
- pip install graphiti-core[anthropic,groq,google-genai]
179
- ```
180
-
181
- ## Quick Start
182
-
183
- > [!IMPORTANT]
184
- > Graphiti uses OpenAI for LLM inference and embedding. Ensure that an `OPENAI_API_KEY` is set in your environment.
185
- > Support for Anthropic and Groq LLM inferences is available, too. Other LLM providers may be supported via OpenAI
186
- > compatible APIs.
187
-
188
- For a complete working example, see the [Quickstart Example](./examples/quickstart/README.md) in the examples directory. The quickstart demonstrates:
189
-
190
- 1. Connecting to a Neo4j database
191
- 2. Initializing Graphiti indices and constraints
192
- 3. Adding episodes to the graph (both text and structured JSON)
193
- 4. Searching for relationships (edges) using hybrid search
194
- 5. Reranking search results using graph distance
195
- 6. Searching for nodes using predefined search recipes
196
-
197
- The example is fully documented with clear explanations of each functionality and includes a comprehensive README with setup instructions and next steps.
198
-
199
- ## MCP Server
200
-
201
- The `mcp_server` directory contains a Model Context Protocol (MCP) server implementation for Graphiti. This server allows AI assistants to interact with Graphiti's knowledge graph capabilities through the MCP protocol.
202
-
203
- Key features of the MCP server include:
204
-
205
- - Episode management (add, retrieve, delete)
206
- - Entity management and relationship handling
207
- - Semantic and hybrid search capabilities
208
- - Group management for organizing related data
209
- - Graph maintenance operations
210
-
211
- The MCP server can be deployed using Docker with Neo4j, making it easy to integrate Graphiti into your AI assistant workflows.
212
-
213
- For detailed setup instructions and usage examples, see the [MCP server README](./mcp_server/README.md).
214
-
215
- ## REST Service
216
-
217
- The `server` directory contains an API service for interacting with the Graphiti API. It is built using FastAPI.
218
-
219
- Please see the [server README](./server/README.md) for more information.
220
-
221
- ## Optional Environment Variables
222
-
223
- In addition to the Neo4j and OpenAi-compatible credentials, Graphiti also has a few optional environment variables.
224
- If you are using one of our supported models, such as Anthropic or Voyage models, the necessary environment variables
225
- must be set.
226
-
227
- `USE_PARALLEL_RUNTIME` is an optional boolean variable that can be set to true if you wish
228
- to enable Neo4j's parallel runtime feature for several of our search queries.
229
- Note that this feature is not supported for Neo4j Community edition or for smaller AuraDB instances,
230
- as such this feature is off by default.
231
-
232
- ## Using Graphiti with Azure OpenAI
233
-
234
- Graphiti supports Azure OpenAI for both LLM inference and embeddings. To use Azure OpenAI, you'll need to configure both the LLM client and embedder with your Azure OpenAI credentials.
235
-
236
- ```python
237
- from openai import AsyncAzureOpenAI
238
- from graphiti_core import Graphiti
239
- from graphiti_core.llm_client import OpenAIClient
240
- from graphiti_core.embedder.openai import OpenAIEmbedder, OpenAIEmbedderConfig
241
- from graphiti_core.cross_encoder.openai_reranker_client import OpenAIRerankerClient
242
-
243
- # Azure OpenAI configuration
244
- api_key = "<your-api-key>"
245
- api_version = "<your-api-version>"
246
- azure_endpoint = "<your-azure-endpoint>"
247
-
248
- # Create Azure OpenAI client for LLM
249
- azure_openai_client = AsyncAzureOpenAI(
250
- api_key=api_key,
251
- api_version=api_version,
252
- azure_endpoint=azure_endpoint
253
- )
254
-
255
- # Initialize Graphiti with Azure OpenAI clients
256
- graphiti = Graphiti(
257
- "bolt://localhost:7687",
258
- "neo4j",
259
- "password",
260
- llm_client=OpenAIClient(
261
- client=azure_openai_client
262
- ),
263
- embedder=OpenAIEmbedder(
264
- config=OpenAIEmbedderConfig(
265
- embedding_model="text-embedding-3-small" # Use your Azure deployed embedding model name
266
- ),
267
- client=azure_openai_client
268
- ),
269
- # Optional: Configure the OpenAI cross encoder with Azure OpenAI
270
- cross_encoder=OpenAIRerankerClient(
271
- client=azure_openai_client
272
- )
273
- )
274
-
275
- # Now you can use Graphiti with Azure OpenAI
276
- ```
277
-
278
- Make sure to replace the placeholder values with your actual Azure OpenAI credentials and specify the correct embedding model name that's deployed in your Azure OpenAI service.
279
-
280
- ## Using Graphiti with Google Gemini
281
-
282
- Graphiti supports Google's Gemini models for both LLM inference and embeddings. To use Gemini, you'll need to configure both the LLM client and embedder with your Google API key.
283
-
284
- Install Graphiti:
285
-
286
- ```bash
287
- poetry add "graphiti-core[google-genai]"
288
-
289
- # or
290
-
291
- uv add "graphiti-core[google-genai]"
292
- ```
293
-
294
- ```python
295
- from graphiti_core import Graphiti
296
- from graphiti_core.llm_client.gemini_client import GeminiClient, LLMConfig
297
- from graphiti_core.embedder.gemini import GeminiEmbedder, GeminiEmbedderConfig
298
-
299
- # Google API key configuration
300
- api_key = "<your-google-api-key>"
301
-
302
- # Initialize Graphiti with Gemini clients
303
- graphiti = Graphiti(
304
- "bolt://localhost:7687",
305
- "neo4j",
306
- "password",
307
- llm_client=GeminiClient(
308
- config=LLMConfig(
309
- api_key=api_key,
310
- model="gemini-2.0-flash"
311
- )
312
- ),
313
- embedder=GeminiEmbedder(
314
- config=GeminiEmbedderConfig(
315
- api_key=api_key,
316
- embedding_model="embedding-001"
317
- )
318
- )
319
- )
320
-
321
- # Now you can use Graphiti with Google Gemini
322
- ```
323
-
324
- ## Documentation
325
-
326
- - [Guides and API documentation](https://help.getzep.com/graphiti).
327
- - [Quick Start](https://help.getzep.com/graphiti/graphiti/quick-start)
328
- - [Building an agent with LangChain's LangGraph and Graphiti](https://help.getzep.com/graphiti/graphiti/lang-graph-agent)
329
-
330
- ## Status and Roadmap
331
-
332
- Graphiti is under active development. We aim to maintain API stability while working on:
333
-
334
- - [x] Supporting custom graph schemas:
335
- - Allow developers to provide their own defined node and edge classes when ingesting episodes
336
- - Enable more flexible knowledge representation tailored to specific use cases
337
- - [x] Enhancing retrieval capabilities with more robust and configurable options
338
- - [x] Graphiti MCP Server
339
- - [ ] Expanding test coverage to ensure reliability and catch edge cases
340
-
341
- ## Contributing
342
-
343
- We encourage and appreciate all forms of contributions, whether it's code, documentation, addressing GitHub Issues, or
344
- answering questions in the Graphiti Discord channel. For detailed guidelines on code contributions, please refer
345
- to [CONTRIBUTING](CONTRIBUTING.md).
346
-
347
- ## Support
348
-
349
- Join the [Zep Discord server](https://discord.com/invite/W8Kw6bsgXQ) and make your way to the **#Graphiti** channel!
350
-
@@ -1,66 +0,0 @@
1
- graphiti_core/__init__.py,sha256=e5SWFkRiaUwfprYIeIgVIh7JDedNiloZvd3roU-0aDY,55
2
- graphiti_core/cross_encoder/__init__.py,sha256=hry59vz21x-AtGZ0MJ7ugw0HTwJkXiddpp_Yqnwsen0,723
3
- graphiti_core/cross_encoder/bge_reranker_client.py,sha256=sY7RKsCp90vTjYxv6vmIHT4p3oCsFCRYWH-H0Ia0vN0,1449
4
- graphiti_core/cross_encoder/client.py,sha256=KLsbfWKOEaAV3adFe3XZlAeb-gje9_sVKCVZTaJP3ac,1441
5
- graphiti_core/cross_encoder/openai_reranker_client.py,sha256=R8NHHbIlPtnHMq_ZcCOAlgdULXuqzy5IzJoGuqYPEv0,4488
6
- graphiti_core/edges.py,sha256=XkI5J8ZwZ_PZcXZUKrJVG6zMn8gVwWsTOikO6Ozecr8,16154
7
- graphiti_core/embedder/__init__.py,sha256=EL564ZuE-DZjcuKNUK_exMn_XHXm2LdO9fzdXePVKL4,179
8
- graphiti_core/embedder/client.py,sha256=qEpSHceL_Gc4QQPJWIOnuNLemNuR_TYA4r28t2Vldbg,1115
9
- graphiti_core/embedder/gemini.py,sha256=7En-W46YxqC5qL3vYB5Ed-Xm0hqLxi7-LgZ95c4M7ME,3263
10
- graphiti_core/embedder/openai.py,sha256=bIThUoLMeGlHG2-3VikzK6JZfOHKn4PKvUMx5sHxJy8,2192
11
- graphiti_core/embedder/voyage.py,sha256=gQhdcz2IYPSyOcDn3w8aHToVS3KQhyZrUBm4vqr3WcE,2224
12
- graphiti_core/errors.py,sha256=Nib1uQx2cO_VOizupmRjpFfmuRg-hFAVqTtZAuBehR8,2405
13
- graphiti_core/graphiti.py,sha256=rAPPFJQt44qx5jpv7tKITFsIuIDopCsDqHqsWPOWPcI,27848
14
- graphiti_core/graphiti_types.py,sha256=46ueysKPwUCpxkMePHdCJLspfTImoZN7JiRwpz7cqd0,1013
15
- graphiti_core/helpers.py,sha256=O4HnwrOZzBtTwOsgujMEClW7kM0QsK1ImKxoWOdE8U4,2919
16
- graphiti_core/llm_client/__init__.py,sha256=PA80TSMeX-sUXITXEAxMDEt3gtfZgcJrGJUcyds1mSo,207
17
- graphiti_core/llm_client/anthropic_client.py,sha256=392rtkH_I7yOJUlQvjoOnS8Lz14WBP8egQ3OfRH0nFs,12481
18
- graphiti_core/llm_client/client.py,sha256=v_w5TBbDJYYADCXSs2r287g5Ami2Urma-GGEbHSI_Jg,5826
19
- graphiti_core/llm_client/config.py,sha256=90IgSBxZE_3nWdaEONVLUznI8lytPA7ZyexQz-_c55U,2560
20
- graphiti_core/llm_client/errors.py,sha256=pn6brRiLW60DAUIXJYKBT6MInrS4ueuH1hNLbn_JbQo,1243
21
- graphiti_core/llm_client/gemini_client.py,sha256=OdRAB2bWlXAi3gRmE1xVljYJ0T7JTZC82VK71wHyZi8,7722
22
- graphiti_core/llm_client/groq_client.py,sha256=k7zbXHfOpb4jhvvKFsccVYTq4yGGpxmY7xzNA02N2zk,2559
23
- graphiti_core/llm_client/openai_client.py,sha256=lLTZkd-PxEicTBmQefGoWLGTCb4QSU2Cq3x5W4kRYXg,7412
24
- graphiti_core/llm_client/openai_generic_client.py,sha256=WElMnPqdb1CxzYH4p2-m_9rVMr5M93-eXnc3yVxBgFg,7001
25
- graphiti_core/llm_client/utils.py,sha256=zKpxXEbKa369m4W7RDEf-m56kH46V1Mx3RowcWZEWWs,1000
26
- graphiti_core/models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
27
- graphiti_core/models/edges/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- graphiti_core/models/edges/edge_db_queries.py,sha256=W2-ljKnZOt5MlD9_M4f_823GdyTMRzW2tJX0CezaixY,2284
29
- graphiti_core/models/nodes/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- graphiti_core/models/nodes/node_db_queries.py,sha256=AQgRGVO-GgFWfLq1G6k8s86WItwpXruy3Mj4DBli-vM,2145
31
- graphiti_core/nodes.py,sha256=U19DZ0MIi8GfEsx8D-Jgl8c2SGXO8QovVQpYy6FmUpo,18542
32
- graphiti_core/prompts/__init__.py,sha256=EA-x9xUki9l8wnu2l8ek_oNf75-do5tq5hVq7Zbv8Kw,101
33
- graphiti_core/prompts/dedupe_edges.py,sha256=AFVC1EQ0TvNkSp0G7QZmIh3YpGg9FVXo1_sT3TlRqA8,5473
34
- graphiti_core/prompts/dedupe_nodes.py,sha256=hUdlEUaYUJGLeX6Usy_hfF7fVkaZW-Qhuq5hYrgQ2ZM,7298
35
- graphiti_core/prompts/eval.py,sha256=gnBQTmwsCl3Qvwpcm7aieVszzo6y1sMCUT8jQiKTvvE,5317
36
- graphiti_core/prompts/extract_edge_dates.py,sha256=3Drs3CmvP0gJN5BidWSxrNvLet3HPoTybU3BUIAoc0Y,4218
37
- graphiti_core/prompts/extract_edges.py,sha256=i7fXBVZ_FH_sAP413T8D02yylIEIia7scaTOuc3dkwY,6497
38
- graphiti_core/prompts/extract_nodes.py,sha256=EYuX99P8ly7pSOBz87ZA9fJF8V6g6epbVj5Cq0YM8h8,9624
39
- graphiti_core/prompts/invalidate_edges.py,sha256=yfpcs_pyctnoM77ULPZXEtKW0oHr1MeLsJzC5yrE-o4,3547
40
- graphiti_core/prompts/lib.py,sha256=DCyHePM4_q-CptTpEXGO_dBv9k7xDtclEaB1dGu7EcI,4092
41
- graphiti_core/prompts/models.py,sha256=NgxdbPHJpBEcpbXovKyScgpBc73Q-GIW-CBDlBtDjto,894
42
- graphiti_core/prompts/prompt_helpers.py,sha256=-9TABwIcIQUVHcNANx6wIZd-FT2DgYKyGTfx4IGYq2I,64
43
- graphiti_core/prompts/summarize_nodes.py,sha256=tbg-AgWlzgFBeImKkZ28h2SpmqfPPqvN2Ol1Q71VF9Y,4146
44
- graphiti_core/py.typed,sha256=vlmmzQOt7bmeQl9L3XJP4W6Ry0iiELepnOrinKz5KQg,79
45
- graphiti_core/search/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- graphiti_core/search/search.py,sha256=XCEYz4-I341eWiZ-czeFlH5hdbHTTLymhHiD153p6DQ,15122
47
- graphiti_core/search/search_config.py,sha256=VvKg6AB_RPhoe56DBBXHRBXHThAVJ_OLFCyq_yKof-A,3765
48
- graphiti_core/search/search_config_recipes.py,sha256=4GquRphHhJlpXQhAZOySYnCzBWYoTwxlJj44eTOavZQ,7443
49
- graphiti_core/search/search_filters.py,sha256=JkP7NbM4Dor27dne5vAuxbJic12dIJDtWJxNqmVuRec,5884
50
- graphiti_core/search/search_helpers.py,sha256=G5Ceaq5Pfgx0Weelqgeylp_pUHwiBnINaUYsDbURJbE,2636
51
- graphiti_core/search/search_utils.py,sha256=Q36whL7VTlVRuFkktqjbIlLqVYf7myE6iHo4i0bW73E,34634
52
- graphiti_core/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
- graphiti_core/utils/bulk_utils.py,sha256=WFCfo_OrFD2bpm13Vkex4A1YLVHX4pjCm5acZ1CwzEI,15848
54
- graphiti_core/utils/datetime_utils.py,sha256=Ti-2tnrDFRzBsbfblzsHybsM3jaDLP4-VT2t0VhpIzU,1357
55
- graphiti_core/utils/maintenance/__init__.py,sha256=vW4H1KyapTl-OOz578uZABYcpND4wPx3Vt6aAPaXh78,301
56
- graphiti_core/utils/maintenance/community_operations.py,sha256=TF-4eHuvMe_jMqvWg3swxK80zLLtOR0t1pmUUQlNulM,10067
57
- graphiti_core/utils/maintenance/edge_operations.py,sha256=KeHcNJ2YXApC-cuoR1zBdXPtinOdv0DfvQcBicVnuBQ,18865
58
- graphiti_core/utils/maintenance/graph_data_operations.py,sha256=BIJKc8tbvU4IjWxLgeotw57b1eE3Iw8YtV74j6eo4RQ,7493
59
- graphiti_core/utils/maintenance/node_operations.py,sha256=xuXKY0aoe_Idl9Edtb8FxSqoCa45M043nCMraJuAcW8,16606
60
- graphiti_core/utils/maintenance/temporal_operations.py,sha256=mJkw9xLB4W2BsLfC5POr0r-PHWL9SIfNj_l_xu0B5ug,3410
61
- graphiti_core/utils/maintenance/utils.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
62
- graphiti_core/utils/ontology_utils/entity_types_utils.py,sha256=QJX5cG0GSSNF_Mm_yrldr69wjVAbN_MxLhOSznz85Hk,1279
63
- graphiti_core-0.12.0rc1.dist-info/LICENSE,sha256=KCUwCyDXuVEgmDWkozHyniRyWjnWUWjkuDHfU6o3JlA,11325
64
- graphiti_core-0.12.0rc1.dist-info/METADATA,sha256=NWn1DI3wq2YnAPzTi7chWv1c22UhaEKaSzmt_ky9B9s,15301
65
- graphiti_core-0.12.0rc1.dist-info/WHEEL,sha256=fGIA9gx4Qxk2KDKeNJCbOEwSrmLtjWCwzBz351GyrPQ,88
66
- graphiti_core-0.12.0rc1.dist-info/RECORD,,