graphiti-core 0.18.1__tar.gz → 0.18.2__tar.gz

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.

Files changed (182) hide show
  1. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/PKG-INFO +1 -1
  2. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/graphiti.py +4 -4
  3. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/helpers.py +1 -1
  4. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/extract_nodes.py +41 -1
  5. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_utils.py +3 -5
  6. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/bulk_utils.py +4 -4
  7. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/edge_operations.py +4 -4
  8. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/node_operations.py +31 -34
  9. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/ontology_utils/entity_types_utils.py +1 -1
  10. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/pyproject.toml +1 -1
  11. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/signatures/version1/cla.json +8 -0
  12. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_graphiti_int.py +2 -1
  13. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/uv.lock +1 -1
  14. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.env.example +0 -0
  15. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  16. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/dependabot.yml +0 -0
  17. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/pull_request_template.md +0 -0
  18. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/secret_scanning.yml +0 -0
  19. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/cla.yml +0 -0
  20. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/claude-code-review.yml +0 -0
  21. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/claude.yml +0 -0
  22. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/codeql.yml +0 -0
  23. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/lint.yml +0 -0
  24. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/mcp-server-docker.yml +0 -0
  25. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/release-graphiti-core.yml +0 -0
  26. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/typecheck.yml +0 -0
  27. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.github/workflows/unit_tests.yml +0 -0
  28. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/.gitignore +0 -0
  29. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/CLAUDE.md +0 -0
  30. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/CODE_OF_CONDUCT.md +0 -0
  31. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/CONTRIBUTING.md +0 -0
  32. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/Dockerfile +0 -0
  33. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/LICENSE +0 -0
  34. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/Makefile +0 -0
  35. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/README.md +0 -0
  36. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/SECURITY.md +0 -0
  37. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/Zep-CLA.md +0 -0
  38. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/conftest.py +0 -0
  39. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/depot.json +0 -0
  40. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/docker-compose.test.yml +0 -0
  41. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/docker-compose.yml +0 -0
  42. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/ellipsis.yaml +0 -0
  43. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/data/manybirds_products.json +0 -0
  44. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/ecommerce/runner.ipynb +0 -0
  45. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/ecommerce/runner.py +0 -0
  46. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/langgraph-agent/agent.ipynb +0 -0
  47. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/langgraph-agent/tinybirds-jess.png +0 -0
  48. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/podcast/podcast_runner.py +0 -0
  49. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/podcast/podcast_transcript.txt +0 -0
  50. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/podcast/transcript_parser.py +0 -0
  51. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/README.md +0 -0
  52. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/quickstart_falkordb.py +0 -0
  53. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/quickstart_neo4j.py +0 -0
  54. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/quickstart/requirements.txt +0 -0
  55. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/wizard_of_oz/parser.py +0 -0
  56. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/wizard_of_oz/runner.py +0 -0
  57. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/examples/wizard_of_oz/woo.txt +0 -0
  58. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/__init__.py +0 -0
  59. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/__init__.py +0 -0
  60. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/bge_reranker_client.py +0 -0
  61. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/client.py +0 -0
  62. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/gemini_reranker_client.py +0 -0
  63. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/cross_encoder/openai_reranker_client.py +0 -0
  64. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/__init__.py +0 -0
  65. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/driver.py +0 -0
  66. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/falkordb_driver.py +0 -0
  67. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/driver/neo4j_driver.py +0 -0
  68. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/edges.py +0 -0
  69. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/__init__.py +0 -0
  70. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/azure_openai.py +0 -0
  71. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/client.py +0 -0
  72. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/gemini.py +0 -0
  73. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/openai.py +0 -0
  74. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/embedder/voyage.py +0 -0
  75. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/errors.py +0 -0
  76. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/graph_queries.py +0 -0
  77. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/graphiti_types.py +0 -0
  78. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/__init__.py +0 -0
  79. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/anthropic_client.py +0 -0
  80. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/azure_openai_client.py +0 -0
  81. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/client.py +0 -0
  82. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/config.py +0 -0
  83. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/errors.py +0 -0
  84. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/gemini_client.py +0 -0
  85. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/groq_client.py +0 -0
  86. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/openai_base_client.py +0 -0
  87. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/openai_client.py +0 -0
  88. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/openai_generic_client.py +0 -0
  89. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/llm_client/utils.py +0 -0
  90. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/__init__.py +0 -0
  91. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/edges/__init__.py +0 -0
  92. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/edges/edge_db_queries.py +0 -0
  93. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/nodes/__init__.py +0 -0
  94. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/models/nodes/node_db_queries.py +0 -0
  95. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/nodes.py +0 -0
  96. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/__init__.py +0 -0
  97. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/dedupe_edges.py +0 -0
  98. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/dedupe_nodes.py +0 -0
  99. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/eval.py +0 -0
  100. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/extract_edge_dates.py +0 -0
  101. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/extract_edges.py +0 -0
  102. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/invalidate_edges.py +0 -0
  103. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/lib.py +0 -0
  104. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/models.py +0 -0
  105. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/prompt_helpers.py +0 -0
  106. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/prompts/summarize_nodes.py +0 -0
  107. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/py.typed +0 -0
  108. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/__init__.py +0 -0
  109. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search.py +0 -0
  110. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_config.py +0 -0
  111. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_config_recipes.py +0 -0
  112. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_filters.py +0 -0
  113. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/search/search_helpers.py +0 -0
  114. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/telemetry/__init__.py +0 -0
  115. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/telemetry/telemetry.py +0 -0
  116. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/__init__.py +0 -0
  117. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/datetime_utils.py +0 -0
  118. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/__init__.py +0 -0
  119. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/community_operations.py +0 -0
  120. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/graph_data_operations.py +0 -0
  121. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/temporal_operations.py +0 -0
  122. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/graphiti_core/utils/maintenance/utils.py +0 -0
  123. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/arxiv-screenshot.png +0 -0
  124. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/graphiti-graph-intro.gif +0 -0
  125. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/graphiti-intro-slides-stock-2.gif +0 -0
  126. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/images/simple_graph.svg +0 -0
  127. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/.env.example +0 -0
  128. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/.python-version +0 -0
  129. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/Dockerfile +0 -0
  130. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/README.md +0 -0
  131. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/cursor_rules.md +0 -0
  132. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/docker-compose.yml +0 -0
  133. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/graphiti_mcp_server.py +0 -0
  134. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/mcp_config_sse_example.json +0 -0
  135. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/mcp_config_stdio_example.json +0 -0
  136. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/pyproject.toml +0 -0
  137. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/mcp_server/uv.lock +0 -0
  138. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/poetry.lock +0 -0
  139. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/py.typed +0 -0
  140. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/pytest.ini +0 -0
  141. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/.env.example +0 -0
  142. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/Makefile +0 -0
  143. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/README.md +0 -0
  144. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/__init__.py +0 -0
  145. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/config.py +0 -0
  146. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/__init__.py +0 -0
  147. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/common.py +0 -0
  148. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/ingest.py +0 -0
  149. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/dto/retrieve.py +0 -0
  150. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/main.py +0 -0
  151. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/routers/__init__.py +0 -0
  152. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/routers/ingest.py +0 -0
  153. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/routers/retrieve.py +0 -0
  154. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/graph_service/zep_graphiti.py +0 -0
  155. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/pyproject.toml +0 -0
  156. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/server/uv.lock +0 -0
  157. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/cross_encoder/test_bge_reranker_client.py +0 -0
  158. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/cross_encoder/test_gemini_reranker_client.py +0 -0
  159. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/driver/__init__.py +0 -0
  160. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/driver/test_falkordb_driver.py +0 -0
  161. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/embedder_fixtures.py +0 -0
  162. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/test_gemini.py +0 -0
  163. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/test_openai.py +0 -0
  164. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/embedder/test_voyage.py +0 -0
  165. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/data/longmemeval_data/README.md +0 -0
  166. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/data/longmemeval_data/longmemeval_oracle.json +0 -0
  167. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/eval_cli.py +0 -0
  168. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/eval_e2e_graph_building.py +0 -0
  169. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/pytest.ini +0 -0
  170. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/evals/utils.py +0 -0
  171. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/helpers_test.py +0 -0
  172. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_anthropic_client.py +0 -0
  173. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_anthropic_client_int.py +0 -0
  174. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_client.py +0 -0
  175. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_errors.py +0 -0
  176. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/llm_client/test_gemini_client.py +0 -0
  177. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_edge_int.py +0 -0
  178. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_entity_exclusion_int.py +0 -0
  179. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/test_node_int.py +0 -0
  180. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/utils/maintenance/test_edge_operations.py +0 -0
  181. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/utils/maintenance/test_temporal_operations_int.py +0 -0
  182. {graphiti_core-0.18.1 → graphiti_core-0.18.2}/tests/utils/search/search_utils_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: graphiti-core
