aegis-memory 1.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 (27) hide show
  1. aegis_memory-1.2.0/.gitignore +151 -0
  2. aegis_memory-1.2.0/LICENSE +190 -0
  3. aegis_memory-1.2.0/PKG-INFO +303 -0
  4. aegis_memory-1.2.0/README.md +238 -0
  5. aegis_memory-1.2.0/aegis_memory/__init__.py +47 -0
  6. aegis_memory-1.2.0/aegis_memory/cli/__init__.py +9 -0
  7. aegis_memory-1.2.0/aegis_memory/cli/commands/__init__.py +29 -0
  8. aegis_memory-1.2.0/aegis_memory/cli/commands/config.py +208 -0
  9. aegis_memory-1.2.0/aegis_memory/cli/commands/export_import.py +205 -0
  10. aegis_memory-1.2.0/aegis_memory/cli/commands/features.py +334 -0
  11. aegis_memory-1.2.0/aegis_memory/cli/commands/memory.py +353 -0
  12. aegis_memory-1.2.0/aegis_memory/cli/commands/playbook.py +132 -0
  13. aegis_memory-1.2.0/aegis_memory/cli/commands/progress.py +304 -0
  14. aegis_memory-1.2.0/aegis_memory/cli/commands/stats.py +164 -0
  15. aegis_memory-1.2.0/aegis_memory/cli/commands/status.py +110 -0
  16. aegis_memory-1.2.0/aegis_memory/cli/commands/vote.py +76 -0
  17. aegis_memory-1.2.0/aegis_memory/cli/main.py +84 -0
  18. aegis_memory-1.2.0/aegis_memory/cli/utils/__init__.py +43 -0
  19. aegis_memory-1.2.0/aegis_memory/cli/utils/auth.py +108 -0
  20. aegis_memory-1.2.0/aegis_memory/cli/utils/config.py +159 -0
  21. aegis_memory-1.2.0/aegis_memory/cli/utils/errors.py +166 -0
  22. aegis_memory-1.2.0/aegis_memory/cli/utils/output.py +205 -0
  23. aegis_memory-1.2.0/aegis_memory/client.py +1116 -0
  24. aegis_memory-1.2.0/aegis_memory/integrations/__init__.py +22 -0
  25. aegis_memory-1.2.0/aegis_memory/integrations/crewai.py +318 -0
  26. aegis_memory-1.2.0/aegis_memory/integrations/langchain.py +268 -0
  27. aegis_memory-1.2.0/pyproject.toml +123 -0
