smartmemory-core 0.5.0__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.
Files changed (410) hide show
  1. smartmemory_core-0.5.0/.env.example +66 -0
  2. smartmemory_core-0.5.0/CLA.md +61 -0
  3. smartmemory_core-0.5.0/LICENSE +31 -0
  4. smartmemory_core-0.5.0/LICENSE.agpl-v3 +661 -0
  5. smartmemory_core-0.5.0/LICENSE.header +18 -0
  6. smartmemory_core-0.5.0/MANIFEST.in +31 -0
  7. smartmemory_core-0.5.0/PKG-INFO +768 -0
  8. smartmemory_core-0.5.0/README.md +679 -0
  9. smartmemory_core-0.5.0/VERSION +1 -0
  10. smartmemory_core-0.5.0/config.json +185 -0
  11. smartmemory_core-0.5.0/pyproject.toml +196 -0
  12. smartmemory_core-0.5.0/scripts/add_license_headers.py +122 -0
  13. smartmemory_core-0.5.0/setup.cfg +4 -0
  14. smartmemory_core-0.5.0/smartmemory/__init__.py +29 -0
  15. smartmemory_core-0.5.0/smartmemory/__version__.py +50 -0
  16. smartmemory_core-0.5.0/smartmemory/background/__init__.py +0 -0
  17. smartmemory_core-0.5.0/smartmemory/background/extraction_worker.py +186 -0
  18. smartmemory_core-0.5.0/smartmemory/background/id_resolver.py +72 -0
  19. smartmemory_core-0.5.0/smartmemory/clear_all.py +130 -0
  20. smartmemory_core-0.5.0/smartmemory/cli.py +164 -0
  21. smartmemory_core-0.5.0/smartmemory/clustering/__init__.py +37 -0
  22. smartmemory_core-0.5.0/smartmemory/clustering/deduplicator.py +148 -0
  23. smartmemory_core-0.5.0/smartmemory/clustering/embedding.py +148 -0
  24. smartmemory_core-0.5.0/smartmemory/clustering/global_cluster.py +305 -0
  25. smartmemory_core-0.5.0/smartmemory/clustering/graph_aggregator.py +186 -0
  26. smartmemory_core-0.5.0/smartmemory/clustering/llm.py +265 -0
  27. smartmemory_core-0.5.0/smartmemory/code/__init__.py +16 -0
  28. smartmemory_core-0.5.0/smartmemory/code/indexer.py +482 -0
  29. smartmemory_core-0.5.0/smartmemory/code/models.py +126 -0
  30. smartmemory_core-0.5.0/smartmemory/code/parser.py +404 -0
  31. smartmemory_core-0.5.0/smartmemory/code/search.py +145 -0
  32. smartmemory_core-0.5.0/smartmemory/code/ts_parser.py +708 -0
  33. smartmemory_core-0.5.0/smartmemory/configuration/__init__.py +288 -0
  34. smartmemory_core-0.5.0/smartmemory/configuration/environment.py +99 -0
  35. smartmemory_core-0.5.0/smartmemory/configuration/loader.py +135 -0
  36. smartmemory_core-0.5.0/smartmemory/configuration/manager.py +239 -0
  37. smartmemory_core-0.5.0/smartmemory/configuration/models.py +154 -0
  38. smartmemory_core-0.5.0/smartmemory/configuration/validator.py +383 -0
  39. smartmemory_core-0.5.0/smartmemory/conversation/__init__.py +8 -0
  40. smartmemory_core-0.5.0/smartmemory/conversation/context.py +81 -0
  41. smartmemory_core-0.5.0/smartmemory/conversation/manager.py +98 -0
  42. smartmemory_core-0.5.0/smartmemory/conversation/session.py +37 -0
  43. smartmemory_core-0.5.0/smartmemory/decisions/__init__.py +6 -0
  44. smartmemory_core-0.5.0/smartmemory/decisions/manager.py +337 -0
  45. smartmemory_core-0.5.0/smartmemory/decisions/queries.py +255 -0
  46. smartmemory_core-0.5.0/smartmemory/drift_detector.py +135 -0
  47. smartmemory_core-0.5.0/smartmemory/evolution/__init__.py +49 -0
  48. smartmemory_core-0.5.0/smartmemory/evolution/cycle.py +35 -0
  49. smartmemory_core-0.5.0/smartmemory/evolution/diff_engine.py +212 -0
  50. smartmemory_core-0.5.0/smartmemory/evolution/flow.py +75 -0
  51. smartmemory_core-0.5.0/smartmemory/evolution/models.py +244 -0
  52. smartmemory_core-0.5.0/smartmemory/evolution/registry.py +198 -0
  53. smartmemory_core-0.5.0/smartmemory/evolution/store.py +323 -0
  54. smartmemory_core-0.5.0/smartmemory/evolution/tracker.py +353 -0
  55. smartmemory_core-0.5.0/smartmemory/evolution/utilities.py +315 -0
  56. smartmemory_core-0.5.0/smartmemory/extraction/__init__.py +0 -0
  57. smartmemory_core-0.5.0/smartmemory/extraction/extractor.py +499 -0
  58. smartmemory_core-0.5.0/smartmemory/extraction/models.py +87 -0
  59. smartmemory_core-0.5.0/smartmemory/feedback/__init__.py +1 -0
  60. smartmemory_core-0.5.0/smartmemory/feedback/agentic_improvement.py +79 -0
  61. smartmemory_core-0.5.0/smartmemory/feedback/agentic_routines.py +204 -0
  62. smartmemory_core-0.5.0/smartmemory/feedback/cli.py +7 -0
  63. smartmemory_core-0.5.0/smartmemory/feedback/manager.py +27 -0
  64. smartmemory_core-0.5.0/smartmemory/feedback/slack.py +65 -0
  65. smartmemory_core-0.5.0/smartmemory/graph/__init__.py +0 -0
  66. smartmemory_core-0.5.0/smartmemory/graph/analytics/__init__.py +0 -0
  67. smartmemory_core-0.5.0/smartmemory/graph/analytics/edge.py +17 -0
  68. smartmemory_core-0.5.0/smartmemory/graph/analytics/episodes.py +28 -0
  69. smartmemory_core-0.5.0/smartmemory/graph/analytics/export.py +28 -0
  70. smartmemory_core-0.5.0/smartmemory/graph/analytics/prune.py +52 -0
  71. smartmemory_core-0.5.0/smartmemory/graph/analytics/temporal.py +30 -0
  72. smartmemory_core-0.5.0/smartmemory/graph/backends/__init__.py +11 -0
  73. smartmemory_core-0.5.0/smartmemory/graph/backends/async_backend.py +102 -0
  74. smartmemory_core-0.5.0/smartmemory/graph/backends/async_falkordb.py +619 -0
  75. smartmemory_core-0.5.0/smartmemory/graph/backends/backend.py +96 -0
  76. smartmemory_core-0.5.0/smartmemory/graph/backends/falkordb.py +1173 -0
  77. smartmemory_core-0.5.0/smartmemory/graph/backends/queries.py +149 -0
  78. smartmemory_core-0.5.0/smartmemory/graph/backends/sqlite.py +464 -0
  79. smartmemory_core-0.5.0/smartmemory/graph/base.py +138 -0
  80. smartmemory_core-0.5.0/smartmemory/graph/core/__init__.py +0 -0
  81. smartmemory_core-0.5.0/smartmemory/graph/core/edges.py +252 -0
  82. smartmemory_core-0.5.0/smartmemory/graph/core/memory_path.py +274 -0
  83. smartmemory_core-0.5.0/smartmemory/graph/core/nodes.py +374 -0
  84. smartmemory_core-0.5.0/smartmemory/graph/core/search.py +399 -0
  85. smartmemory_core-0.5.0/smartmemory/graph/indexes.py +26 -0
  86. smartmemory_core-0.5.0/smartmemory/graph/models/__init__.py +0 -0
  87. smartmemory_core-0.5.0/smartmemory/graph/models/canonical_types.py +213 -0
  88. smartmemory_core-0.5.0/smartmemory/graph/models/node_types.py +305 -0
  89. smartmemory_core-0.5.0/smartmemory/graph/models/schema_validator.py +828 -0
  90. smartmemory_core-0.5.0/smartmemory/graph/ontology_graph.py +477 -0
  91. smartmemory_core-0.5.0/smartmemory/graph/smartgraph.py +565 -0
  92. smartmemory_core-0.5.0/smartmemory/graph/types/__init__.py +0 -0
  93. smartmemory_core-0.5.0/smartmemory/graph/types/episodic.py +345 -0
  94. smartmemory_core-0.5.0/smartmemory/graph/types/interfaces.py +165 -0
  95. smartmemory_core-0.5.0/smartmemory/graph/types/procedural.py +224 -0
  96. smartmemory_core-0.5.0/smartmemory/graph/types/semantic.py +342 -0
  97. smartmemory_core-0.5.0/smartmemory/graph/types/zettel.py +187 -0
  98. smartmemory_core-0.5.0/smartmemory/grounding/__init__.py +15 -0
  99. smartmemory_core-0.5.0/smartmemory/grounding/executors.py +40 -0
  100. smartmemory_core-0.5.0/smartmemory/grounding/registry.py +24 -0
  101. smartmemory_core-0.5.0/smartmemory/grounding/schemas.py +41 -0
  102. smartmemory_core-0.5.0/smartmemory/inference/__init__.py +6 -0
  103. smartmemory_core-0.5.0/smartmemory/inference/engine.py +131 -0
  104. smartmemory_core-0.5.0/smartmemory/inference/rules.py +82 -0
  105. smartmemory_core-0.5.0/smartmemory/integration/__init__.py +0 -0
  106. smartmemory_core-0.5.0/smartmemory/integration/archive/archive_provider.py +59 -0
  107. smartmemory_core-0.5.0/smartmemory/integration/chat/__init__.py +0 -0
  108. smartmemory_core-0.5.0/smartmemory/integration/chat/hitl.py +507 -0
  109. smartmemory_core-0.5.0/smartmemory/integration/chat/integration.py +274 -0
  110. smartmemory_core-0.5.0/smartmemory/integration/llm/__init__.py +0 -0
  111. smartmemory_core-0.5.0/smartmemory/integration/llm/llm_client.py +461 -0
  112. smartmemory_core-0.5.0/smartmemory/integration/llm/prompts/__init__.py +0 -0
  113. smartmemory_core-0.5.0/smartmemory/integration/llm/prompts/prompt_manager.py +275 -0
  114. smartmemory_core-0.5.0/smartmemory/integration/llm/prompts/prompt_provider.py +184 -0
  115. smartmemory_core-0.5.0/smartmemory/integration/llm/prompts/prompts.json +43 -0
  116. smartmemory_core-0.5.0/smartmemory/integration/llm/prompts/prompts_loader.py +204 -0
  117. smartmemory_core-0.5.0/smartmemory/integration/llm/providers.py +373 -0
  118. smartmemory_core-0.5.0/smartmemory/integration/llm/response_parser.py +258 -0
  119. smartmemory_core-0.5.0/smartmemory/integration/wikipedia_client.py +139 -0
  120. smartmemory_core-0.5.0/smartmemory/interfaces.py +43 -0
  121. smartmemory_core-0.5.0/smartmemory/managers/__init__.py +13 -0
  122. smartmemory_core-0.5.0/smartmemory/managers/debug.py +169 -0
  123. smartmemory_core-0.5.0/smartmemory/managers/enrichment.py +38 -0
  124. smartmemory_core-0.5.0/smartmemory/managers/evolution.py +30 -0
  125. smartmemory_core-0.5.0/smartmemory/managers/monitoring.py +40 -0
  126. smartmemory_core-0.5.0/smartmemory/memory/__init__.py +0 -0
  127. smartmemory_core-0.5.0/smartmemory/memory/base.py +302 -0
  128. smartmemory_core-0.5.0/smartmemory/memory/canonical_store.py +67 -0
  129. smartmemory_core-0.5.0/smartmemory/memory/context_types.py +14 -0
  130. smartmemory_core-0.5.0/smartmemory/memory/ingestion/__init__.py +0 -0
  131. smartmemory_core-0.5.0/smartmemory/memory/ingestion/enrichment.py +122 -0
  132. smartmemory_core-0.5.0/smartmemory/memory/ingestion/extraction.py +268 -0
  133. smartmemory_core-0.5.0/smartmemory/memory/ingestion/flow.py +486 -0
  134. smartmemory_core-0.5.0/smartmemory/memory/ingestion/grounding.py +30 -0
  135. smartmemory_core-0.5.0/smartmemory/memory/ingestion/observer.py +260 -0
  136. smartmemory_core-0.5.0/smartmemory/memory/ingestion/registry.py +250 -0
  137. smartmemory_core-0.5.0/smartmemory/memory/ingestion/storage.py +234 -0
  138. smartmemory_core-0.5.0/smartmemory/memory/ingestion/utils.py +231 -0
  139. smartmemory_core-0.5.0/smartmemory/memory/memory_factory.py +228 -0
  140. smartmemory_core-0.5.0/smartmemory/memory/migrate.py +127 -0
  141. smartmemory_core-0.5.0/smartmemory/memory/mixins.py +335 -0
  142. smartmemory_core-0.5.0/smartmemory/memory/models/__init__.py +0 -0
  143. smartmemory_core-0.5.0/smartmemory/memory/models/memory_item.py +64 -0
  144. smartmemory_core-0.5.0/smartmemory/memory/pipeline/__init__.py +0 -0
  145. smartmemory_core-0.5.0/smartmemory/memory/pipeline/classification.py +176 -0
  146. smartmemory_core-0.5.0/smartmemory/memory/pipeline/components.py +534 -0
  147. smartmemory_core-0.5.0/smartmemory/memory/pipeline/config.py +249 -0
  148. smartmemory_core-0.5.0/smartmemory/memory/pipeline/enrichment.py +295 -0
  149. smartmemory_core-0.5.0/smartmemory/memory/pipeline/extractor.py +511 -0
  150. smartmemory_core-0.5.0/smartmemory/memory/pipeline/grounding.py +194 -0
  151. smartmemory_core-0.5.0/smartmemory/memory/pipeline/input_adapter.py +166 -0
  152. smartmemory_core-0.5.0/smartmemory/memory/pipeline/linking.py +394 -0
  153. smartmemory_core-0.5.0/smartmemory/memory/pipeline/plugin_base.py +70 -0
  154. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/__init__.py +7 -0
  155. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/analytics.py +641 -0
  156. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/clustering.py +139 -0
  157. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/coreference.py +303 -0
  158. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/crud.py +372 -0
  159. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/enrichment.py +130 -0
  160. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/evolution.py +272 -0
  161. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/graph_operations.py +97 -0
  162. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/grounding.py +95 -0
  163. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/linking.py +69 -0
  164. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/monitoring.py +118 -0
  165. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/personalization.py +29 -0
  166. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/search.py +208 -0
  167. smartmemory_core-0.5.0/smartmemory/memory/pipeline/stages/validation.py +204 -0
  168. smartmemory_core-0.5.0/smartmemory/memory/pipeline/state.py +147 -0
  169. smartmemory_core-0.5.0/smartmemory/memory/pipeline/storage.py +372 -0
  170. smartmemory_core-0.5.0/smartmemory/memory/pipeline/transactions/__init__.py +0 -0
  171. smartmemory_core-0.5.0/smartmemory/memory/pipeline/transactions/change_set.py +70 -0
  172. smartmemory_core-0.5.0/smartmemory/memory/pipeline/transactions/ops.py +324 -0
  173. smartmemory_core-0.5.0/smartmemory/memory/pipeline/transactions/transaction.py +87 -0
  174. smartmemory_core-0.5.0/smartmemory/memory/types/__init__.py +0 -0
  175. smartmemory_core-0.5.0/smartmemory/memory/types/episodic_memory.py +197 -0
  176. smartmemory_core-0.5.0/smartmemory/memory/types/factory_memory_creator.py +268 -0
  177. smartmemory_core-0.5.0/smartmemory/memory/types/procedural_memory.py +192 -0
  178. smartmemory_core-0.5.0/smartmemory/memory/types/semantic_memory.py +156 -0
  179. smartmemory_core-0.5.0/smartmemory/memory/types/wikilink_parser.py +352 -0
  180. smartmemory_core-0.5.0/smartmemory/memory/types/working_memory.py +179 -0
  181. smartmemory_core-0.5.0/smartmemory/memory/types/zettel_extensions.py +873 -0
  182. smartmemory_core-0.5.0/smartmemory/memory/types/zettel_memory.py +460 -0
  183. smartmemory_core-0.5.0/smartmemory/memory/utils.py +16 -0
  184. smartmemory_core-0.5.0/smartmemory/metrics/__init__.py +5 -0
  185. smartmemory_core-0.5.0/smartmemory/metrics/graph_health.py +134 -0
  186. smartmemory_core-0.5.0/smartmemory/models/__init__.py +51 -0
  187. smartmemory_core-0.5.0/smartmemory/models/base.py +81 -0
  188. smartmemory_core-0.5.0/smartmemory/models/compat/__init__.py +0 -0
  189. smartmemory_core-0.5.0/smartmemory/models/compat/boundary_converter.py +172 -0
  190. smartmemory_core-0.5.0/smartmemory/models/compat/dataclass_model.py +300 -0
  191. smartmemory_core-0.5.0/smartmemory/models/compat/simple_boundary.py +62 -0
  192. smartmemory_core-0.5.0/smartmemory/models/concept.py +39 -0
  193. smartmemory_core-0.5.0/smartmemory/models/conditional_step.py +31 -0
  194. smartmemory_core-0.5.0/smartmemory/models/corpus.py +9 -0
  195. smartmemory_core-0.5.0/smartmemory/models/decision.py +277 -0
  196. smartmemory_core-0.5.0/smartmemory/models/drift_event.py +111 -0
  197. smartmemory_core-0.5.0/smartmemory/models/entity.py +37 -0
  198. smartmemory_core-0.5.0/smartmemory/models/entity_types.py +70 -0
  199. smartmemory_core-0.5.0/smartmemory/models/library.py +41 -0
  200. smartmemory_core-0.5.0/smartmemory/models/link_types.py +15 -0
  201. smartmemory_core-0.5.0/smartmemory/models/memory_item.py +365 -0
  202. smartmemory_core-0.5.0/smartmemory/models/note.py +31 -0
  203. smartmemory_core-0.5.0/smartmemory/models/ontology.py +456 -0
  204. smartmemory_core-0.5.0/smartmemory/models/opinion.py +228 -0
  205. smartmemory_core-0.5.0/smartmemory/models/procedure.py +34 -0
  206. smartmemory_core-0.5.0/smartmemory/models/reasoning.py +222 -0
  207. smartmemory_core-0.5.0/smartmemory/models/schema_snapshot.py +97 -0
  208. smartmemory_core-0.5.0/smartmemory/models/status.py +46 -0
  209. smartmemory_core-0.5.0/smartmemory/models/step.py +33 -0
  210. smartmemory_core-0.5.0/smartmemory/models/tag.py +36 -0
  211. smartmemory_core-0.5.0/smartmemory/models/user_model.py +74 -0
  212. smartmemory_core-0.5.0/smartmemory/observability/__init__.py +10 -0
  213. smartmemory_core-0.5.0/smartmemory/observability/events.py +587 -0
  214. smartmemory_core-0.5.0/smartmemory/observability/instrumentation.py +446 -0
  215. smartmemory_core-0.5.0/smartmemory/observability/json_formatter.py +38 -0
  216. smartmemory_core-0.5.0/smartmemory/observability/logging_filter.py +117 -0
  217. smartmemory_core-0.5.0/smartmemory/observability/retrieval_tracking.py +210 -0
  218. smartmemory_core-0.5.0/smartmemory/observability/tracing.py +263 -0
  219. smartmemory_core-0.5.0/smartmemory/ontology/__init__.py +0 -0
  220. smartmemory_core-0.5.0/smartmemory/ontology/entity_pair_cache.py +94 -0
  221. smartmemory_core-0.5.0/smartmemory/ontology/governance.py +499 -0
  222. smartmemory_core-0.5.0/smartmemory/ontology/governance_manager.py +125 -0
  223. smartmemory_core-0.5.0/smartmemory/ontology/hitl/__init__.py +0 -0
  224. smartmemory_core-0.5.0/smartmemory/ontology/hitl/hitl_interface.py +453 -0
  225. smartmemory_core-0.5.0/smartmemory/ontology/inference/__init__.py +0 -0
  226. smartmemory_core-0.5.0/smartmemory/ontology/inference/inference.py +486 -0
  227. smartmemory_core-0.5.0/smartmemory/ontology/inference/ontogpt.py +509 -0
  228. smartmemory_core-0.5.0/smartmemory/ontology/ir_models.py +277 -0
  229. smartmemory_core-0.5.0/smartmemory/ontology/layered.py +210 -0
  230. smartmemory_core-0.5.0/smartmemory/ontology/llm_manager.py +515 -0
  231. smartmemory_core-0.5.0/smartmemory/ontology/manager.py +197 -0
  232. smartmemory_core-0.5.0/smartmemory/ontology/models.py +354 -0
  233. smartmemory_core-0.5.0/smartmemory/ontology/pattern_manager.py +170 -0
  234. smartmemory_core-0.5.0/smartmemory/ontology/promotion.py +324 -0
  235. smartmemory_core-0.5.0/smartmemory/ontology/reasoning_validator.py +182 -0
  236. smartmemory_core-0.5.0/smartmemory/ontology/registry.py +528 -0
  237. smartmemory_core-0.5.0/smartmemory/ontology/template_service.py +239 -0
  238. smartmemory_core-0.5.0/smartmemory/ontology/templates/_manifest.json +29 -0
  239. smartmemory_core-0.5.0/smartmemory/ontology/templates/business.json +312 -0
  240. smartmemory_core-0.5.0/smartmemory/ontology/templates/general.json +275 -0
  241. smartmemory_core-0.5.0/smartmemory/ontology/templates/software.json +337 -0
  242. smartmemory_core-0.5.0/smartmemory/pipeline/__init__.py +24 -0
  243. smartmemory_core-0.5.0/smartmemory/pipeline/config.py +355 -0
  244. smartmemory_core-0.5.0/smartmemory/pipeline/metrics_consumer.py +369 -0
  245. smartmemory_core-0.5.0/smartmemory/pipeline/protocol.py +38 -0
  246. smartmemory_core-0.5.0/smartmemory/pipeline/runner.py +259 -0
  247. smartmemory_core-0.5.0/smartmemory/pipeline/stages/__init__.py +31 -0
  248. smartmemory_core-0.5.0/smartmemory/pipeline/stages/classify.py +75 -0
  249. smartmemory_core-0.5.0/smartmemory/pipeline/stages/coreference.py +61 -0
  250. smartmemory_core-0.5.0/smartmemory/pipeline/stages/enrich.py +93 -0
  251. smartmemory_core-0.5.0/smartmemory/pipeline/stages/entity_ruler.py +178 -0
  252. smartmemory_core-0.5.0/smartmemory/pipeline/stages/evolve.py +53 -0
  253. smartmemory_core-0.5.0/smartmemory/pipeline/stages/ground.py +119 -0
  254. smartmemory_core-0.5.0/smartmemory/pipeline/stages/link.py +54 -0
  255. smartmemory_core-0.5.0/smartmemory/pipeline/stages/llm_extract.py +162 -0
  256. smartmemory_core-0.5.0/smartmemory/pipeline/stages/ontology_constrain.py +392 -0
  257. smartmemory_core-0.5.0/smartmemory/pipeline/stages/reasoning_detect.py +63 -0
  258. smartmemory_core-0.5.0/smartmemory/pipeline/stages/simplify.py +149 -0
  259. smartmemory_core-0.5.0/smartmemory/pipeline/stages/store.py +212 -0
  260. smartmemory_core-0.5.0/smartmemory/pipeline/state.py +138 -0
  261. smartmemory_core-0.5.0/smartmemory/pipeline/token_tracker.py +185 -0
  262. smartmemory_core-0.5.0/smartmemory/pipeline/transport/__init__.py +30 -0
  263. smartmemory_core-0.5.0/smartmemory/pipeline/transport/event_bus.py +364 -0
  264. smartmemory_core-0.5.0/smartmemory/plugins/__init__.py +51 -0
  265. smartmemory_core-0.5.0/smartmemory/plugins/base.py +445 -0
  266. smartmemory_core-0.5.0/smartmemory/plugins/embedding.py +232 -0
  267. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/__init__.py +16 -0
  268. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/basic.py +76 -0
  269. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/link_expansion.py +540 -0
  270. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/sentiment.py +157 -0
  271. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/skills_tools.py +70 -0
  272. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/temporal.py +97 -0
  273. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/topic.py +137 -0
  274. smartmemory_core-0.5.0/smartmemory/plugins/enrichers/usage_tracking.py +122 -0
  275. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/__init__.py +59 -0
  276. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/base.py +11 -0
  277. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/decision_confidence.py +322 -0
  278. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/enhanced/__init__.py +71 -0
  279. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/enhanced/exponential_decay.py +129 -0
  280. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/enhanced/hebbian_co_retrieval.py +128 -0
  281. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/enhanced/interference_based_consolidation.py +173 -0
  282. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/enhanced/retrieval_based_strengthening.py +215 -0
  283. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/enhanced/working_to_episodic.py +193 -0
  284. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/episodic_decay.py +53 -0
  285. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/episodic_to_semantic.py +57 -0
  286. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/episodic_to_zettel.py +54 -0
  287. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/observation_synthesis.py +333 -0
  288. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/opinion_reinforcement.py +270 -0
  289. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/opinion_synthesis.py +282 -0
  290. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/semantic_decay.py +53 -0
  291. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/working_to_episodic.py +65 -0
  292. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/working_to_procedural.py +328 -0
  293. smartmemory_core-0.5.0/smartmemory/plugins/evolvers/zettel_prune.py +113 -0
  294. smartmemory_core-0.5.0/smartmemory/plugins/executor.py +150 -0
  295. smartmemory_core-0.5.0/smartmemory/plugins/extractors/__init__.py +13 -0
  296. smartmemory_core-0.5.0/smartmemory/plugins/extractors/conversation_aware_llm.py +546 -0
  297. smartmemory_core-0.5.0/smartmemory/plugins/extractors/decision.py +192 -0
  298. smartmemory_core-0.5.0/smartmemory/plugins/extractors/llm.py +319 -0
  299. smartmemory_core-0.5.0/smartmemory/plugins/extractors/llm_single.py +521 -0
  300. smartmemory_core-0.5.0/smartmemory/plugins/extractors/reasoning.py +440 -0
  301. smartmemory_core-0.5.0/smartmemory/plugins/extractors/spacy.py +216 -0
  302. smartmemory_core-0.5.0/smartmemory/plugins/grounders/__init__.py +5 -0
  303. smartmemory_core-0.5.0/smartmemory/plugins/grounders/wikipedia.py +126 -0
  304. smartmemory_core-0.5.0/smartmemory/plugins/manager.py +615 -0
  305. smartmemory_core-0.5.0/smartmemory/plugins/registry.py +499 -0
  306. smartmemory_core-0.5.0/smartmemory/plugins/resolvers/__init__.py +0 -0
  307. smartmemory_core-0.5.0/smartmemory/plugins/resolvers/external_resolver.py +57 -0
  308. smartmemory_core-0.5.0/smartmemory/plugins/security.py +391 -0
  309. smartmemory_core-0.5.0/smartmemory/procedure_matcher.py +188 -0
  310. smartmemory_core-0.5.0/smartmemory/procedures/__init__.py +45 -0
  311. smartmemory_core-0.5.0/smartmemory/procedures/candidate_namer.py +354 -0
  312. smartmemory_core-0.5.0/smartmemory/procedures/candidate_scorer.py +239 -0
  313. smartmemory_core-0.5.0/smartmemory/procedures/models.py +104 -0
  314. smartmemory_core-0.5.0/smartmemory/procedures/pattern_detector.py +273 -0
  315. smartmemory_core-0.5.0/smartmemory/py.typed +0 -0
  316. smartmemory_core-0.5.0/smartmemory/reasoning/__init__.py +37 -0
  317. smartmemory_core-0.5.0/smartmemory/reasoning/challenger.py +421 -0
  318. smartmemory_core-0.5.0/smartmemory/reasoning/confidence.py +104 -0
  319. smartmemory_core-0.5.0/smartmemory/reasoning/detection/__init__.py +18 -0
  320. smartmemory_core-0.5.0/smartmemory/reasoning/detection/base.py +31 -0
  321. smartmemory_core-0.5.0/smartmemory/reasoning/detection/cascade.py +25 -0
  322. smartmemory_core-0.5.0/smartmemory/reasoning/detection/embedding.py +71 -0
  323. smartmemory_core-0.5.0/smartmemory/reasoning/detection/graph.py +86 -0
  324. smartmemory_core-0.5.0/smartmemory/reasoning/detection/heuristic.py +97 -0
  325. smartmemory_core-0.5.0/smartmemory/reasoning/detection/llm.py +71 -0
  326. smartmemory_core-0.5.0/smartmemory/reasoning/fuzzy_confidence.py +119 -0
  327. smartmemory_core-0.5.0/smartmemory/reasoning/models.py +84 -0
  328. smartmemory_core-0.5.0/smartmemory/reasoning/proof_tree.py +154 -0
  329. smartmemory_core-0.5.0/smartmemory/reasoning/query_router.py +138 -0
  330. smartmemory_core-0.5.0/smartmemory/reasoning/reasoner.py +50 -0
  331. smartmemory_core-0.5.0/smartmemory/reasoning/residuation.py +147 -0
  332. smartmemory_core-0.5.0/smartmemory/reasoning/resolution/__init__.py +17 -0
  333. smartmemory_core-0.5.0/smartmemory/reasoning/resolution/base.py +19 -0
  334. smartmemory_core-0.5.0/smartmemory/reasoning/resolution/cascade.py +24 -0
  335. smartmemory_core-0.5.0/smartmemory/reasoning/resolution/grounding.py +51 -0
  336. smartmemory_core-0.5.0/smartmemory/reasoning/resolution/llm.py +75 -0
  337. smartmemory_core-0.5.0/smartmemory/reasoning/resolution/recency.py +41 -0
  338. smartmemory_core-0.5.0/smartmemory/reasoning/resolution/wikipedia.py +101 -0
  339. smartmemory_core-0.5.0/smartmemory/retrieval/__init__.py +14 -0
  340. smartmemory_core-0.5.0/smartmemory/retrieval/ssg_traversal.py +595 -0
  341. smartmemory_core-0.5.0/smartmemory/schema_diff.py +355 -0
  342. smartmemory_core-0.5.0/smartmemory/schema_providers.py +95 -0
  343. smartmemory_core-0.5.0/smartmemory/scope_provider.py +70 -0
  344. smartmemory_core-0.5.0/smartmemory/similarity/__init__.py +0 -0
  345. smartmemory_core-0.5.0/smartmemory/similarity/enhanced_metrics.py +849 -0
  346. smartmemory_core-0.5.0/smartmemory/similarity/framework.py +448 -0
  347. smartmemory_core-0.5.0/smartmemory/smart_memory.py +1539 -0
  348. smartmemory_core-0.5.0/smartmemory/stores/__init__.py +1 -0
  349. smartmemory_core-0.5.0/smartmemory/stores/base.py +228 -0
  350. smartmemory_core-0.5.0/smartmemory/stores/converters/__init__.py +0 -0
  351. smartmemory_core-0.5.0/smartmemory/stores/converters/episodic_converter.py +350 -0
  352. smartmemory_core-0.5.0/smartmemory/stores/converters/procedural_converter.py +440 -0
  353. smartmemory_core-0.5.0/smartmemory/stores/converters/semantic_converter.py +290 -0
  354. smartmemory_core-0.5.0/smartmemory/stores/converters/zettel_converter.py +341 -0
  355. smartmemory_core-0.5.0/smartmemory/stores/corpus/__init__.py +0 -0
  356. smartmemory_core-0.5.0/smartmemory/stores/corpus/store.py +76 -0
  357. smartmemory_core-0.5.0/smartmemory/stores/example_memory_handler.py +235 -0
  358. smartmemory_core-0.5.0/smartmemory/stores/external/__init__.py +0 -0
  359. smartmemory_core-0.5.0/smartmemory/stores/external/file_handler.py +180 -0
  360. smartmemory_core-0.5.0/smartmemory/stores/external/mcp_handler.py +143 -0
  361. smartmemory_core-0.5.0/smartmemory/stores/external/s3_handler.py +101 -0
  362. smartmemory_core-0.5.0/smartmemory/stores/external/web_handler.py +75 -0
  363. smartmemory_core-0.5.0/smartmemory/stores/factory.py +265 -0
  364. smartmemory_core-0.5.0/smartmemory/stores/json_store.py +363 -0
  365. smartmemory_core-0.5.0/smartmemory/stores/mixins.py +354 -0
  366. smartmemory_core-0.5.0/smartmemory/stores/ontology/__init__.py +94 -0
  367. smartmemory_core-0.5.0/smartmemory/stores/ontology/falkordb.py +360 -0
  368. smartmemory_core-0.5.0/smartmemory/stores/ontology/redis_service.py +336 -0
  369. smartmemory_core-0.5.0/smartmemory/stores/persistence/__init__.py +20 -0
  370. smartmemory_core-0.5.0/smartmemory/stores/persistence/base.py +56 -0
  371. smartmemory_core-0.5.0/smartmemory/stores/persistence/entity_handler.py +21 -0
  372. smartmemory_core-0.5.0/smartmemory/stores/persistence/json.py +125 -0
  373. smartmemory_core-0.5.0/smartmemory/stores/persistence/model.py +131 -0
  374. smartmemory_core-0.5.0/smartmemory/stores/persistence/ontology_handlers.py +175 -0
  375. smartmemory_core-0.5.0/smartmemory/stores/registrations.py +6 -0
  376. smartmemory_core-0.5.0/smartmemory/stores/registry.py +34 -0
  377. smartmemory_core-0.5.0/smartmemory/stores/vector/__init__.py +0 -0
  378. smartmemory_core-0.5.0/smartmemory/stores/vector/backends/__init__.py +7 -0
  379. smartmemory_core-0.5.0/smartmemory/stores/vector/backends/base.py +72 -0
  380. smartmemory_core-0.5.0/smartmemory/stores/vector/backends/falkor.py +219 -0
  381. smartmemory_core-0.5.0/smartmemory/stores/vector/backends/usearch.py +239 -0
  382. smartmemory_core-0.5.0/smartmemory/stores/vector/vector_store.py +390 -0
  383. smartmemory_core-0.5.0/smartmemory/streams/__init__.py +1 -0
  384. smartmemory_core-0.5.0/smartmemory/streams/pipeline_producer.py +110 -0
  385. smartmemory_core-0.5.0/smartmemory/temporal/__init__.py +41 -0
  386. smartmemory_core-0.5.0/smartmemory/temporal/context.py +84 -0
  387. smartmemory_core-0.5.0/smartmemory/temporal/performance.py +429 -0
  388. smartmemory_core-0.5.0/smartmemory/temporal/queries.py +746 -0
  389. smartmemory_core-0.5.0/smartmemory/temporal/relationships.py +538 -0
  390. smartmemory_core-0.5.0/smartmemory/temporal/version_tracker.py +478 -0
  391. smartmemory_core-0.5.0/smartmemory/tools/__init__.py +1 -0
  392. smartmemory_core-0.5.0/smartmemory/tools/factory.py +120 -0
  393. smartmemory_core-0.5.0/smartmemory/tools/markdown_writer.py +44 -0
  394. smartmemory_core-0.5.0/smartmemory/utils/__init__.py +120 -0
  395. smartmemory_core-0.5.0/smartmemory/utils/cache.py +286 -0
  396. smartmemory_core-0.5.0/smartmemory/utils/chunking.py +648 -0
  397. smartmemory_core-0.5.0/smartmemory/utils/context.py +47 -0
  398. smartmemory_core-0.5.0/smartmemory/utils/deduplication.py +427 -0
  399. smartmemory_core-0.5.0/smartmemory/utils/hybrid_retrieval.py +323 -0
  400. smartmemory_core-0.5.0/smartmemory/utils/llm.py +203 -0
  401. smartmemory_core-0.5.0/smartmemory/utils/llm_client/dspy.py +283 -0
  402. smartmemory_core-0.5.0/smartmemory/utils/llm_client/litellm.py +91 -0
  403. smartmemory_core-0.5.0/smartmemory/utils/llm_client/openai.py +76 -0
  404. smartmemory_core-0.5.0/smartmemory/utils/pipeline_utils.py +67 -0
  405. smartmemory_core-0.5.0/smartmemory/utils/serialization.py +188 -0
  406. smartmemory_core-0.5.0/smartmemory/utils/token_tracking.py +287 -0
  407. smartmemory_core-0.5.0/smartmemory/validation/__init__.py +6 -0
  408. smartmemory_core-0.5.0/smartmemory/validation/edge_validator.py +135 -0
  409. smartmemory_core-0.5.0/smartmemory/validation/memory_validator.py +148 -0
  410. smartmemory_core-0.5.0/smartmemory_core.egg-info/SOURCES.txt +407 -0