3
- Version: 0.18.1
3
+ Version: 0.18.2
4
4
  Summary: A temporal graph building library
5
5
  Project-URL: Homepage, https://help.getzep.com/graphiti/graphiti/overview
6
6
  Project-URL: Repository, https://github.com/getzep/graphiti
@@ -359,10 +359,10 @@ class Graphiti:
359
359
  group_id: str | None = None,
360
360
  uuid: str | None = None,
361
361
  update_communities: bool = False,
362
- entity_types: dict[str, BaseModel] | None = None,
362
+ entity_types: dict[str, type[BaseModel]] | None = None,
363
363
  excluded_entity_types: list[str] | None = None,
364
364
  previous_episode_uuids: list[str] | None = None,
365
- edge_types: dict[str, BaseModel] | None = None,
365
+ edge_types: dict[str, type[BaseModel]] | None = None,
366
366
  edge_type_map: dict[tuple[str, str], list[str]] | None = None,
367
367
  ) -> AddEpisodeResults:
368
368
  """
@@ -555,9 +555,9 @@ class Graphiti:
555
555
  self,
556
556
  bulk_episodes: list[RawEpisode],
557
557
  group_id: str | None = None,
558
- entity_types: dict[str, BaseModel] | None = None,
558
+ entity_types: dict[str, type[BaseModel]] | None = None,
559
559
  excluded_entity_types: list[str] | None = None,
560
- edge_types: dict[str, BaseModel] | None = None,
560
+ edge_types: dict[str, type[BaseModel]] | None = None,
561
561
  edge_type_map: dict[tuple[str, str], list[str]] | None = None,
562
562
  ):
563
563
  """