@@ -0,0 +1,151 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # C extensions
7
+ *.so
8
+
9
+ # Distribution / packaging
10
+ .Python
11
+ build/
12
+ develop-eggs/
13
+ dist/
14
+ downloads/
15
+ eggs/
16
+ .eggs/
17
+ lib/
18
+ lib64/
19
+ parts/
20
+ sdist/
21
+ var/
22
+ wheels/
23
+ share/python-wheels/
24
+ *.egg-info/
25
+ .installed.cfg
26
+ *.egg
27
+ MANIFEST
28
+
29
+ # PyInstaller
30
+ *.manifest
31
+ *.spec
32
+
33
+ # Installer logs
34
+ pip-log.txt
35
+ pip-delete-this-directory.txt
36
+
37
+ # Unit test / coverage reports
38
+ htmlcov/
39
+ .tox/
40
+ .nox/
41
+ .coverage
42
+ .coverage.*
43
+ .cache
44
+ nosetests.xml
45
+ coverage.xml
46
+ *.cover
47
+ *.py,cover
48
+ .hypothesis/
49
+ .pytest_cache/
50
+ pytest_debug.log
51
+
52
+ # Translations
53
+ *.mo
54
+ *.pot
55
+
56
+ # Sphinx documentation
57
+ docs/_build/
58
+
59
+ # Jupyter Notebook
60
+ .ipynb_checkpoints
61
+
62
+ # IPython
63
+ profile_default/
64
+ ipython_config.py
65
+
66
+ # pyenv
67
+ .python-version
68
+
69
+ # Environments
70
+ .env
71
+ .env.*
72
+ !.env.example
73
+ .venv
74
+ env/
75
+ venv/
76
+ ENV/
77
+ env.bak/
78
+ venv.bak/
79
+
80
+ # Spyder project settings
81
+ .spyderproject
82
+ .spyproject
83
+
84
+ # Rope project settings
85
+ .ropeproject
86
+
87
+ # mkdocs documentation
88
+ /site
89
+
90
+ # mypy
91
+ .mypy_cache/
92
+ .dmypy.json
93
+ dmypy.json
94
+
95
+ # Pyre type checker
96
+ .pyre/
97
+
98
+ # pytype static type analyzer
99
+ .pytype/
100
+
101
+ # Cython debug symbols
102
+ cython_debug/
103
+
104
+ # IDE
105
+ .idea/
106
+ .vscode/
107
+ *.swp
108
+ *.swo
109
+ *~
110
+ .project
111
+ .settings/
112
+ *.sublime-workspace
113
+ *.sublime-project
114
+
115
+ # OS
116
+ .DS_Store
117
+ .DS_Store?
118
+ ._*
119
+ .Spotlight-V100
120
+ .Trashes
121
+ ehthumbs.db
122
+ Thumbs.db
123
+
124
+ # Docker
125
+ *.log
126
+ docker-compose.override.yml
127
+
128
+ # Local database data (if running locally)
129
+ postgres_data/
130
+ redis_data/
131
+
132
+ # Secrets and credentials
133
+ *.pem
134
+ *.key
135
+ secrets/
136
+ .secrets/
137
+
138
+ # Temporary files
139
+ tmp/
140
+ temp/
141
+ *.tmp
142
+ *.temp
143
+
144
+ # Editor backup files
145
+ *~
146
+ \#*\#
147
+ .\#*
148
+
149
+ # Ruff
150
+ .ruff_cache/
151
+
@@ -0,0 +1,190 @@
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 the 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
+ Copyright 2024 Quantify Labs Ltd
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
@@ -0,0 +1,303 @@
1
+ Metadata-Version: 2.4
2
+ Name: aegis-memory
3
+ Version: 1.2.0
4
+ Summary: Agent-native memory fabric for AI agents. Scoped, multi-agent, self-hosted.
5
+ Project-URL: Homepage, https://github.com/quantifylabs/aegis-memory
6
+ Project-URL: Documentation, https://github.com/quantifylabs/aegis-memory/tree/main/docs
7
+ Project-URL: Repository, https://github.com/quantifylabs/aegis-memory
8
+ Project-URL: Issues, https://github.com/quantifylabs/aegis-memory/issues
9
+ Project-URL: Changelog, https://github.com/quantifylabs/aegis-memory/blob/main/CHANGELOG.md
10
+ Author-email: Quantify Labs <arulnidhi@quantifylabs.ai>
11
+ License-Expression: Apache-2.0
12
+ License-File: LICENSE
13
+ Keywords: agents,ai,context-engineering,crewai,langchain,langgraph,llm,memory,multi-agent,pgvector,vector-database
14
+ Classifier: Development Status :: 4 - Beta
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python :: 3
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
23
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
24
+ Requires-Python: >=3.10
25
+ Requires-Dist: httpx>=0.25.0
26
+ Requires-Dist: pyyaml>=6.0
27
+ Requires-Dist: rich>=13.0.0
28
+ Requires-Dist: typer[all]>=0.9.0
29
+ Provides-Extra: all
30
+ Requires-Dist: asyncpg>=0.29.0; extra == 'all'
31
+ Requires-Dist: crewai>=0.30.0; extra == 'all'
32
+ Requires-Dist: fastapi>=0.111.0; extra == 'all'
33
+ Requires-Dist: httpx>=0.25.0; extra == 'all'
34
+ Requires-Dist: langchain-core>=0.2.0; extra == 'all'
35
+ Requires-Dist: langchain>=0.2.0; extra == 'all'
36
+ Requires-Dist: mypy>=1.10.0; extra == 'all'
37
+ Requires-Dist: openai>=1.35.0; extra == 'all'
38
+ Requires-Dist: pgvector>=0.2.4; extra == 'all'
39
+ Requires-Dist: pydantic>=2.7.0; extra == 'all'
40
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'all'
41
+ Requires-Dist: pytest>=8.0.0; extra == 'all'
42
+ Requires-Dist: ruff>=0.4.0; extra == 'all'
43
+ Requires-Dist: sqlalchemy[asyncio]>=2.0.25; extra == 'all'
44
+ Requires-Dist: uvicorn[standard]>=0.30.0; extra == 'all'
45
+ Provides-Extra: crewai
46
+ Requires-Dist: crewai>=0.30.0; extra == 'crewai'
47
+ Provides-Extra: dev
48
+ Requires-Dist: httpx>=0.25.0; extra == 'dev'
49
+ Requires-Dist: mypy>=1.10.0; extra == 'dev'
50
+ Requires-Dist: pytest-asyncio>=0.23.0; extra == 'dev'
51
+ Requires-Dist: pytest>=8.0.0; extra == 'dev'
52
+ Requires-Dist: ruff>=0.4.0; extra == 'dev'
53
+ Provides-Extra: langchain
54
+ Requires-Dist: langchain-core>=0.2.0; extra == 'langchain'
55
+ Requires-Dist: langchain>=0.2.0; extra == 'langchain'
56
+ Provides-Extra: server
57
+ Requires-Dist: asyncpg>=0.29.0; extra == 'server'
58
+ Requires-Dist: fastapi>=0.111.0; extra == 'server'
59
+ Requires-Dist: openai>=1.35.0; extra == 'server'
60
+ Requires-Dist: pgvector>=0.2.4; extra == 'server'
61
+ Requires-Dist: pydantic>=2.7.0; extra == 'server'
62
+ Requires-Dist: sqlalchemy[asyncio]>=2.0.25; extra == 'server'
63
+ Requires-Dist: uvicorn[standard]>=0.30.0; extra == 'server'
64
+ Description-Content-Type: text/markdown
65
+
66
+ # Aegis Memory
67
+
68
+ [![CI](https://github.com/quantifylabs/aegis-memory/actions/workflows/ci.yml/badge.svg)](https://github.com/quantifylabs/aegis-memory/actions)
69
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
70
+ [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)
71
+
72
+ **The memory engine for multi-agent systems.**
73
+
74
+ Aegis Memory is a production-ready, self-hostable memory engine designed to give AI agents a **persistent learning loop**. By combining **semantic search**, **scope-aware access control**, and **ACE (Agentic Context Engineering)**, Aegis allows agents to share state, vote on strategies, and extract actionable reflections from their failures.
75
+
76
+ ## Quick Start
77
+
78
+ ### 1. Start the Server (2 min)
79
+
80
+ ```bash
81
+ git clone https://github.com/quantifylabs/aegis-memory.git
82
+ cd aegis-memory
83
+
84
+ export OPENAI_API_KEY=sk-...
85
+ docker-compose up -d
86
+
87
+ # Verify
88
+ curl http://localhost:8000/health
89
+ ```
90
+
91
+ ### 2. Install the CLI + SDK
92
+
93
+ ```bash
94
+ pip install aegis-memory
95
+ ```
96
+
97
+ ### 3. Configure & Use
98
+
99
+ ```bash
100
+ # First-time setup
101
+ aegis config init
102
+
103
+ # Check connection
104
+ aegis status
105
+
106
+ # Add your first memory
107
+ aegis add "User prefers concise responses" -a assistant -s global
108
+
109
+ # Query memories
110
+ aegis query "user preferences"
111
+
112
+ # View stats
113
+ aegis stats
114
+ ```
115
+
116
+ ## CLI Reference
117
+
118
+ Aegis provides a powerful CLI for all memory operations:
119
+
120
+ ```bash
121
+ # Core Operations
122
+ aegis add "content" # Add a memory
123
+ aegis query "search text" # Semantic search
124
+ aegis get <id> # Get single memory
125
+ aegis delete <id> # Delete memory
126
+ aegis vote <id> helpful # Vote on memory
127
+
128
+ # ACE Patterns
129
+ aegis playbook "error handling" # Query proven strategies
130
+ aegis progress show <session> # View session progress
131
+ aegis features list # Track feature status
132
+
133
+ # Data Management
134
+ aegis export -o backup.jsonl # Export memories
135
+ aegis import backup.jsonl # Import memories
136
+ aegis stats # Namespace statistics
137
+ ```
138
+
139
+ **[→ Full CLI Reference](docs/CLI-REFERENCE.md)**
140
+
141
+ ## Python SDK
142
+
143
+ ```python
144
+ from aegis_memory import AegisClient
145
+
146
+ client = AegisClient(api_key="dev-key", base_url="http://localhost:8000")
147
+
148
+ # Add a memory
149
+ client.add("User prefers concise responses", agent_id="assistant")
150
+
151
+ # Query memories
152
+ memories = client.query("user preferences", agent_id="assistant")
153
+
154
+ # Vote on usefulness (ACE pattern)
155
+ client.vote(memories[0].id, "helpful", voter_agent_id="assistant")
156
+
157
+ # Cross-agent memory sharing
158
+ client.add(
159
+ content="Task: Build login. Steps: 1) Form, 2) Validation, 3) API",
160
+ agent_id="planner",
161
+ scope="agent-shared",
162
+ shared_with_agents=["executor"]
163
+ )
164
+ ```
165
+
166
+ ## Why Aegis Memory?
167
+
168
+ | Challenge | DIY Solution | Aegis Memory |
169
+ |-----------|--------------|--------------|
170
+ | Multi-agent memory sharing | Custom access control | Built-in scopes (private/shared/global) |
171
+ | Long-running agent state | File-based progress tracking | Structured session & feature tracking |
172
+ | Context window limits | Dump everything in prompt | Semantic search + effectiveness scoring |
173
+ | Learning from mistakes | Manual prompt tuning | Memory voting + reflection patterns |
174
+
175
+ **Aegis Memory is not just another vector database.** It's an *active strategy engine* with primitives designed to turn agent execution into persistent organizational intelligence.
176
+
177
+ ## Features
178
+
179
+ ### Core Memory
180
+ - **Semantic Search** — pgvector HNSW index for O(log n) queries at scale
181
+ - **Scope-Aware Access** — `agent-private`, `agent-shared`, `global` with automatic ACL
182
+ - **Multi-Agent Handoffs** — Structured state transfer between agents
183
+ - **Auto-Deduplication** — Hash-based O(1) duplicate detection
184
+
185
+ ### ACE Patterns
186
+ - **Memory Voting** — Track which memories help vs harm task completion
187
+ - **Delta Updates** — Incremental changes that prevent context collapse
188
+ - **Reflections** — Store insights from failures for future reference
189
+ - **Session Progress** — Track work across context windows
190
+ - **Feature Tracking** — Prevent premature task completion
191
+
192
+ ### Production Ready
193
+ - **Self-Hostable** — Docker, Kubernetes, any cloud
194
+ - **Observable** — Prometheus metrics, structured logging
195
+ - **Fast** — 30-80ms queries on 1M+ memories
196
+ - **Safe** — Data export, migrations, no vendor lock-in
197
+
198
+ ## Framework Integrations
199
+
200
+ Drop-in support for popular agent frameworks:
201
+
202
+ ```python
203
+ # LangChain
204
+ from aegis_memory.integrations.langchain import AegisMemory
205
+ chain = ConversationChain(llm=llm, memory=AegisMemory(agent_id="assistant"))
206
+
207
+ # CrewAI
208
+ from aegis_memory.integrations.crewai import AegisCrewMemory
209
+ crew = Crew(agents=[...], memory=AegisCrewMemory())
210
+ ```
211
+
212
+ **[→ Integration Guides](aegis_memory/integrations/)**
213
+
214
+ ## ACE Patterns
215
+
216
+ Aegis implements patterns from recent research on self-improving agents:
217
+
218
+ ### Memory Voting
219
+ ```bash
220
+ # After a memory helped complete a task
221
+ aegis vote <memory-id> helpful -c "Successfully paginated API"
222
+
223
+ # Query only effective strategies
224
+ aegis playbook "API pagination" -e 0.3
225
+ ```
226
+
227
+ ### Session Progress
228
+ ```bash
229
+ # Track work across context windows
230
+ aegis progress create build-dashboard -a coder
231
+ aegis progress update build-dashboard -c auth -i routing
232
+ aegis progress show build-dashboard
233
+ ```
234
+
235
+ **[→ ACE Patterns Guide](docs/ACE-PATTERNS.md)**
236
+
237
+ ## Performance
238
+
239
+ | Operation | Latency | Notes |
240
+ |-----------|---------|-------|
241
+ | Query (1M memories) | 30-80ms | HNSW index |
242
+ | Add single | ~100ms | Includes embedding |
243
+ | Add batch (50) | ~300ms | Batched embedding |
244
+ | Deduplication | <1ms | Hash lookup |
245
+
246
+ ## Documentation
247
+
248
+ - **[Quickstart](QUICKSTART.md)** — Get running in 15 minutes
249
+ - **[ACE Patterns](docs/ACE-PATTERNS.md)** — Self-improving agent patterns
250
+ - **[Operations](docs/OPERATIONS.md)** — Backup, monitoring, upgrades
251
+ - **[Design](docs/DESIGN.md)** — Technical deep-dive
252
+ - **[Recipes](docs/Recipes/)** — 10 production-ready patterns
253
+ - **[API Reference](http://localhost:8000/docs)** — OpenAPI docs (when running)
254
+
255
+ ## Deployment
256
+
257
+ ### Docker Compose
258
+
259
+ ```bash
260
+ docker-compose up -d
261
+ ```
262
+
263
+ ### Kubernetes
264
+
265
+ ```bash
266
+ kubectl apply -f k8s/
267
+ ```
268
+
269
+ ### Configuration
270
+
271
+ | Variable | Default | Description |
272
+ |----------|---------|-------------|
273
+ | `DATABASE_URL` | `postgresql+asyncpg://...` | PostgreSQL connection |
274
+ | `OPENAI_API_KEY` | — | For embeddings |
275
+ | `AEGIS_API_KEY` | `dev-key` | API authentication |
276
+
277
+ **[→ Full Configuration](docs/OPERATIONS.md#configuration)**
278
+
279
+ ## Contributing
280
+
281
+ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
282
+
283
+ ```bash
284
+ # Run tests
285
+ pytest tests/ -v
286
+
287
+ # Run linting
288
+ ruff check server/
289
+ ```
290
+
291
+ ## License
292
+
293
+ Apache 2.0 — Use it however you want. See [LICENSE](LICENSE).
294
+
295
+ ## Links
296
+
297
+ - [GitHub Discussions](https://github.com/quantifylabs/aegis-memory/discussions)
298
+ - [Issue Tracker](https://github.com/quantifylabs/aegis-memory/issues)
299
+ - [Changelog](CHANGELOG.md)
300
+
301
+ ---
302
+
303
+ Built with ❤️ for the agent community