ledgermind 2.7.8__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.
- ledgermind-2.7.8/LICENSE +198 -0
- ledgermind-2.7.8/PKG-INFO +448 -0
- ledgermind-2.7.8/README.md +202 -0
- ledgermind-2.7.8/pyproject.toml +76 -0
- ledgermind-2.7.8/setup.cfg +4 -0
- ledgermind-2.7.8/src/ledgermind/__init__.py +4 -0
- ledgermind-2.7.8/src/ledgermind/core/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/core/api/__init__.py +1 -0
- ledgermind-2.7.8/src/ledgermind/core/api/bridge.py +363 -0
- ledgermind-2.7.8/src/ledgermind/core/api/memory.py +913 -0
- ledgermind-2.7.8/src/ledgermind/core/api/transfer.py +37 -0
- ledgermind-2.7.8/src/ledgermind/core/core/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/core/core/exceptions.py +11 -0
- ledgermind-2.7.8/src/ledgermind/core/core/migration.py +122 -0
- ledgermind-2.7.8/src/ledgermind/core/core/router.py +64 -0
- ledgermind-2.7.8/src/ledgermind/core/core/schemas.py +140 -0
- ledgermind-2.7.8/src/ledgermind/core/core/targets.py +95 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/conflict.py +64 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/decay.py +127 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/distillation.py +80 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/git_indexer.py +132 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/merging.py +103 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/ranking/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/ranking/graph.py +63 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/reflection.py +338 -0
- ledgermind-2.7.8/src/ledgermind/core/reasoning/resolution.py +22 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/audit_git.py +123 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/audit_no.py +40 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/episodic.py +153 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/interfaces.py +89 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/semantic.py +463 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/semantic_store/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/semantic_store/integrity.py +182 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/semantic_store/loader.py +47 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/semantic_store/meta.py +290 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/semantic_store/transactions.py +217 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/semantic_store/transitions.py +61 -0
- ledgermind-2.7.8/src/ledgermind/core/stores/vector.py +344 -0
- ledgermind-2.7.8/src/ledgermind/core/utils/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/core/utils/events.py +27 -0
- ledgermind-2.7.8/src/ledgermind/core/utils/logging.py +38 -0
- ledgermind-2.7.8/src/ledgermind/server/__init__.py +0 -0
- ledgermind-2.7.8/src/ledgermind/server/audit.py +48 -0
- ledgermind-2.7.8/src/ledgermind/server/background.py +147 -0
- ledgermind-2.7.8/src/ledgermind/server/cli.py +167 -0
- ledgermind-2.7.8/src/ledgermind/server/contracts.py +69 -0
- ledgermind-2.7.8/src/ledgermind/server/gateway.py +128 -0
- ledgermind-2.7.8/src/ledgermind/server/server.py +461 -0
- ledgermind-2.7.8/src/ledgermind/server/specification.py +61 -0
- ledgermind-2.7.8/src/ledgermind/server/tools/environment.py +78 -0
- ledgermind-2.7.8/src/ledgermind.egg-info/PKG-INFO +448 -0
- ledgermind-2.7.8/src/ledgermind.egg-info/SOURCES.txt +60 -0
- ledgermind-2.7.8/src/ledgermind.egg-info/dependency_links.txt +1 -0
- ledgermind-2.7.8/src/ledgermind.egg-info/entry_points.txt +3 -0
- ledgermind-2.7.8/src/ledgermind.egg-info/requires.txt +30 -0
- ledgermind-2.7.8/src/ledgermind.egg-info/top_level.txt +1 -0
- ledgermind-2.7.8/tests/test_verify_autonomous_heartbeat.py +53 -0
- ledgermind-2.7.8/tests/test_verify_deep_integrity.py +62 -0
- ledgermind-2.7.8/tests/test_verify_grounded_ranking.py +48 -0
- ledgermind-2.7.8/tests/test_verify_tools_and_audit.py +78 -0
ledgermind-2.7.8/LICENSE
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
📜 LICENSE
|
|
2
|
+
|
|
3
|
+
Non-Commercial Source Available License (NCSA)
|
|
4
|
+
|
|
5
|
+
Copyright (c) 2026
|
|
6
|
+
Stanislav Zotov
|
|
7
|
+
All rights reserved.
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
1. Definitions
|
|
13
|
+
|
|
14
|
+
For the purposes of this License:
|
|
15
|
+
|
|
16
|
+
1.1 “Software”
|
|
17
|
+
|
|
18
|
+
Means all source code, documentation, configuration files, scripts, schemas, models, and any other materials contained in this repository, including any updates, modifications, or derivative works thereof.
|
|
19
|
+
|
|
20
|
+
1.2 “Author”
|
|
21
|
+
|
|
22
|
+
Means Stanislav Zotov, the sole copyright holder of the Software.
|
|
23
|
+
|
|
24
|
+
1.3 “You”
|
|
25
|
+
|
|
26
|
+
Means any natural person or legal entity that accesses, uses, copies, modifies, or otherwise interacts with the Software.
|
|
27
|
+
|
|
28
|
+
1.4 “Commercial Entity”
|
|
29
|
+
|
|
30
|
+
Means any organization, legal entity, or individual entrepreneur (including sole proprietors / individual entrepreneurs) whose activity is directly or indirectly aimed at economic gain, regardless of whether profit is actually achieved.
|
|
31
|
+
|
|
32
|
+
Lack of profit, losses, or ineffective management does not change the commercial nature of an entity.
|
|
33
|
+
|
|
34
|
+
1.5 “Commercial Use”
|
|
35
|
+
|
|
36
|
+
Means any use of the Software that directly or indirectly participates in, supports, enables, or is part of an activity intended to generate revenue, profit, or economic advantage, whether monetary or non-monetary.
|
|
37
|
+
|
|
38
|
+
Commercial Use includes, but is not limited to:
|
|
39
|
+
|
|
40
|
+
use in products or services offered for sale or subscription;
|
|
41
|
+
|
|
42
|
+
use in internal tools, infrastructure, automation, analytics, or decision-making systems of a Commercial Entity;
|
|
43
|
+
|
|
44
|
+
use in SaaS, PaaS, hosted, cloud, or managed services;
|
|
45
|
+
|
|
46
|
+
use in research, development, or prototyping intended for present or future commercial application;
|
|
47
|
+
|
|
48
|
+
use that reduces costs, increases efficiency, or provides competitive advantage to a Commercial Entity;
|
|
49
|
+
|
|
50
|
+
use by individual entrepreneurs or self-employed persons.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
1.6 “Non-Commercial Use”
|
|
54
|
+
|
|
55
|
+
Means use solely for personal, educational, academic, or experimental purposes, including:
|
|
56
|
+
|
|
57
|
+
personal pet-projects;
|
|
58
|
+
|
|
59
|
+
learning, studying, or experimenting with the Software;
|
|
60
|
+
|
|
61
|
+
academic research;
|
|
62
|
+
|
|
63
|
+
non-commercial demonstrations.
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
Non-Commercial Use must not be connected to any Commercial Entity or commercial intent.
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
2. Grant of Rights (Non-Commercial Only)
|
|
72
|
+
|
|
73
|
+
Subject to the terms of this License, the Author grants You a limited, non-exclusive, non-transferable, revocable license to:
|
|
74
|
+
|
|
75
|
+
access and study the source code;
|
|
76
|
+
|
|
77
|
+
run the Software;
|
|
78
|
+
|
|
79
|
+
modify the Software;
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
solely for Non-Commercial Use.
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
3. Special Permission for Non-Profit Organizations
|
|
88
|
+
|
|
89
|
+
The following entities are permitted to use the Software without a separate agreement, provided that the use is not connected to any commercial activity:
|
|
90
|
+
|
|
91
|
+
registered non-profit organizations (NPOs);
|
|
92
|
+
|
|
93
|
+
universities and educational institutions;
|
|
94
|
+
|
|
95
|
+
charitable foundations;
|
|
96
|
+
|
|
97
|
+
academic and research institutions.
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
If such an organization participates in or supports commercial activity, directly or indirectly, this permission is void.
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
4. Prohibited Uses
|
|
106
|
+
|
|
107
|
+
Unless explicitly authorized in writing by the Author, You may not:
|
|
108
|
+
|
|
109
|
+
1. Use the Software for any Commercial Use.
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
2. Use the Software within or on behalf of any Commercial Entity.
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
3. Integrate the Software into any commercial product, service, or business process.
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
4. Offer the Software or its derivatives as part of paid or revenue-generating activities.
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
5. Use the Software in internal company workflows, even if the Software itself is not sold.
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
6. Redistribute, publish, mirror, or make available the Software or any modified version thereof.
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
7. Create or publish forks of the Software.
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
8. Attempt to bypass or reinterpret the intent of this License.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
5. Commercial Licensing
|
|
138
|
+
|
|
139
|
+
Any Commercial Use of the Software is strictly prohibited unless You obtain a separate, explicit, written commercial license agreement from the Author.
|
|
140
|
+
|
|
141
|
+
The terms of such agreement are defined exclusively by the Author and may include fees, royalties, usage limits, or other conditions.
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
6. Contributions and Feedback
|
|
147
|
+
|
|
148
|
+
Any feedback, suggestions, or code contributions provided to the Author are considered voluntary.
|
|
149
|
+
|
|
150
|
+
By submitting them, You grant the Author the right to use, modify, incorporate, or discard them without any obligation, compensation, or attribution, unless otherwise agreed in writing.
|
|
151
|
+
|
|
152
|
+
You do not acquire any ownership or license rights by submitting contributions.
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
157
|
+
7. Ownership
|
|
158
|
+
|
|
159
|
+
The Software is licensed, not sold.
|
|
160
|
+
|
|
161
|
+
All rights, title, and interest in the Software, including all intellectual property rights, remain exclusively with the Author.
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
8. Disclaimer of Warranty
|
|
167
|
+
|
|
168
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
9. Limitation of Liability
|
|
174
|
+
|
|
175
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
10. Termination
|
|
181
|
+
|
|
182
|
+
Any violation of this License results in immediate and automatic termination of the granted rights.
|
|
183
|
+
|
|
184
|
+
Upon termination, You must immediately cease all use of the Software and destroy all copies in Your possession.
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
11. Governing Law
|
|
190
|
+
|
|
191
|
+
This License shall be governed by and construed in accordance with the laws of the Republic of Ecuador, without regard to conflict of law principles.
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
12. Final Provisions
|
|
197
|
+
|
|
198
|
+
This License constitutes the entire agreement between You and the Author concerning the Software and supersedes all prior understandings.
|
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ledgermind
|
|
3
|
+
Version: 2.7.8
|
|
4
|
+
Summary: Monolithic Autonomous Agent Memory Management System
|
|
5
|
+
Author-email: Stanislav Zotov <staszotov555@gmail.com>
|
|
6
|
+
License: 📜 LICENSE
|
|
7
|
+
|
|
8
|
+
Non-Commercial Source Available License (NCSA)
|
|
9
|
+
|
|
10
|
+
Copyright (c) 2026
|
|
11
|
+
Stanislav Zotov
|
|
12
|
+
All rights reserved.
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
1. Definitions
|
|
18
|
+
|
|
19
|
+
For the purposes of this License:
|
|
20
|
+
|
|
21
|
+
1.1 “Software”
|
|
22
|
+
|
|
23
|
+
Means all source code, documentation, configuration files, scripts, schemas, models, and any other materials contained in this repository, including any updates, modifications, or derivative works thereof.
|
|
24
|
+
|
|
25
|
+
1.2 “Author”
|
|
26
|
+
|
|
27
|
+
Means Stanislav Zotov, the sole copyright holder of the Software.
|
|
28
|
+
|
|
29
|
+
1.3 “You”
|
|
30
|
+
|
|
31
|
+
Means any natural person or legal entity that accesses, uses, copies, modifies, or otherwise interacts with the Software.
|
|
32
|
+
|
|
33
|
+
1.4 “Commercial Entity”
|
|
34
|
+
|
|
35
|
+
Means any organization, legal entity, or individual entrepreneur (including sole proprietors / individual entrepreneurs) whose activity is directly or indirectly aimed at economic gain, regardless of whether profit is actually achieved.
|
|
36
|
+
|
|
37
|
+
Lack of profit, losses, or ineffective management does not change the commercial nature of an entity.
|
|
38
|
+
|
|
39
|
+
1.5 “Commercial Use”
|
|
40
|
+
|
|
41
|
+
Means any use of the Software that directly or indirectly participates in, supports, enables, or is part of an activity intended to generate revenue, profit, or economic advantage, whether monetary or non-monetary.
|
|
42
|
+
|
|
43
|
+
Commercial Use includes, but is not limited to:
|
|
44
|
+
|
|
45
|
+
use in products or services offered for sale or subscription;
|
|
46
|
+
|
|
47
|
+
use in internal tools, infrastructure, automation, analytics, or decision-making systems of a Commercial Entity;
|
|
48
|
+
|
|
49
|
+
use in SaaS, PaaS, hosted, cloud, or managed services;
|
|
50
|
+
|
|
51
|
+
use in research, development, or prototyping intended for present or future commercial application;
|
|
52
|
+
|
|
53
|
+
use that reduces costs, increases efficiency, or provides competitive advantage to a Commercial Entity;
|
|
54
|
+
|
|
55
|
+
use by individual entrepreneurs or self-employed persons.
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
1.6 “Non-Commercial Use”
|
|
59
|
+
|
|
60
|
+
Means use solely for personal, educational, academic, or experimental purposes, including:
|
|
61
|
+
|
|
62
|
+
personal pet-projects;
|
|
63
|
+
|
|
64
|
+
learning, studying, or experimenting with the Software;
|
|
65
|
+
|
|
66
|
+
academic research;
|
|
67
|
+
|
|
68
|
+
non-commercial demonstrations.
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
Non-Commercial Use must not be connected to any Commercial Entity or commercial intent.
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
2. Grant of Rights (Non-Commercial Only)
|
|
77
|
+
|
|
78
|
+
Subject to the terms of this License, the Author grants You a limited, non-exclusive, non-transferable, revocable license to:
|
|
79
|
+
|
|
80
|
+
access and study the source code;
|
|
81
|
+
|
|
82
|
+
run the Software;
|
|
83
|
+
|
|
84
|
+
modify the Software;
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
solely for Non-Commercial Use.
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
3. Special Permission for Non-Profit Organizations
|
|
93
|
+
|
|
94
|
+
The following entities are permitted to use the Software without a separate agreement, provided that the use is not connected to any commercial activity:
|
|
95
|
+
|
|
96
|
+
registered non-profit organizations (NPOs);
|
|
97
|
+
|
|
98
|
+
universities and educational institutions;
|
|
99
|
+
|
|
100
|
+
charitable foundations;
|
|
101
|
+
|
|
102
|
+
academic and research institutions.
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
If such an organization participates in or supports commercial activity, directly or indirectly, this permission is void.
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
4. Prohibited Uses
|
|
111
|
+
|
|
112
|
+
Unless explicitly authorized in writing by the Author, You may not:
|
|
113
|
+
|
|
114
|
+
1. Use the Software for any Commercial Use.
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
2. Use the Software within or on behalf of any Commercial Entity.
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
3. Integrate the Software into any commercial product, service, or business process.
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
4. Offer the Software or its derivatives as part of paid or revenue-generating activities.
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
5. Use the Software in internal company workflows, even if the Software itself is not sold.
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
6. Redistribute, publish, mirror, or make available the Software or any modified version thereof.
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
7. Create or publish forks of the Software.
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
8. Attempt to bypass or reinterpret the intent of this License.
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
5. Commercial Licensing
|
|
143
|
+
|
|
144
|
+
Any Commercial Use of the Software is strictly prohibited unless You obtain a separate, explicit, written commercial license agreement from the Author.
|
|
145
|
+
|
|
146
|
+
The terms of such agreement are defined exclusively by the Author and may include fees, royalties, usage limits, or other conditions.
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
6. Contributions and Feedback
|
|
152
|
+
|
|
153
|
+
Any feedback, suggestions, or code contributions provided to the Author are considered voluntary.
|
|
154
|
+
|
|
155
|
+
By submitting them, You grant the Author the right to use, modify, incorporate, or discard them without any obligation, compensation, or attribution, unless otherwise agreed in writing.
|
|
156
|
+
|
|
157
|
+
You do not acquire any ownership or license rights by submitting contributions.
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
7. Ownership
|
|
163
|
+
|
|
164
|
+
The Software is licensed, not sold.
|
|
165
|
+
|
|
166
|
+
All rights, title, and interest in the Software, including all intellectual property rights, remain exclusively with the Author.
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
8. Disclaimer of Warranty
|
|
172
|
+
|
|
173
|
+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
9. Limitation of Liability
|
|
179
|
+
|
|
180
|
+
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER LIABILITY ARISING FROM THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
10. Termination
|
|
186
|
+
|
|
187
|
+
Any violation of this License results in immediate and automatic termination of the granted rights.
|
|
188
|
+
|
|
189
|
+
Upon termination, You must immediately cease all use of the Software and destroy all copies in Your possession.
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
11. Governing Law
|
|
195
|
+
|
|
196
|
+
This License shall be governed by and construed in accordance with the laws of the Republic of Ecuador, without regard to conflict of law principles.
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
---
|
|
200
|
+
|
|
201
|
+
12. Final Provisions
|
|
202
|
+
|
|
203
|
+
This License constitutes the entire agreement between You and the Author concerning the Software and supersedes all prior understandings.
|
|
204
|
+
|
|
205
|
+
Project-URL: Homepage, https://github.com/sl4m3/ledgermind
|
|
206
|
+
Project-URL: Repository, https://github.com/sl4m3/ledgermind
|
|
207
|
+
Project-URL: Bug Tracker, https://github.com/sl4m3/ledgermind/issues
|
|
208
|
+
Classifier: Development Status :: 4 - Beta
|
|
209
|
+
Classifier: Intended Audience :: Developers
|
|
210
|
+
Classifier: Programming Language :: Python :: 3
|
|
211
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
212
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
213
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
214
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
215
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
216
|
+
Requires-Python: >=3.10
|
|
217
|
+
Description-Content-Type: text/markdown
|
|
218
|
+
License-File: LICENSE
|
|
219
|
+
Requires-Dist: pydantic<3.0.0,>=2.0.0
|
|
220
|
+
Requires-Dist: pyyaml<7.0.0,>=6.0
|
|
221
|
+
Requires-Dist: sqlalchemy>=2.0.0
|
|
222
|
+
Requires-Dist: nest-asyncio>=1.6.0
|
|
223
|
+
Requires-Dist: numpy>=1.24.0
|
|
224
|
+
Requires-Dist: mcp>=0.1.0
|
|
225
|
+
Requires-Dist: fastmcp>=0.1.0
|
|
226
|
+
Requires-Dist: httpx>=0.25.0
|
|
227
|
+
Requires-Dist: fastapi>=0.100.0
|
|
228
|
+
Requires-Dist: uvicorn>=0.22.0
|
|
229
|
+
Requires-Dist: sse-starlette>=1.6.0
|
|
230
|
+
Requires-Dist: prometheus-client>=0.17.0
|
|
231
|
+
Provides-Extra: vector
|
|
232
|
+
Requires-Dist: annoy>=1.17.0; extra == "vector"
|
|
233
|
+
Requires-Dist: sentence-transformers>=2.2.2; extra == "vector"
|
|
234
|
+
Provides-Extra: gguf
|
|
235
|
+
Requires-Dist: llama-cpp-python>=0.2.0; extra == "gguf"
|
|
236
|
+
Provides-Extra: dev
|
|
237
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
238
|
+
Requires-Dist: pytest-asyncio>=0.20.0; extra == "dev"
|
|
239
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == "dev"
|
|
240
|
+
Requires-Dist: pytest-xdist>=3.0.0; extra == "dev"
|
|
241
|
+
Requires-Dist: hypothesis>=6.0.0; extra == "dev"
|
|
242
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
243
|
+
Provides-Extra: all
|
|
244
|
+
Requires-Dist: ledgermind[gguf,vector]; extra == "all"
|
|
245
|
+
Dynamic: license-file
|
|
246
|
+
|
|
247
|
+
# LedgerMind
|
|
248
|
+
|
|
249
|
+
**v2.7.8** · Autonomous Memory Management System for AI Agents
|
|
250
|
+
|
|
251
|
+
> *LedgerMind is not a memory store — it is a living knowledge core that thinks,
|
|
252
|
+
> heals itself, and evolves without human intervention.*
|
|
253
|
+
|
|
254
|
+
[](LICENSE)
|
|
255
|
+
[](https://python.org)
|
|
256
|
+
[](https://modelcontextprotocol.io)
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## What is LedgerMind?
|
|
261
|
+
|
|
262
|
+
Most AI memory systems are passive stores: you write, you read, and if the
|
|
263
|
+
information becomes stale or contradictory — that is your problem. LedgerMind
|
|
264
|
+
takes a fundamentally different approach.
|
|
265
|
+
|
|
266
|
+
LedgerMind is an **autonomous knowledge lifecycle manager**. It combines a
|
|
267
|
+
hybrid storage engine (SQLite + Git) with a built-in reasoning layer that
|
|
268
|
+
continuously monitors knowledge health, detects conflicts, distills raw
|
|
269
|
+
experience into structured rules, and repairs itself — all in the background,
|
|
270
|
+
without any intervention from the developer or the agent.
|
|
271
|
+
|
|
272
|
+
### Core Capabilities
|
|
273
|
+
|
|
274
|
+
| Capability | Description |
|
|
275
|
+
|---|---|
|
|
276
|
+
| **Autonomous Heartbeat** | A background worker runs every 5 minutes: Git sync, reflection, decay, self-healing. |
|
|
277
|
+
| **Intelligent Conflict Resolution** | Vector similarity analysis automatically supersedes outdated decisions (threshold: 70%). |
|
|
278
|
+
| **Multi-agent Namespacing** | Logical partitioning of memory for multiple agents within a single project. |
|
|
279
|
+
| **4-bit GGUF Integration** | Optimized for Termux/Android using Jina v5 Small in 4-bit quantization via Llama-CPP. |
|
|
280
|
+
| **API-Key Authentication** | Secure your MCP and REST endpoints with `X-API-Key` (env: `LEDGERMIND_API_KEY`). |
|
|
281
|
+
| **Real-time Webhooks** | Subscribe external systems to memory events (decisions, proposals, updates). |
|
|
282
|
+
| **Thread-Safe Transactions** | Thread-local transaction isolation and SQLite WAL mode for high concurrency. |
|
|
283
|
+
| **Autonomy Stress Testing** | Built-in test suite for validating Falsifiability, Noise Immunity, and Deep Truth Resolution. |
|
|
284
|
+
| **Canonical Target Registry** | Auto-normalizes target names and resolves aliases to prevent memory fragmentation. |
|
|
285
|
+
| **Autonomous Reflection** | Proposals with confidence ≥ 0.9 are automatically promoted to active decisions. |
|
|
286
|
+
| **Hybrid Storage** | SQLite for fast queries + Git for cryptographic audit and version history. |
|
|
287
|
+
| **MCP Server** | 15 tools with namespacing and pagination support for any compatible client. |
|
|
288
|
+
| **REST Gateway** | FastAPI endpoints + Server-Sent Events + WebSocket for real-time updates. |
|
|
289
|
+
| **Git Evolution** | Automatically generates "Evolving Pattern" proposals based on code changes (minimum 2 commits). |
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## Architecture at a Glance
|
|
294
|
+
|
|
295
|
+
```mermaid
|
|
296
|
+
graph TD
|
|
297
|
+
subgraph Core ["LedgerMind Core"]
|
|
298
|
+
Bridge["Integration Bridge"]
|
|
299
|
+
Memory["Memory (Main API)"]
|
|
300
|
+
Server["MCP / REST Server"]
|
|
301
|
+
|
|
302
|
+
Bridge --> Memory
|
|
303
|
+
Server <--> Memory
|
|
304
|
+
|
|
305
|
+
subgraph Stores ["Storage Layer"]
|
|
306
|
+
Semantic["Semantic Store (Git + MD)"]
|
|
307
|
+
Episodic["Episodic Store (SQLite)"]
|
|
308
|
+
Vector["Vector Index (NumPy/Jina v5 GGUF)"]
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
Memory --> Semantic
|
|
312
|
+
Memory --> Episodic
|
|
313
|
+
Memory --> Vector
|
|
314
|
+
|
|
315
|
+
subgraph Reasoning ["Reasoning Layer"]
|
|
316
|
+
Conflict["Conflict Engine"]
|
|
317
|
+
Reflection["Reflection Engine"]
|
|
318
|
+
Decay["Decay Engine"]
|
|
319
|
+
Merge["Merge Engine"]
|
|
320
|
+
Distillation["Distillation Engine"]
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
Memory -.-> Reasoning
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
subgraph Background ["Background Process"]
|
|
327
|
+
Worker["Background Worker (Heartbeat)"]
|
|
328
|
+
Worker --- WorkerAction["Health Check | Git Sync | Reflection | Decay"]
|
|
329
|
+
Worker -.-> Webhooks["HTTP Webhooks"]
|
|
330
|
+
end
|
|
331
|
+
|
|
332
|
+
Worker -.-> Memory
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
---
|
|
336
|
+
|
|
337
|
+
## Installation
|
|
338
|
+
|
|
339
|
+
```bash
|
|
340
|
+
# Basic install
|
|
341
|
+
pip install ledgermind
|
|
342
|
+
|
|
343
|
+
# With 4-bit vector search (recommended for CPU/Mobile)
|
|
344
|
+
pkg install clang cmake ninja
|
|
345
|
+
pip install llama-cpp-python
|
|
346
|
+
pip install ledgermind[vector]
|
|
347
|
+
```
|
|
348
|
+
|
|
349
|
+
**Requirements:** Python 3.10+, Git installed and configured in PATH.
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
353
|
+
## Quick Start
|
|
354
|
+
|
|
355
|
+
### Option A: Library (Direct Integration)
|
|
356
|
+
|
|
357
|
+
```python
|
|
358
|
+
from ledgermind.core.api.bridge import IntegrationBridge
|
|
359
|
+
|
|
360
|
+
# Using Jina v5 Small 4-bit GGUF for best accuracy on CPU
|
|
361
|
+
bridge = IntegrationBridge(
|
|
362
|
+
memory_path="./memory",
|
|
363
|
+
vector_model=".ledgermind/models/v5-small-text-matching-Q4_K_M.gguf"
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
# Inject relevant context into your agent's prompt
|
|
367
|
+
context = bridge.memory.search_decisions("database migrations", namespace="prod_agent")
|
|
368
|
+
|
|
369
|
+
# Record a structured decision with namespacing
|
|
370
|
+
bridge.memory.record_decision(
|
|
371
|
+
title="Use Alembic for all database migrations",
|
|
372
|
+
target="database_migrations",
|
|
373
|
+
rationale="Alembic provides version-controlled, reversible migrations.",
|
|
374
|
+
namespace="prod_agent"
|
|
375
|
+
)
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
### Option B: MCP Server (Secure)
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
# Set your API key for security
|
|
382
|
+
export LEDGERMIND_API_KEY="your-secure-key"
|
|
383
|
+
|
|
384
|
+
# Start the MCP server
|
|
385
|
+
ledgermind-mcp run --path ./memory
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
---
|
|
389
|
+
|
|
390
|
+
## Key Workflows
|
|
391
|
+
|
|
392
|
+
### Workflow 1: Multi-agent Namespacing — Isolation Within One Core
|
|
393
|
+
|
|
394
|
+
```python
|
|
395
|
+
# Agent A decision
|
|
396
|
+
memory.record_decision(title="Use PostgreSQL", target="db", namespace="agent_a")
|
|
397
|
+
|
|
398
|
+
# Agent B decision (same target, different namespace)
|
|
399
|
+
memory.record_decision(title="Use MongoDB", target="db", namespace="agent_b")
|
|
400
|
+
|
|
401
|
+
# Search only returns what belongs to the agent
|
|
402
|
+
memory.search_decisions("db", namespace="agent_a") # -> Returns PostgreSQL
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
### Workflow 2: Hybrid Search & Evidence Boost
|
|
406
|
+
|
|
407
|
+
LedgerMind uses Reciprocal Rank Fusion (RRF) to combine Keyword and Vector
|
|
408
|
+
search. Decisions with more "Evidence Links" (episodic events) receive a
|
|
409
|
+
**+20% boost per link** to their final relevance score.
|
|
410
|
+
|
|
411
|
+
---
|
|
412
|
+
|
|
413
|
+
## Documentation
|
|
414
|
+
|
|
415
|
+
| Document | Description |
|
|
416
|
+
|---|---|
|
|
417
|
+
| [API Reference](docs/API_REFERENCE.md) | Complete reference for all public methods |
|
|
418
|
+
| [Integration Guide](docs/INTEGRATION_GUIDE.md) | Library and MCP integration patterns |
|
|
419
|
+
| [MCP Tools Reference](docs/MCP_TOOLS.md) | All 15 MCP tools with namespacing and offset |
|
|
420
|
+
| [Architecture](docs/ARCHITECTURE.md) | Deep dive into internals and design decisions |
|
|
421
|
+
| [Configuration](docs/CONFIGURATION.md) | API keys, Webhooks, and tuning |
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
## Benchmarks (February 24, 2026, v2.7.8)
|
|
426
|
+
|
|
427
|
+
LedgerMind (v2.7.8) is optimized for high-speed operation on **Android/Termux**
|
|
428
|
+
as well as containerized environments. It includes built-in security for MCP and
|
|
429
|
+
REST endpoints.
|
|
430
|
+
|
|
431
|
+
### Retrieval Performance (Jina v5 Small Q4_K_M)
|
|
432
|
+
|
|
433
|
+
| Metric | Mean (v2.7.8) | Note |
|
|
434
|
+
| :--- | :---: | :--- |
|
|
435
|
+
| **Search p95 (ms)** | **24.2 ms** | Hybrid RRF (Vector + Keyword) |
|
|
436
|
+
| **Write p95 (ms)** | **98.4 ms** | Optimized Metadata Indexing |
|
|
437
|
+
| **Memory OPS** | **15.1 ops/s** | Parallelized write throughput |
|
|
438
|
+
|
|
439
|
+
---
|
|
440
|
+
|
|
441
|
+
## License
|
|
442
|
+
|
|
443
|
+
LedgerMind is distributed under the **Non-Commercial Source Available License
|
|
444
|
+
(NCSA)**.
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
*LedgerMind — the foundation of AI autonomy.*
|