@@ -148,7 +148,7 @@ def validate_group_id(group_id: str) -> bool:
148
148
 
149
149
 
150
150
  def validate_excluded_entity_types(
151
- excluded_entity_types: list[str] | None, entity_types: dict[str, BaseModel] | None = None
151
+ excluded_entity_types: list[str] | None, entity_types: dict[str, type[BaseModel]] | None = None
152
152
  ) -> bool:
153
153
  """
154
154
  Validate that excluded entity types are valid type names.
@@ -52,6 +52,13 @@ class EntityClassification(BaseModel):
52
52
  )
53
53
 
54
54
 
55
+ class EntitySummary(BaseModel):
56
+ summary: str = Field(
57
+ ...,
58
+ description='Summary containing the important information about the entity. Under 250 words',
59
+ )
60
+
61
+
55
62
  class Prompt(Protocol):
56
63
  extract_message: PromptVersion
57
64
  extract_json: PromptVersion
@@ -59,6 +66,7 @@ class Prompt(Protocol):
59
66
  reflexion: PromptVersion
60
67
  classify_nodes: PromptVersion
61
68
  extract_attributes: PromptVersion
69
+ extract_summary: PromptVersion
62
70
 
63
71
 
64
72
  class Versions(TypedDict):
@@ -68,6 +76,7 @@ class Versions(TypedDict):
68
76
  reflexion: PromptFunction
69
77
  classify_nodes: PromptFunction
70
78
  extract_attributes: PromptFunction
79
+ extract_summary: PromptFunction
71
80
 
72
81
 
73
82
  def extract_message(context: dict[str, Any]) -> list[Message]:
@@ -259,9 +268,39 @@ def extract_attributes(context: dict[str, Any]) -> list[Message]:
259
268
  Guidelines:
260
269
  1. Do not hallucinate entity property values if they cannot be found in the current context.
261
270
  2. Only use the provided MESSAGES and ENTITY to set attribute values.
271
+
272
+ <ENTITY>
273
+ {context['node']}
274
+ </ENTITY>
275
+ """,
276
+ ),
277
+ ]
278
+
279
+
280
+ def extract_summary(context: dict[str, Any]) -> list[Message]:
281
+ return [
282
+ Message(
283
+ role='system',
284
+ content='You are a helpful assistant that extracts entity summaries from the provided text.',
285
+ ),
286
+ Message(
287
+ role='user',
288
+ content=f"""
289
+
290
+ <MESSAGES>
291
+ {json.dumps(context['previous_episodes'], indent=2)}
292
+ {json.dumps(context['episode_content'], indent=2)}
293
+ </MESSAGES>
294
+
295
+ Given the above MESSAGES and the following ENTITY, update the summary that combines relevant information about the entity
296
+ from the messages and relevant information from the existing summary.
297
+
298
+ Guidelines:
299
+ 1. Do not hallucinate entity summary information if they cannot be found in the current context.
300
+ 2. Only use the provided MESSAGES and ENTITY to set attribute values.
262
301
  3. The summary attribute represents a summary of the ENTITY, and should be updated with new information about the Entity from the MESSAGES.
263
302
  Summaries must be no longer than 250 words.
264
-
303
+
265
304
  <ENTITY>
266
305
  {context['node']}
267
306
  </ENTITY>
@@ -275,6 +314,7 @@ versions: Versions = {
275
314
  'extract_json': extract_json,
276
315
  'extract_text': extract_text,
277
316
  'reflexion': reflexion,
317
+ 'extract_summary': extract_summary,
278
318
  'classify_nodes': classify_nodes,
279
319
  'extract_attributes': extract_attributes,
280
320
  }
@@ -314,17 +314,15 @@ async def node_fulltext_search(
314
314
  + """
315
315
  YIELD node AS n, score
316
316
  WHERE n:Entity AND n.group_id IN $group_ids
317
- WITH n, score
318
- LIMIT $limit
319
317
  """
320
318
  + filter_query
321
319
  + """
320
+ WITH n, score
321
+ ORDER BY score DESC
322
+ LIMIT $limit
322
323
  RETURN
323
324
  """
324
325
  + ENTITY_NODE_RETURN
325
- + """
326
- ORDER BY score DESC
327
- """
328
326
  )
329
327
 
330
328
  records, _, _ = await driver.execute_query(
@@ -169,9 +169,9 @@ async def extract_nodes_and_edges_bulk(
169
169
  clients: GraphitiClients,
170
170
  episode_tuples: list[tuple[EpisodicNode, list[EpisodicNode]]],
171
171
  edge_type_map: dict[tuple[str, str], list[str]],
172
- entity_types: dict[str, BaseModel] | None = None,
172
+ entity_types: dict[str, type[BaseModel]] | None = None,
173
173
  excluded_entity_types: list[str] | None = None,
174
- edge_types: dict[str, BaseModel] | None = None,
174
+ edge_types: dict[str, type[BaseModel]] | None = None,
175
175
  ) -> tuple[list[list[EntityNode]], list[list[EntityEdge]]]:
176
176
  extracted_nodes_bulk: list[list[EntityNode]] = await semaphore_gather(
177
177
  *[
@@ -202,7 +202,7 @@ async def dedupe_nodes_bulk(
202
202
  clients: GraphitiClients,
203
203
  extracted_nodes: list[list[EntityNode]],
204
204
  episode_tuples: list[tuple[EpisodicNode, list[EpisodicNode]]],
205
- entity_types: dict[str, BaseModel] | None = None,
205
+ entity_types: dict[str, type[BaseModel]] | None = None,
206
206
  ) -> tuple[dict[str, list[EntityNode]], dict[str, str]]:
207
207
  embedder = clients.embedder
208
208
  min_score = 0.8
@@ -290,7 +290,7 @@ async def dedupe_edges_bulk(
290
290
  extracted_edges: list[list[EntityEdge]],
291
291
  episode_tuples: list[tuple[EpisodicNode, list[EpisodicNode]]],
292
292
  _entities: list[EntityNode],
293
- edge_types: dict[str, BaseModel],
293
+ edge_types: dict[str, type[BaseModel]],
294
294
  _edge_type_map: dict[tuple[str, str], list[str]],
295
295
  ) -> dict[str, list[EntityEdge]]:
296
296
  embedder = clients.embedder
@@ -114,7 +114,7 @@ async def extract_edges(
114
114
  previous_episodes: list[EpisodicNode],
115
115
  edge_type_map: dict[tuple[str, str], list[str]],
116
116
  group_id: str = '',
117
- edge_types: dict[str, BaseModel] | None = None,
117
+ edge_types: dict[str, type[BaseModel]] | None = None,
118
118
  ) -> list[EntityEdge]:
119
119
  start = time()
120
120
 
@@ -249,7 +249,7 @@ async def resolve_extracted_edges(
249
249
  extracted_edges: list[EntityEdge],
250
250
  episode: EpisodicNode,
251
251
  entities: list[EntityNode],
252
- edge_types: dict[str, BaseModel],
252
+ edge_types: dict[str, type[BaseModel]],
253
253
  edge_type_map: dict[tuple[str, str], list[str]],
254
254
  ) -> tuple[list[EntityEdge], list[EntityEdge]]:
255
255
  driver = clients.driver
@@ -272,7 +272,7 @@ async def resolve_extracted_edges(
272
272
  uuid_entity_map: dict[str, EntityNode] = {entity.uuid: entity for entity in entities}
273
273
 
274
274
  # Determine which edge types are relevant for each edge
275
- edge_types_lst: list[dict[str, BaseModel]] = []
275
+ edge_types_lst: list[dict[str, type[BaseModel]]] = []
276
276
  for extracted_edge in extracted_edges:
277
277
  source_node = uuid_entity_map.get(extracted_edge.source_node_uuid)
278
278
  target_node = uuid_entity_map.get(extracted_edge.target_node_uuid)
@@ -381,7 +381,7 @@ async def resolve_extracted_edge(
381
381
  related_edges: list[EntityEdge],
382
382
  existing_edges: list[EntityEdge],
383
383
  episode: EpisodicNode,
384
- edge_types: dict[str, BaseModel] | None = None,
384
+ edge_types: dict[str, type[BaseModel]] | None = None,
385
385
  ) -> tuple[EntityEdge, list[EntityEdge], list[EntityEdge]]:
386
386
  if len(related_edges) == 0 and len(existing_edges) == 0:
387
387
  return extracted_edge, [], []
@@ -15,13 +15,10 @@ limitations under the License.
15
15
  """
16
16
 
17
17
  import logging
18
- from contextlib import suppress
19
18
  from time import time
20
19
  from typing import Any
21
- from uuid import uuid4
22
20
 
23
- import pydantic
24
- from pydantic import BaseModel, Field
21
+ from pydantic import BaseModel
25
22
 
26
23
  from graphiti_core.graphiti_types import GraphitiClients
27
24
  from graphiti_core.helpers import MAX_REFLEXION_ITERATIONS, semaphore_gather
@@ -31,6 +28,7 @@ from graphiti_core.nodes import EntityNode, EpisodeType, EpisodicNode, create_en
31
28
  from graphiti_core.prompts import prompt_library
32
29
  from graphiti_core.prompts.dedupe_nodes import NodeDuplicate, NodeResolutions
33
30
  from graphiti_core.prompts.extract_nodes import (
31
+ EntitySummary,
34
32
  ExtractedEntities,
35
33
  ExtractedEntity,
36
34
  MissedEntities,
@@ -70,7 +68,7 @@ async def extract_nodes(
70
68
  clients: GraphitiClients,
71
69
  episode: EpisodicNode,
72
70
  previous_episodes: list[EpisodicNode],
73
- entity_types: dict[str, BaseModel] | None = None,
71
+ entity_types: dict[str, type[BaseModel]] | None = None,
74
72
  excluded_entity_types: list[str] | None = None,
75
73
  ) -> list[EntityNode]:
76
74
  start = time()
@@ -180,7 +178,7 @@ async def resolve_extracted_nodes(
180
178
  extracted_nodes: list[EntityNode],
181
179
  episode: EpisodicNode | None = None,
182
180
  previous_episodes: list[EpisodicNode] | None = None,
183
- entity_types: dict[str, BaseModel] | None = None,
181
+ entity_types: dict[str, type[BaseModel]] | None = None,
184
182
  existing_nodes_override: list[EntityNode] | None = None,
185
183
  ) -> tuple[list[EntityNode], dict[str, str], list[tuple[EntityNode, EntityNode]]]:
186
184
  llm_client = clients.llm_client
@@ -223,7 +221,7 @@ async def resolve_extracted_nodes(
223
221
  ],
224
222
  )
225
223
 
226
- entity_types_dict: dict[str, BaseModel] = entity_types if entity_types is not None else {}
224
+ entity_types_dict: dict[str, type[BaseModel]] = entity_types if entity_types is not None else {}
227
225
 
228
226
  # Prepare context for LLM
229
227
  extracted_nodes_context = [
@@ -297,7 +295,7 @@ async def extract_attributes_from_nodes(
297
295
  nodes: list[EntityNode],
298
296
  episode: EpisodicNode | None = None,
299
297
  previous_episodes: list[EpisodicNode] | None = None,
300
- entity_types: dict[str, BaseModel] | None = None,
298
+ entity_types: dict[str, type[BaseModel]] | None = None,
301
299
  ) -> list[EntityNode]:
302
300
  llm_client = clients.llm_client
303
301
  embedder = clients.embedder
@@ -326,7 +324,7 @@ async def extract_attributes_from_node(
326
324
  node: EntityNode,
327
325
  episode: EpisodicNode | None = None,
328
326
  previous_episodes: list[EpisodicNode] | None = None,
329
- entity_type: BaseModel | None = None,
327
+ entity_type: type[BaseModel] | None = None,
330
328
  ) -> EntityNode:
331
329
  node_context: dict[str, Any] = {
332
330
  'name': node.name,
@@ -335,25 +333,14 @@ async def extract_attributes_from_node(
335
333
  'attributes': node.attributes,
336
334
  }
337
335
 
338
- attributes_definitions: dict[str, Any] = {
339
- 'summary': (
340
- str,
341
- Field(
342
- description='Summary containing the important information about the entity. Under 250 words',
343
- ),
344
- )
336
+ attributes_context: dict[str, Any] = {
337
+ 'node': node_context,
338
+ 'episode_content': episode.content if episode is not None else '',
339
+ 'previous_episodes': [ep.content for ep in previous_episodes]
340
+ if previous_episodes is not None
341
+ else [],
345
342
  }
346
343
 
347
- if entity_type is not None:
348
- for field_name, field_info in entity_type.model_fields.items():
349
- attributes_definitions[field_name] = (
350
- field_info.annotation,
351
- Field(description=field_info.description),
352
- )
353
-
354
- unique_model_name = f'EntityAttributes_{uuid4().hex}'
355
- entity_attributes_model = pydantic.create_model(unique_model_name, **attributes_definitions)
356
-
357
344
  summary_context: dict[str, Any] = {
358
345
  'node': node_context,
359
346
  'episode_content': episode.content if episode is not None else '',
@@ -362,20 +349,30 @@ async def extract_attributes_from_node(
362
349
  else [],
363
350
  }
364
351
 
365
- llm_response = await llm_client.generate_response(
366
- prompt_library.extract_nodes.extract_attributes(summary_context),
367
- response_model=entity_attributes_model,
352
+ llm_response = (
353
+ (
354
+ await llm_client.generate_response(
355
+ prompt_library.extract_nodes.extract_attributes(attributes_context),
356
+ response_model=entity_type,
357
+ model_size=ModelSize.small,
358
+ )
359
+ )
360
+ if entity_type is not None
361
+ else {}
362
+ )
363
+
364
+ summary_response = await llm_client.generate_response(
365
+ prompt_library.extract_nodes.extract_summary(summary_context),
366
+ response_model=EntitySummary,
368
367
  model_size=ModelSize.small,
369
368
  )
370
369
 
371
- entity_attributes_model(**llm_response)
370
+ if entity_type is not None:
371
+ entity_type(**llm_response)
372
372
 
373
- node.summary = llm_response.get('summary', '')
373
+ node.summary = summary_response.get('summary', '')
374
374
  node_attributes = {key: value for key, value in llm_response.items()}
375
375
 
376
- with suppress(KeyError):
377
- del node_attributes['summary']
378
-
379
376
  node.attributes.update(node_attributes)
380
377
 
381
378
  return node
@@ -21,7 +21,7 @@ from graphiti_core.nodes import EntityNode
21
21
 
22
22
 
23
23
  def validate_entity_types(
24
- entity_types: dict[str, BaseModel] | None,
24
+ entity_types: dict[str, type[BaseModel]] | None,
25
25
  ) -> bool:
26
26
  if entity_types is None:
27
27
  return True
@@ -1,7 +1,7 @@
1
1
  [project]
2
2
  name = "graphiti-core"
3
3
  description = "A temporal graph building library"
4
- version = "0.18.1"
4
+ version = "0.18.2"
5
5
  authors = [
6
6
  { name = "Paul Paliychuk", email = "paul@getzep.com" },
7
7
  { name = "Preston Rasmussen", email = "preston@getzep.com" },
@@ -255,6 +255,14 @@
255
255
  "created_at": "2025-07-29T20:00:27Z",
256
256
  "repoId": 840056306,
257
257
  "pullRequestNo": 782
258
+ },
259
+ {
260
+ "name": "bechbd",
261
+ "id": 6898505,
262
+ "comment_id": 3140501814,
263
+ "created_at": "2025-07-31T15:58:08Z",
264
+ "repoId": 840056306,
265
+ "pullRequestNo": 793
258
266
  }
259
267
  ]
260
268
  }
@@ -64,7 +64,8 @@ async def test_graphiti_init(driver):
64
64
  await graphiti.build_indices_and_constraints()
65
65
 
66
66
  search_filter = SearchFilters(
67
- created_at=[[DateFilter(date=utc_now(), comparison_operator=ComparisonOperator.less_than)]]
67
+ node_labels=['Person'],
68
+ created_at=[[DateFilter(date=utc_now(), comparison_operator=ComparisonOperator.less_than)]],
68
69
  )
69
70
 
70
71
  results = await graphiti.search_(
@@ -746,7 +746,7 @@ wheels = [
746
746
 
747
747
  [[package]]
748
748
  name = "graphiti-core"
749
- version = "0.18.1"
749
+ version = "0.18.2"
750
750
  source = { editable = "." }
751
751
  dependencies = [
752
752
  { name = "diskcache" },
File without changes
File without changes
File without changes
File without changes
File without changes