memmachine-server 0.2.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 (132) hide show
  1. memmachine_server-0.2.0/LICENSE +201 -0
  2. memmachine_server-0.2.0/PKG-INFO +154 -0
  3. memmachine_server-0.2.0/README.md +113 -0
  4. memmachine_server-0.2.0/pyproject.toml +98 -0
  5. memmachine_server-0.2.0/setup.cfg +4 -0
  6. memmachine_server-0.2.0/src/memmachine/__init__.py +40 -0
  7. memmachine_server-0.2.0/src/memmachine/common/__init__.py +1 -0
  8. memmachine_server-0.2.0/src/memmachine/common/api/__init__.py +1 -0
  9. memmachine_server-0.2.0/src/memmachine/common/api/doc.py +366 -0
  10. memmachine_server-0.2.0/src/memmachine/common/api/spec.py +580 -0
  11. memmachine_server-0.2.0/src/memmachine/common/configuration/__init__.py +316 -0
  12. memmachine_server-0.2.0/src/memmachine/common/configuration/database_conf.py +223 -0
  13. memmachine_server-0.2.0/src/memmachine/common/configuration/default_episode_summary_system_prompt.txt +5 -0
  14. memmachine_server-0.2.0/src/memmachine/common/configuration/default_episode_summary_user_prompt.txt +15 -0
  15. memmachine_server-0.2.0/src/memmachine/common/configuration/embedder_conf.py +203 -0
  16. memmachine_server-0.2.0/src/memmachine/common/configuration/episodic_config.py +239 -0
  17. memmachine_server-0.2.0/src/memmachine/common/configuration/language_model_conf.py +255 -0
  18. memmachine_server-0.2.0/src/memmachine/common/configuration/log_conf.py +144 -0
  19. memmachine_server-0.2.0/src/memmachine/common/configuration/mixin_confs.py +109 -0
  20. memmachine_server-0.2.0/src/memmachine/common/configuration/reranker_conf.py +192 -0
  21. memmachine_server-0.2.0/src/memmachine/common/data_types.py +19 -0
  22. memmachine_server-0.2.0/src/memmachine/common/embedder/__init__.py +7 -0
  23. memmachine_server-0.2.0/src/memmachine/common/embedder/amazon_bedrock_embedder.py +188 -0
  24. memmachine_server-0.2.0/src/memmachine/common/embedder/embedder.py +46 -0
  25. memmachine_server-0.2.0/src/memmachine/common/embedder/openai_embedder.py +257 -0
  26. memmachine_server-0.2.0/src/memmachine/common/embedder/sentence_transformer_embedder.py +139 -0
  27. memmachine_server-0.2.0/src/memmachine/common/episode_store/__init__.py +23 -0
  28. memmachine_server-0.2.0/src/memmachine/common/episode_store/count_caching_episode_storage.py +154 -0
  29. memmachine_server-0.2.0/src/memmachine/common/episode_store/episode_model.py +67 -0
  30. memmachine_server-0.2.0/src/memmachine/common/episode_store/episode_sqlalchemy_store.py +439 -0
  31. memmachine_server-0.2.0/src/memmachine/common/episode_store/episode_storage.py +74 -0
  32. memmachine_server-0.2.0/src/memmachine/common/errors.py +55 -0
  33. memmachine_server-0.2.0/src/memmachine/common/filter/__init__.py +1 -0
  34. memmachine_server-0.2.0/src/memmachine/common/filter/filter_parser.py +258 -0
  35. memmachine_server-0.2.0/src/memmachine/common/language_model/__init__.py +7 -0
  36. memmachine_server-0.2.0/src/memmachine/common/language_model/amazon_bedrock_language_model.py +575 -0
  37. memmachine_server-0.2.0/src/memmachine/common/language_model/language_model.py +96 -0
  38. memmachine_server-0.2.0/src/memmachine/common/language_model/openai_chat_completions_language_model.py +305 -0
  39. memmachine_server-0.2.0/src/memmachine/common/language_model/openai_responses_language_model.py +327 -0
  40. memmachine_server-0.2.0/src/memmachine/common/metrics_factory/__init__.py +9 -0
  41. memmachine_server-0.2.0/src/memmachine/common/metrics_factory/metrics_factory.py +96 -0
  42. memmachine_server-0.2.0/src/memmachine/common/metrics_factory/prometheus_metrics_factory.py +158 -0
  43. memmachine_server-0.2.0/src/memmachine/common/reranker/__init__.py +7 -0
  44. memmachine_server-0.2.0/src/memmachine/common/reranker/amazon_bedrock_reranker.py +200 -0
  45. memmachine_server-0.2.0/src/memmachine/common/reranker/bm25_reranker.py +64 -0
  46. memmachine_server-0.2.0/src/memmachine/common/reranker/cross_encoder_reranker.py +39 -0
  47. memmachine_server-0.2.0/src/memmachine/common/reranker/embedder_reranker.py +73 -0
  48. memmachine_server-0.2.0/src/memmachine/common/reranker/identity_reranker.py +12 -0
  49. memmachine_server-0.2.0/src/memmachine/common/reranker/reranker.py +23 -0
  50. memmachine_server-0.2.0/src/memmachine/common/reranker/rrf_hybrid_reranker.py +47 -0
  51. memmachine_server-0.2.0/src/memmachine/common/resource_manager/__init__.py +58 -0
  52. memmachine_server-0.2.0/src/memmachine/common/resource_manager/database_manager.py +226 -0
  53. memmachine_server-0.2.0/src/memmachine/common/resource_manager/embedder_manager.py +139 -0
  54. memmachine_server-0.2.0/src/memmachine/common/resource_manager/language_model_manager.py +150 -0
  55. memmachine_server-0.2.0/src/memmachine/common/resource_manager/reranker_manager.py +215 -0
  56. memmachine_server-0.2.0/src/memmachine/common/resource_manager/resource_manager.py +193 -0
  57. memmachine_server-0.2.0/src/memmachine/common/resource_manager/semantic_manager.py +131 -0
  58. memmachine_server-0.2.0/src/memmachine/common/session_manager/__init__.py +1 -0
  59. memmachine_server-0.2.0/src/memmachine/common/session_manager/session_data_manager.py +84 -0
  60. memmachine_server-0.2.0/src/memmachine/common/session_manager/session_data_manager_sql_impl.py +287 -0
  61. memmachine_server-0.2.0/src/memmachine/common/utils.py +48 -0
  62. memmachine_server-0.2.0/src/memmachine/common/vector_graph_store/__init__.py +12 -0
  63. memmachine_server-0.2.0/src/memmachine/common/vector_graph_store/data_types.py +117 -0
  64. memmachine_server-0.2.0/src/memmachine/common/vector_graph_store/neo4j_vector_graph_store.py +1654 -0
  65. memmachine_server-0.2.0/src/memmachine/common/vector_graph_store/vector_graph_store.py +290 -0
  66. memmachine_server-0.2.0/src/memmachine/episodic_memory/__init__.py +7 -0
  67. memmachine_server-0.2.0/src/memmachine/episodic_memory/declarative_memory/__init__.py +14 -0
  68. memmachine_server-0.2.0/src/memmachine/episodic_memory/declarative_memory/data_types.py +99 -0
  69. memmachine_server-0.2.0/src/memmachine/episodic_memory/declarative_memory/declarative_memory.py +682 -0
  70. memmachine_server-0.2.0/src/memmachine/episodic_memory/episodic_memory.py +505 -0
  71. memmachine_server-0.2.0/src/memmachine/episodic_memory/episodic_memory_manager.py +349 -0
  72. memmachine_server-0.2.0/src/memmachine/episodic_memory/instance_lru_cache.py +177 -0
  73. memmachine_server-0.2.0/src/memmachine/episodic_memory/long_term_memory/__init__.py +8 -0
  74. memmachine_server-0.2.0/src/memmachine/episodic_memory/long_term_memory/long_term_memory.py +327 -0
  75. memmachine_server-0.2.0/src/memmachine/episodic_memory/long_term_memory/service_locator.py +26 -0
  76. memmachine_server-0.2.0/src/memmachine/episodic_memory/service_locator.py +48 -0
  77. memmachine_server-0.2.0/src/memmachine/episodic_memory/short_term_memory/__init__.py +1 -0
  78. memmachine_server-0.2.0/src/memmachine/episodic_memory/short_term_memory/service_locator.py +24 -0
  79. memmachine_server-0.2.0/src/memmachine/episodic_memory/short_term_memory/short_term_memory.py +486 -0
  80. memmachine_server-0.2.0/src/memmachine/installation/__init__.py +1 -0
  81. memmachine_server-0.2.0/src/memmachine/installation/configuration_wizard.py +379 -0
  82. memmachine_server-0.2.0/src/memmachine/installation/memmachine_configure.py +418 -0
  83. memmachine_server-0.2.0/src/memmachine/installation/utilities.py +80 -0
  84. memmachine_server-0.2.0/src/memmachine/main/__init__.py +1 -0
  85. memmachine_server-0.2.0/src/memmachine/main/memmachine.py +475 -0
  86. memmachine_server-0.2.0/src/memmachine/rest_client/README.md +228 -0
  87. memmachine_server-0.2.0/src/memmachine/rest_client/__init__.py +12 -0
  88. memmachine_server-0.2.0/src/memmachine/rest_client/client.py +485 -0
  89. memmachine_server-0.2.0/src/memmachine/rest_client/memory.py +759 -0
  90. memmachine_server-0.2.0/src/memmachine/rest_client/project.py +208 -0
  91. memmachine_server-0.2.0/src/memmachine/semantic_memory/__init__.py +3 -0
  92. memmachine_server-0.2.0/src/memmachine/semantic_memory/semantic_ingestion.py +327 -0
  93. memmachine_server-0.2.0/src/memmachine/semantic_memory/semantic_llm.py +114 -0
  94. memmachine_server-0.2.0/src/memmachine/semantic_memory/semantic_memory.py +279 -0
  95. memmachine_server-0.2.0/src/memmachine/semantic_memory/semantic_model.py +145 -0
  96. memmachine_server-0.2.0/src/memmachine/semantic_memory/semantic_session_manager.py +322 -0
  97. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/__init__.py +1 -0
  98. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/__init__.py +1 -0
  99. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/env.py +117 -0
  100. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/versions/001_initial_migration.py +89 -0
  101. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/versions/3d6aaebdc526_sync_sqlalchemy_schema.py +372 -0
  102. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/versions/79f00a9f2409_change_history_id_to_string.py +59 -0
  103. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/versions/843f6d216d10_rename_semantic_type_to_semantic_.py +254 -0
  104. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/versions/__init__.py +1 -0
  105. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/alembic_pg/versions/adb5618bd4ee_remove_history_table.py +77 -0
  106. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/neo4j_semantic_storage.py +1211 -0
  107. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/sqlalchemy_pgvector_semantic.py +755 -0
  108. memmachine_server-0.2.0/src/memmachine/semantic_memory/storage/storage_base.py +178 -0
  109. memmachine_server-0.2.0/src/memmachine/semantic_memory/util/__init__.py +1 -0
  110. memmachine_server-0.2.0/src/memmachine/semantic_memory/util/semantic_prompt_template.py +216 -0
  111. memmachine_server-0.2.0/src/memmachine/server/__init__.py +1 -0
  112. memmachine_server-0.2.0/src/memmachine/server/api_v2/__init__.py +1 -0
  113. memmachine_server-0.2.0/src/memmachine/server/api_v2/mcp.py +497 -0
  114. memmachine_server-0.2.0/src/memmachine/server/api_v2/router.py +306 -0
  115. memmachine_server-0.2.0/src/memmachine/server/api_v2/service.py +99 -0
  116. memmachine_server-0.2.0/src/memmachine/server/app.py +91 -0
  117. memmachine_server-0.2.0/src/memmachine/server/mcp_http.py +79 -0
  118. memmachine_server-0.2.0/src/memmachine/server/mcp_stdio.py +35 -0
  119. memmachine_server-0.2.0/src/memmachine/server/prompt/__init__.py +1 -0
  120. memmachine_server-0.2.0/src/memmachine/server/prompt/crm_prompt.py +562 -0
  121. memmachine_server-0.2.0/src/memmachine/server/prompt/default_prompts.py +22 -0
  122. memmachine_server-0.2.0/src/memmachine/server/prompt/financial_analyst_prompt.py +532 -0
  123. memmachine_server-0.2.0/src/memmachine/server/prompt/health_assistant_prompt.py +393 -0
  124. memmachine_server-0.2.0/src/memmachine/server/prompt/profile_prompt.py +56 -0
  125. memmachine_server-0.2.0/src/memmachine/server/prompt/prompt_utilities.py +19 -0
  126. memmachine_server-0.2.0/src/memmachine/server/prompt/writing_assistant_prompt.py +477 -0
  127. memmachine_server-0.2.0/src/memmachine_server.egg-info/PKG-INFO +154 -0
  128. memmachine_server-0.2.0/src/memmachine_server.egg-info/SOURCES.txt +130 -0
  129. memmachine_server-0.2.0/src/memmachine_server.egg-info/dependency_links.txt +1 -0
  130. memmachine_server-0.2.0/src/memmachine_server.egg-info/entry_points.txt +6 -0
  131. memmachine_server-0.2.0/src/memmachine_server.egg-info/requires.txt +28 -0
  132. memmachine_server-0.2.0/src/memmachine_server.egg-info/top_level.txt +1 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,154 @@