@@ -0,0 +1,66 @@
1
+ # ===== PROMPTS (smartmemory) =====
2
+ # Host path for local runs
3
+ SMARTMEMORY_PROMPTS=smart-memory/smartmemory/prompts.json
4
+ # Auto-start Mongo-backed overrides sync inside processes using smartmemory
5
+ PROMPTS_OVERRIDES_AUTO_START=true
6
+ # Default workspace identifier for the overrides document
7
+ PROMPTS_OVERRIDES_WORKSPACE_ID=default
8
+
9
+ # ===== GLOBAL CONFIGURATION =====
10
+ # Python
11
+ PYTHONPATH=/app
12
+
13
+ # Docker
14
+ DOCKER_COMPOSE_VERSION=3.8
15
+ RESTART_POLICY=unless-stopped
16
+ VOLUME_DRIVER=local
17
+
18
+ # Network
19
+ SMARTMEMORY_NETWORK=smartmemory-network
20
+ NETWORK_DRIVER=bridge
21
+ SMARTMEMORY_DEV_NETWORK=smartmemory-dev-network
22
+ SMARTMEMORY_DEV_NETWORK_NAME=smartmemory-dev-network
23
+
24
+ # Development
25
+ DEV_WORKING_DIR=/app
26
+ PYCACHE_EXCLUDE=/app/__pycache__
27
+ PYTEST_CACHE_EXCLUDE=/app/.pytest_cache
28
+ NODE_MODULES_EXCLUDE=/app/node_modules
29
+
30
+ SMARTMEMORY_CONFIG=config.json
31
+
32
+ # ===== FALKORDB SERVICE =====
33
+ # Unified port configuration
34
+ FALKORDB_PORT=9010
35
+ FALKORDB_HOST=localhost
36
+ FALKORDB_WEB_PORT=3000
37
+ FALKORDB_ARGS=--port 9010 --bind 0.0.0.0 --protected-mode no
38
+ FALKORDB_VOLUME_DATA=falkordb_data
39
+ FALKORDB_VOLUME_TARGET=/data
40
+
41
+ # ===== REDIS SERVICE =====
42
+ # Unified port configuration
43
+ REDIS_PORT=9012
44
+ REDIS_HOST=localhost
45
+ REDIS_MAXMEMORY=256mb
46
+ REDIS_MAXMEMORY_POLICY=allkeys-lru
47
+ REDIS_VOLUME_DATA=redis_data
48
+ REDIS_VOLUME_TARGET=/data
49
+
50
+ # ===== EMBEDDING PROVIDERS =====
51
+ # Choose provider: openai, ollama, or huggingface
52
+ EMBEDDING_PROVIDER=openai
53
+ EMBEDDING_MODEL=text-embedding-ada-002
54
+
55
+ # OpenAI
56
+ OPENAI_API_KEY=
57
+
58
+ # HuggingFace (optional - for API-based inference)
59
+ HUGGINGFACE_API_KEY=
60
+ # HuggingFace model (for both API and local inference)
61
+ # Popular options: sentence-transformers/all-MiniLM-L6-v2, sentence-transformers/all-mpnet-base-v2
62
+ HUGGINGFACE_MODEL=sentence-transformers/all-MiniLM-L6-v2
63
+
64
+ # Ollama (for local inference)
65
+ OLLAMA_URL=http://localhost:11434
66
+
@@ -0,0 +1,61 @@
1
+ # SmartMemory Contributor License Agreement (CLA)
2
+
3
+ ## Individual Contributor License Agreement
4
+
5
+ Thank you for your interest in contributing to SmartMemory. This Contributor License Agreement ("Agreement") documents the rights granted by contributors to SmartMemory.
6
+
7
+ ### 1. Definitions
8
+
9
+ **"You"** means the individual signing this Agreement.
10
+
11
+ **"Contribution"** means any original work of authorship, including any modifications or additions to existing work, submitted by You to SmartMemory for inclusion in SmartMemory.
12
+
13
+ **"SmartMemory"** means the SmartMemory project and its maintainers.
14
+
15
+ ### 2. Grant of Copyright License
16
+
17
+ You hereby grant to SmartMemory and recipients of software distributed by SmartMemory a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to use, reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
18
+
19
+ ### 3. Grant of Patent License
20
+
21
+ You hereby grant to SmartMemory and recipients of software distributed by SmartMemory a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer Your Contributions.
22
+
23
+ ### 4. Dual Licensing Rights
24
+
25
+ You understand and agree that SmartMemory may license Your Contributions under:
26
+ - The GNU Affero General Public License v3.0 (AGPL v3) for open-source distribution
27
+ - Commercial licenses for proprietary use
28
+
29
+ This dual licensing model allows SmartMemory to:
30
+ - Provide the software free for open-source use
31
+ - Offer commercial licenses to companies that need proprietary rights
32
+ - Sustain development through commercial revenue
33
+
34
+ ### 5. Original Creation
35
+
36
+ You represent that each of Your Contributions is Your original creation and that You are legally entitled to grant the above licenses.
37
+
38
+ ### 6. No Obligation to Use
39
+
40
+ You understand that SmartMemory is under no obligation to use or incorporate Your Contributions into the project.
41
+
42
+ ---
43
+
44
+ ## How to Sign
45
+
46
+ To contribute to SmartMemory, you need to agree to this CLA:
47
+
48
+ 1. **For GitHub contributions**: Add a comment to your first pull request stating:
49
+ ```
50
+ I agree to the SmartMemory CLA as outlined in CLA.md
51
+ ```
52
+
53
+ 2. **For email contributions**: Send an email to maintainer@smartmemory.ai with:
54
+ - Subject: "SmartMemory CLA Agreement"
55
+ - Body: "I, [Your Full Name], agree to the SmartMemory CLA as outlined in CLA.md"
56
+
57
+ This ensures that SmartMemory can continue to offer both open-source and commercial licensing options while protecting contributors' rights.
58
+
59
+ ---
60
+
61
+ **Questions about the CLA?** Contact us at help@smartmemory.ai
@@ -0,0 +1,31 @@
1
+ ### Open Source License (AGPL v3)
2
+ For open-source projects, SmartMemory is licensed under the **GNU Affero General Public License v3.0**. This ensures that any derivative works or applications using SmartMemory must also be open-sourced under compatible terms.
3
+
4
+ - ✅ **Free for open-source projects**
5
+ - ✅ **Full access to source code**
6
+ - ⚠️ **Requires open-sourcing your application**
7
+ - ⚠️ **AGPL copyleft provisions apply**
8
+
9
+ ### Commercial License
10
+ For commercial and proprietary applications, we offer commercial licenses that remove the copyleft restrictions:
11
+
12
+ - ✅ **Use in proprietary applications**
13
+ - ✅ **No source code disclosure required**
14
+ - ✅ **Flexible licensing terms**
15
+ - ✅ **Commercial support available**
16
+
17
+ **Contact us for commercial licensing**: help@smartmemory.ai
18
+
19
+ ### Which License Do I Need?
20
+
21
+ | Use Case | License Required |
22
+ |----------|------------------|
23
+ | Open-source project | AGPL v3 (free) |
24
+ | Academic research | AGPL v3 (free) |
25
+ | Internal company tools | AGPL v3 (free) |
26
+ | Commercial SaaS product | Commercial license |
27
+ | Proprietary software distribution | Commercial license |
28
+ | White-label solutions | Commercial license |
29
+
30
+ See [LICENSE](LICENSE.agpl-v3) for AGPL v3 terms.
31
+ For a commercial license [email](info@smartmemory.ai) us.