1
+ Metadata-Version: 2.4
2
+ Name: memmachine-server
3
+ Version: 0.2.0
4
+ Summary: MemMachine Server - The complete MemMachine memory system server with episodic and profile memory
5
+ Author-email: MemMachine <noreply@memmachine.ai>
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/MemMachine/MemMachine
8
+ Project-URL: Issues, https://github.com/MemMachine/MemMachine/issues
9
+ Keywords: memmachine,server,memory,ai,agent
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Operating System :: OS Independent
12
+ Requires-Python: >=3.12
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: alembic>=1.17.1
16
+ Requires-Dist: asyncpg>=0.31.0
17
+ Requires-Dist: aiosqlite>=0.20.0
18
+ Requires-Dist: boto3>=1.40.40
19
+ Requires-Dist: boto3-stubs==1.40.64
20
+ Requires-Dist: dotenv>=0.9.9
21
+ Requires-Dist: fastapi>=0.116.1
22
+ Requires-Dist: fastmcp>=2.12.0
23
+ Requires-Dist: instructor[bedrock]>=1.12.0
24
+ Requires-Dist: langchain-aws>=0.2.33
25
+ Requires-Dist: neo4j>=5.28.2
26
+ Requires-Dist: nltk>=3.9.1
27
+ Requires-Dist: openai>=1.104.2
28
+ Requires-Dist: pgvector>=0.4.1
29
+ Requires-Dist: prometheus-client>=0.22.1
30
+ Requires-Dist: pydantic>=2.11.7
31
+ Requires-Dist: pyyaml>=6.0.2
32
+ Requires-Dist: rank-bm25>=0.2.2
33
+ Requires-Dist: sqlalchemy>=2.0.43
34
+ Requires-Dist: uvicorn>=0.35.0
35
+ Requires-Dist: greenlet>=3.2.4
36
+ Requires-Dist: tzdata>=2024.1; sys_platform == "win32"
37
+ Requires-Dist: psutil>=7.1.0
38
+ Provides-Extra: gpu
39
+ Requires-Dist: sentence-transformers>=5.1.0; extra == "gpu"
40
+ Dynamic: license-file
41
+
42
+ # MemMachine
43
+
44
+ <div align="center">
45
+
46
+ ![Discord](https://img.shields.io/discord/1412878659479666810)
47
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/MemMachine/MemMachine)
48
+ ![GitHub License](https://img.shields.io/github/license/MemMachine/MemMachine)
49
+
50
+ </div>
51
+
52
+ ## Growing Community
53
+
54
+ MemMachine is a growing community of builders and developers. Please help us grow by clicking the *Star* button above.
55
+
56
+ <img src="https://starchart.cc/MemMachine/MemMachine.svg?variant=light" alt="Alt text" height="300"/>
57
+
58
+ ## Universal memory layer for AI Agents
59
+
60
+ Meet MemMachine, an open-source memory layer for advanced AI agents. It enables
61
+ AI-powered applications to learn, store, and recall data and preferences from
62
+ past sessions to enrich future interactions. MemMachine's memory layer persists
63
+ across multiple sessions, agents, and large language models, building a
64
+ sophisticated, evolving user profile. It transforms AI chatbots into
65
+ personalized, context-aware AI assistants designed to understand and respond
66
+ with better precision and depth.
67
+
68
+ ## Who Is MemMachine For?
69
+
70
+ - Developers building AI agents, assistants, or autonomous workflows.
71
+ - Researchers experimenting with agent architectures and cognitive models.
72
+
73
+ ## Key Features
74
+
75
+ - **Multiple Memory Types:** MemMachine supports Working (Short Term),
76
+ Persistent (Long Term), and Personalized (Profile) memory types.
77
+ - **Developer Friendly APIs:** Python SDK, RESTful, and MCP interfaces and
78
+ endpoints to make integrating MemMachine easy into your Agents. For more
79
+ information, refer to the
80
+ [API Reference Guide](https://docs.memmachine.ai/api_reference).
81
+
82
+ ## Architecture
83
+
84
+ 1. Agents Interact via the API Layer
85
+ Users interact with an agent, which connects to the MemMachine Memory core through a RESTful API, Python SDK, or MCP Server.
86
+ 2. MemMachine Manages Memory
87
+ MemMachine processes interactions and stores them in two distinct types: Episodic Memory for conversational context and Profile Memory for long-term user facts.
88
+ 3. Data is Persisted to Databases
89
+ Memory is persisted to a database layer where Episodic Memory is stored in a graph database and Profile Memory is stored in an SQL database.
90
+
91
+ <div align="center">
92
+
93
+ ![MemMachine Architecture](https://raw.githubusercontent.com/MemMachine/MemMachine/main/assets/img/MemMachine_Architecture.png)
94
+
95
+ </div>
96
+
97
+ ## Use Cases & Example Agents
98
+
99
+ MemMachine's versatile memory architecture can be applied across any domain,
100
+ transforming generic bots into specialized, expert assistants. Our growing list
101
+ of [examples](examples/README.md) showcases the endless possibilities of
102
+ memory-powered agents that integrate into your own applications and solutions.
103
+
104
+ - **CRM Agent:** Your agent can recall a client's entire history and deal stage,
105
+ proactively helping your sales team build relationships and close deals
106
+ faster.
107
+ - **Healthcare Navigator:** Offer continuous patient support with an agent that
108
+ remembers medical history and tracks treatment progress to provide a
109
+ seamless healthcare journey.
110
+ - **Personal Finance Advisor:** Your agent will remember a user's portfolio and
111
+ risk tolerance, delivering personalized financial insights based on their
112
+ complete history.
113
+ - **Content Writer:** Build an assistant that remembers your unique style guide
114
+ and terminology, ensuring perfect consistency across all documentation.
115
+
116
+ We're excited to see what you're working on. Join the
117
+ [Discord Server](https://discord.gg/usydANvKqD) and drop a shout-out to your
118
+ project in the **showcase** channel.
119
+
120
+ ## Quick Start
121
+
122
+ Want to get started right away? Check out our
123
+ [Quick Start Guide](https://docs.memmachine.ai).
124
+
125
+ ## Installation
126
+
127
+ MemMachine is distributed as a Docker container and Python package. For full
128
+ installation options, visit the [documentation](https://docs.memmachine.ai).
129
+
130
+ ## Basic Usage
131
+
132
+ Get started with a simple "Hello World" example by following the
133
+ [Quick Start Guide](https://docs.memmachine.ai/getting_started/quickstart).
134
+
135
+ ## Documentation
136
+
137
+ - [Main Website](https://memmachine.ai)
138
+ - [Docs & API Reference](https://docs.memmachine.ai)
139
+
140
+ ## Community & Support
141
+
142
+ - **Discord:** Join our Docker community for support, updates, and discussions:
143
+ [https://discord.gg/usydANvKqD](https://discord.gg/usydANvKqD)
144
+ - **Issues & Feature Requests:** Use GitHub
145
+ [Issues](https://github.com/MemMachine/MemMachine/issues).
146
+
147
+ ## Contributing
148
+
149
+ We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for
150
+ guidelines.
151
+
152
+ ## License
153
+
154
+ MemMachine is released under the [Apache 2.0 License](LICENSE).
@@ -0,0 +1,113 @@
1
+ # MemMachine
2
+
3
+ <div align="center">
4
+
5
+ ![Discord](https://img.shields.io/discord/1412878659479666810)
6
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/MemMachine/MemMachine)
7
+ ![GitHub License](https://img.shields.io/github/license/MemMachine/MemMachine)
8
+
9
+ </div>
10
+
11
+ ## Growing Community
12
+
13
+ MemMachine is a growing community of builders and developers. Please help us grow by clicking the *Star* button above.
14
+
15
+ <img src="https://starchart.cc/MemMachine/MemMachine.svg?variant=light" alt="Alt text" height="300"/>
16
+
17
+ ## Universal memory layer for AI Agents
18
+
19
+ Meet MemMachine, an open-source memory layer for advanced AI agents. It enables
20
+ AI-powered applications to learn, store, and recall data and preferences from
21
+ past sessions to enrich future interactions. MemMachine's memory layer persists
22
+ across multiple sessions, agents, and large language models, building a
23
+ sophisticated, evolving user profile. It transforms AI chatbots into
24
+ personalized, context-aware AI assistants designed to understand and respond
25
+ with better precision and depth.
26
+
27
+ ## Who Is MemMachine For?
28
+
29
+ - Developers building AI agents, assistants, or autonomous workflows.
30
+ - Researchers experimenting with agent architectures and cognitive models.
31
+
32
+ ## Key Features
33
+
34
+ - **Multiple Memory Types:** MemMachine supports Working (Short Term),
35
+ Persistent (Long Term), and Personalized (Profile) memory types.
36
+ - **Developer Friendly APIs:** Python SDK, RESTful, and MCP interfaces and
37
+ endpoints to make integrating MemMachine easy into your Agents. For more
38
+ information, refer to the
39
+ [API Reference Guide](https://docs.memmachine.ai/api_reference).
40
+
41
+ ## Architecture
42
+
43
+ 1. Agents Interact via the API Layer
44
+ Users interact with an agent, which connects to the MemMachine Memory core through a RESTful API, Python SDK, or MCP Server.
45
+ 2. MemMachine Manages Memory
46
+ MemMachine processes interactions and stores them in two distinct types: Episodic Memory for conversational context and Profile Memory for long-term user facts.
47
+ 3. Data is Persisted to Databases
48
+ Memory is persisted to a database layer where Episodic Memory is stored in a graph database and Profile Memory is stored in an SQL database.
49
+
50
+ <div align="center">
51
+
52
+ ![MemMachine Architecture](https://raw.githubusercontent.com/MemMachine/MemMachine/main/assets/img/MemMachine_Architecture.png)
53
+
54
+ </div>
55
+
56
+ ## Use Cases & Example Agents
57
+
58
+ MemMachine's versatile memory architecture can be applied across any domain,
59
+ transforming generic bots into specialized, expert assistants. Our growing list
60
+ of [examples](examples/README.md) showcases the endless possibilities of
61
+ memory-powered agents that integrate into your own applications and solutions.
62
+
63
+ - **CRM Agent:** Your agent can recall a client's entire history and deal stage,
64
+ proactively helping your sales team build relationships and close deals
65
+ faster.
66
+ - **Healthcare Navigator:** Offer continuous patient support with an agent that
67
+ remembers medical history and tracks treatment progress to provide a
68
+ seamless healthcare journey.
69
+ - **Personal Finance Advisor:** Your agent will remember a user's portfolio and
70
+ risk tolerance, delivering personalized financial insights based on their
71
+ complete history.
72
+ - **Content Writer:** Build an assistant that remembers your unique style guide
73
+ and terminology, ensuring perfect consistency across all documentation.
74
+
75
+ We're excited to see what you're working on. Join the
76
+ [Discord Server](https://discord.gg/usydANvKqD) and drop a shout-out to your
77
+ project in the **showcase** channel.
78
+
79
+ ## Quick Start
80
+
81
+ Want to get started right away? Check out our
82
+ [Quick Start Guide](https://docs.memmachine.ai).
83
+
84
+ ## Installation
85
+
86
+ MemMachine is distributed as a Docker container and Python package. For full
87
+ installation options, visit the [documentation](https://docs.memmachine.ai).
88
+
89
+ ## Basic Usage
90
+
91
+ Get started with a simple "Hello World" example by following the
92
+ [Quick Start Guide](https://docs.memmachine.ai/getting_started/quickstart).
93
+
94
+ ## Documentation
95
+
96
+ - [Main Website](https://memmachine.ai)
97
+ - [Docs & API Reference](https://docs.memmachine.ai)
98
+
99
+ ## Community & Support
100
+
101
+ - **Discord:** Join our Docker community for support, updates, and discussions:
102
+ [https://discord.gg/usydANvKqD](https://discord.gg/usydANvKqD)
103
+ - **Issues & Feature Requests:** Use GitHub
104
+ [Issues](https://github.com/MemMachine/MemMachine/issues).
105
+
106
+ ## Contributing
107
+
108
+ We welcome contributions! Please see our [CONTRIBUTING.md](CONTRIBUTING.md) for
109
+ guidelines.
110
+
111
+ ## License
112
+
113
+ MemMachine is released under the [Apache 2.0 License](LICENSE).
@@ -0,0 +1,98 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68.0", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "memmachine-server"
7
+ version = "v0.2.0"
8
+ dependencies = [
9
+ "alembic>=1.17.1",
10
+ "asyncpg>=0.31.0",
11
+ "aiosqlite>=0.20.0",
12
+ "boto3>=1.40.40",
13
+ "boto3-stubs==1.40.64",
14
+ "dotenv>=0.9.9",
15
+ "fastapi>=0.116.1",
16
+ "fastmcp>=2.12.0",
17
+ "instructor[bedrock]>=1.12.0",
18
+ "langchain-aws>=0.2.33",
19
+ "neo4j>=5.28.2",
20
+ "nltk>=3.9.1",
21
+ "openai>=1.104.2",
22
+ "pgvector>=0.4.1",
23
+ "prometheus-client>=0.22.1",
24
+ "pydantic>=2.11.7",
25
+ "pyyaml>=6.0.2",
26
+ "rank-bm25>=0.2.2",
27
+ "sqlalchemy>=2.0.43",
28
+ "uvicorn>=0.35.0",
29
+ "greenlet>=3.2.4",
30
+ "tzdata>=2024.1 ; sys_platform == 'win32'",
31
+ "psutil>=7.1.0",
32
+ ]
33
+ requires-python = ">= 3.12"
34
+ authors = [
35
+ {name="MemMachine", email="noreply@memmachine.ai"},
36
+ ]
37
+ description = "MemMachine Server - The complete MemMachine memory system server with episodic and profile memory"
38
+ readme = "README.md"
39
+ keywords = ["memmachine", "server", "memory", "ai", "agent"]
40
+ classifiers = [
41
+ "Programming Language :: Python :: 3",
42
+ "Operating System :: OS Independent",
43
+ ]
44
+ license = "Apache-2.0"
45
+
46
+ [project.optional-dependencies]
47
+ gpu = [
48
+ "sentence-transformers>=5.1.0",
49
+ ]
50
+
51
+ [project.scripts]
52
+ memmachine-server = "memmachine.server.app:main"
53
+ memmachine-nltk-setup = "memmachine:setup_nltk"
54
+ memmachine-mcp-stdio = "memmachine.server.mcp_stdio:main"
55
+ memmachine-mcp-http = "memmachine.server.mcp_http:main"
56
+ memmachine-configure = "memmachine.installation.memmachine_configure:main"
57
+
58
+ [project.urls]
59
+ Homepage = "https://github.com/MemMachine/MemMachine"
60
+ Issues = "https://github.com/MemMachine/MemMachine/issues"
61
+
62
+ [tool.setuptools]
63
+ packages = [
64
+ "memmachine",
65
+ "memmachine.common",
66
+ "memmachine.common.api",
67
+ "memmachine.common.configuration",
68
+ "memmachine.common.embedder",
69
+ "memmachine.common.episode_store",
70
+ "memmachine.common.filter",
71
+ "memmachine.common.language_model",
72
+ "memmachine.common.metrics_factory",
73
+ "memmachine.common.reranker",
74
+ "memmachine.common.resource_manager",
75
+ "memmachine.common.session_manager",
76
+ "memmachine.common.vector_graph_store",
77
+ "memmachine.episodic_memory",
78
+ "memmachine.episodic_memory.declarative_memory",
79
+ "memmachine.episodic_memory.long_term_memory",
80
+ "memmachine.episodic_memory.short_term_memory",
81
+ "memmachine.installation",
82
+ "memmachine.rest_client",
83
+ "memmachine.server",
84
+ "memmachine.main",
85
+ "memmachine.server.prompt",
86
+ "memmachine.server.api_v2",
87
+ "memmachine.semantic_memory",
88
+ "memmachine.semantic_memory.util",
89
+ "memmachine.semantic_memory.storage",
90
+ "memmachine.semantic_memory.storage.alembic_pg",
91
+ "memmachine.semantic_memory.storage.alembic_pg.versions",
92
+ ]
93
+
94
+ [tool.setuptools.package-data]
95
+ "*" = ["*.md", "*.txt", "*.yml", "*.yaml", "*.sql"]
96
+
97
+ [tool.setuptools.package-dir]
98
+ "" = "src"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,40 @@
1
+ """Public package exports and utilities for MemMachine."""
2
+
3
+ from memmachine.rest_client import MemMachineClient, Memory, Project
4
+
5
+ try:
6
+ from memmachine.main.memmachine import MemMachine
7
+ except ImportError:
8
+ # MemMachine is not available in client-only installations
9
+ MemMachine = None # type: ignore
10
+
11
+
12
+ def setup_nltk() -> None:
13
+ """Check for and download required NLTK data packages."""
14
+ import logging
15
+
16
+ import nltk
17
+
18
+ logger = logging.getLogger(__name__)
19
+
20
+ logger.info("Checking for required NLTK data...")
21
+ packages = [
22
+ ("tokenizers/punkt", "punkt"),
23
+ ("tokenizers/punkt_tab", "punkt_tab"),
24
+ ("corpora/stopwords", "stopwords"),
25
+ ]
26
+ for path, pkg_id in packages:
27
+ try:
28
+ nltk.data.find(path)
29
+ logger.info("NLTK package '%s' is already installed.", pkg_id)
30
+ except LookupError:
31
+ logger.warning("NLTK package '%s' not found. Downloading...", pkg_id)
32
+ nltk.download(pkg_id)
33
+ logger.info("NLTK data setup is complete.")
34
+
35
+
36
+ # Only export MemMachine if it's available
37
+ if MemMachine is not None:
38
+ __all__ = ["MemMachine", "MemMachineClient", "Memory", "Project", "setup_nltk"]
39
+ else:
40
+ __all__ = ["MemMachineClient", "Memory", "Project", "setup_nltk"]
@@ -0,0 +1 @@
1
+ """Common utilities and shared abstractions for MemMachine."""
@@ -0,0 +1 @@
1
+ """Shared API definitions for MemMachine client and server."""