memctrl 1.0.0__tar.gz → 1.0.1__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 (46) hide show
  1. memctrl-1.0.1/DISTRIBUTION.md +309 -0
  2. {memctrl-1.0.0 → memctrl-1.0.1}/PKG-INFO +39 -10
  3. memctrl-1.0.1/PYPI_PUBLISH.md +106 -0
  4. {memctrl-1.0.0 → memctrl-1.0.1}/README.md +38 -9
  5. memctrl-1.0.1/RELEASE_NOTES.md +79 -0
  6. {memctrl-1.0.0 → memctrl-1.0.1}/docs/index.html +8 -1
  7. memctrl-1.0.1/docs/memctrl_logo.png +0 -0
  8. memctrl-1.0.1/docs/signature-shot.html +302 -0
  9. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/__init__.py +1 -1
  10. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/cli.py +71 -30
  11. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/extractor.py +54 -40
  12. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/installer.py +1 -0
  13. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/integrations/langgraph.py +15 -4
  14. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/mcp_server.py +70 -41
  15. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/retriever.py +19 -12
  16. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/rules.py +23 -11
  17. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/store.py +43 -30
  18. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/tree.py +49 -22
  19. {memctrl-1.0.0 → memctrl-1.0.1}/pyproject.toml +1 -1
  20. {memctrl-1.0.0 → memctrl-1.0.1}/tests/test_cli.py +13 -2
  21. {memctrl-1.0.0 → memctrl-1.0.1}/tests/test_extractor.py +90 -42
  22. {memctrl-1.0.0 → memctrl-1.0.1}/tests/test_retriever.py +182 -60
  23. {memctrl-1.0.0 → memctrl-1.0.1}/tests/test_rules.py +74 -32
  24. {memctrl-1.0.0 → memctrl-1.0.1}/tests/test_store.py +58 -16
  25. {memctrl-1.0.0 → memctrl-1.0.1}/tests/test_tree.py +134 -34
  26. {memctrl-1.0.0 → memctrl-1.0.1}/.env.example +0 -0
  27. {memctrl-1.0.0 → memctrl-1.0.1}/.github/workflows/ci.yml +0 -0
  28. {memctrl-1.0.0 → memctrl-1.0.1}/.github/workflows/publish.yml +0 -0
  29. {memctrl-1.0.0 → memctrl-1.0.1}/.gitignore +0 -0
  30. {memctrl-1.0.0 → memctrl-1.0.1}/.memoryrc.example +0 -0
  31. {memctrl-1.0.0 → memctrl-1.0.1}/ARTICLE.md +0 -0
  32. {memctrl-1.0.0 → memctrl-1.0.1}/LICENSE +0 -0
  33. {memctrl-1.0.0 → memctrl-1.0.1}/Makefile +0 -0
  34. {memctrl-1.0.0 → memctrl-1.0.1}/benchmarks/__init__.py +0 -0
  35. {memctrl-1.0.0 → memctrl-1.0.1}/benchmarks/retention_benchmark.py +0 -0
  36. {memctrl-1.0.0 → memctrl-1.0.1}/docs/memory-viz.html +0 -0
  37. {memctrl-1.0.0 → memctrl-1.0.1}/examples/__init__.py +0 -0
  38. {memctrl-1.0.0 → memctrl-1.0.1}/examples/coding_agent_demo.py +0 -0
  39. {memctrl-1.0.0 → memctrl-1.0.1}/examples/killer_demo.py +0 -0
  40. {memctrl-1.0.0 → memctrl-1.0.1}/examples/langgraph_integration.py +0 -0
  41. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/templates/SKILL.md +0 -0
  42. {memctrl-1.0.0 → memctrl-1.0.1}/memctrl/templates/__init__.py +0 -0
  43. {memctrl-1.0.0 → memctrl-1.0.1}/requirements.txt +0 -0
  44. {memctrl-1.0.0 → memctrl-1.0.1}/tests/__init__.py +0 -0
  45. {memctrl-1.0.0 → memctrl-1.0.1}/tests/fixtures/sample.memoryrc +0 -0
  46. {memctrl-1.0.0 → memctrl-1.0.1}/tests/fixtures/sample_session.txt +0 -0
@@ -0,0 +1,309 @@
1
+ # MemCtrl Distribution Playbook
2
+
3
+ > Ready-to-use launch materials. Copy, tweak, post.
4
+
5
+ ---
6
+
7
+ ## 1. X/Twitter Thread
8
+
9
+ ```
10
+ Why vector databases are not enough for autonomous agents 🧵
11
+
12
+ 1/ Most agent memory today is "RAG in a trench coat."
13
+
14
+ Chunk text → embed → dump into vector DB → pray retrieval works.
15
+
16
+ That fails for agents that need to:
17
+ • Remember decisions forever
18
+ • Forget yesterday's debug session
19
+ • Show HOW they found an answer
20
+ • Learn from mistakes
21
+
22
+ 2/ Human memory is not cosine similarity.
23
+
24
+ It's layers:
25
+ • Working memory (seconds)
26
+ • Episodic memory (months)
27
+ • Semantic memory (lifetime)
28
+
29
+ And crucially: consolidation.
30
+
31
+ Experiences get compressed into knowledge.
32
+
33
+ 3/ Vector DBs don't consolidate.
34
+
35
+ They don't forget.
36
+ They don't explain.
37
+ They don't evolve.
38
+
39
+ An agent with vector RAG starts every session from scratch.
40
+ It never gets smarter. It just gets more documents.
41
+
42
+ 4/ So I built MemCtrl — a cognitive memory runtime for AI agents.
43
+
44
+ Instead of dumping text into vectors, MemCtrl uses:
45
+ • Hierarchical memory layers (project/session/user)
46
+ • Automatic consolidation (session → project)
47
+ • Tree-based retrieval with reasoning traces
48
+ • Security-first (secrets redacted before storage)
49
+
50
+ 5/ Every retrieval shows its path:
51
+
52
+ Query: "what auth method do we use?"
53
+ Trace: root → project → auth → jwt_refresh_bug
54
+
55
+ You don't just get an answer.
56
+ You get the reasoning path.
57
+
58
+ 6/ The "holy sh*t" moment:
59
+
60
+ Sprint 1: Agent hits JWT bug, fixes it, stores in memory.
61
+ Sprint 3: Same bug almost happens again.
62
+ Agent queries memory → remembers incident → prevents regression.
63
+
64
+ This is not RAG. This is cognition.
65
+
66
+ 7/ MemCtrl integrates with:
67
+ • LangGraph (checkpoint saver + memory node)
68
+ • Claude Code / Cursor / Kimi Code
69
+ • MCP servers
70
+
71
+ pip install memctrl
72
+ memctrl init
73
+ memctrl add "we use FastAPI + PostgreSQL"
74
+
75
+ 8/ We built benchmarks comparing MemCtrl vs naive vector RAG:
76
+
77
+ • Context retention: +47%
78
+ • Explainability: 0% → 100%
79
+ • Memory management: manual → zero ops
80
+
81
+ All local. No cloud. Your data never leaves your machine.
82
+
83
+ 9/ Interactive memory visualizer:
84
+
85
+ Live demo → https://kj-aiml.github.io/memctrl/memory-viz.html
86
+
87
+ See your agent's memory as a graph.
88
+ Watch retrieval traces in real time.
89
+
90
+ 10/ MemCtrl is open source under MIT.
91
+
92
+ We're not building a wrapper.
93
+ We're building the memory operating system for AI agents.
94
+
95
+ → https://github.com/KJ-AIML/memctrl
96
+
97
+ Star + try it. Let me know what you think.
98
+ ```
99
+
100
+ ---
101
+
102
+ ## 2. Hacker News Post
103
+
104
+ **Title:** Show HN: MemCtrl — Cognitive memory runtime for AI agents
105
+
106
+ **Body:**
107
+ ```
108
+ Most agent memory today is RAG in a trench coat: chunk, embed, dump into vector DB, pray.
109
+
110
+ That works for simple Q&A. It fails for agents that need to remember architectural decisions forever, forget yesterday's debugging session automatically, and explain exactly how they found an answer.
111
+
112
+ MemCtrl treats memory as an operating system layer, not a database query.
113
+
114
+ What it does differently:
115
+
116
+ • Hierarchical memory layers (project/session/user) with different lifespans
117
+ • Automatic consolidation — session notes get distilled into permanent project knowledge
118
+ • Tree-based retrieval with reasoning traces — every answer shows its path
119
+ • Security-first — secrets and PII are redacted before storage
120
+ • Local-only by default — SQLite, no cloud, no telemetry
121
+
122
+ Benchmarks vs naive vector RAG:
123
+
124
+ • Context retention (10-turn): 62% → 91%
125
+ • Retrieval explainability: 0% → 100%
126
+ • Memory management overhead: manual → zero ops
127
+
128
+ Integrations: LangGraph (checkpoint saver + memory node), Claude Code, Cursor, Kimi Code, MCP.
129
+
130
+ Live visualizer: https://kj-aiml.github.io/memctrl/memory-viz.html
131
+
132
+ Repo: https://github.com/KJ-AIML/memctrl
133
+
134
+ Would love feedback from anyone building long-running agents.
135
+ ```
136
+
137
+ ---
138
+
139
+ ## 3. Reddit Post
140
+
141
+ **Title:** I got tired of agents forgetting everything — so I built a cognitive memory runtime
142
+
143
+ **Body:**
144
+ ```
145
+ Every AI agent builder knows the pain:
146
+
147
+ You spend hours architecting a system, the agent works great for one session, then next session it's like nothing happened. All context lost. Same bugs repeated. Same questions asked.
148
+
149
+ Vector RAG doesn't solve this. It retrieves similar text. It doesn't *remember*.
150
+
151
+ So I built MemCtrl — a memory operating system for AI agents.
152
+
153
+ Instead of embedding chunks, MemCtrl uses human-like memory layers:
154
+
155
+ • Project memory — permanent (tech stack, ADRs, architectural decisions)
156
+ • Session memory — ephemeral 7 days (daily WIP, debugging)
157
+ • User memory — 90 days (preferences, working style)
158
+
159
+ And automatic consolidation: session notes get distilled into project knowledge at the end of each sprint.
160
+
161
+ Every retrieval includes a reasoning trace. You can see exactly how the agent found its answer:
162
+
163
+ root → project → auth → jwt_refresh_bug → "validate refresh BEFORE access expiry"
164
+
165
+ The killer demo: an agent that prevents the same production bug from happening twice because it actually remembers the incident 6 weeks later.
166
+
167
+ Tech stack: Python 3.10+, SQLite, optional LLM backends (OpenAI, LiteLLM, Ollama).
168
+
169
+ Integrates with LangGraph, Claude Code, Cursor, MCP.
170
+
171
+ Try it:
172
+ pip install memctrl
173
+ memctrl init
174
+ memctrl add "your first memory"
175
+
176
+ Repo + visualizer: https://github.com/KJ-AIML/memctrl
177
+
178
+ Would love to hear from others building persistent agent memory. What's your approach?
179
+ ```
180
+
181
+ **Subreddits:**
182
+ - r/LocalLLaMA
183
+ - r/LangChain
184
+ - r/MachineLearning
185
+ - r/singularity
186
+
187
+ ---
188
+
189
+ ## 4. Release Notes (for GitHub Release)
190
+
191
+ ```markdown
192
+ ## MemCtrl v1.0.0 — Cognitive Memory Runtime for AI Agents
193
+
194
+ ### What's New
195
+
196
+ - **Hierarchical memory layers** — project (forever), session (7 days), user (90 days)
197
+ - **Tree-based retrieval** — LLM reasons over memory structure, not vectors
198
+ - **Reasoning traces** — every answer shows its exact path
199
+ - **Automatic consolidation** — session memories merge into project knowledge
200
+ - **Security-first** — secrets/PII redacted before storage
201
+ - **LangGraph integration** — MemCtrlSaver checkpoint + MemoryNode
202
+ - **MCP server** — stdio transport for IDE integration
203
+ - **Interactive visualizer** — memory graph, timeline, trace viewer
204
+ - **CLI tools** — heatmap, timeline, audit, tree view
205
+ - **Benchmarks** — measurable retention, precision, trace accuracy
206
+
207
+ ### Installation
208
+
209
+ ```bash
210
+ pip install memctrl
211
+ ```
212
+
213
+ ### Quick Start
214
+
215
+ ```bash
216
+ memctrl init
217
+ memctrl add "we use FastAPI + PostgreSQL"
218
+ memctrl query "what is our stack?"
219
+ ```
220
+
221
+ ### Resources
222
+
223
+ - Landing page: https://kj-aiml.github.io/memctrl/
224
+ - Memory visualizer: https://kj-aiml.github.io/memctrl/memory-viz.html
225
+ - Full docs: https://github.com/KJ-AIML/memctrl#readme
226
+
227
+ ### Thanks
228
+
229
+ To everyone who provided feedback and helped shape MemCtrl's direction.
230
+ ```
231
+
232
+ ---
233
+
234
+ ## 5. Email / Newsletter Pitch
235
+
236
+ **Subject:** The missing piece in agent architecture
237
+
238
+ **Body:**
239
+ ```
240
+ Hi [name],
241
+
242
+ Quick question: how does your AI agent remember things across sessions?
243
+
244
+ If the answer is "vector database," you're not alone. But you're also not solving the real problem.
245
+
246
+ Vector DBs retrieve similar text. They don't:
247
+ • Forget automatically
248
+ • Consolidate experience into knowledge
249
+ • Explain how they found an answer
250
+ • Prevent repeated mistakes
251
+
252
+ I built MemCtrl to fix this.
253
+
254
+ It's a cognitive memory runtime for AI agents — hierarchical, explainable, and self-managing.
255
+
256
+ The one-line pitch: MemCtrl gives agents human-like memory layers with automatic consolidation and full reasoning traces.
257
+
258
+ Live demo: https://kj-aiml.github.io/memctrl/memory-viz.html
259
+ Repo: https://github.com/KJ-AIML/memctrl
260
+
261
+ Would love your thoughts.
262
+
263
+ Best,
264
+ [Your name]
265
+ ```
266
+
267
+ ---
268
+
269
+ ## 6. One-Line Pitches
270
+
271
+ **For Twitter bio:**
272
+ > MemCtrl — Cognitive memory runtime for AI agents. Not RAG. Cognition.
273
+
274
+ **For GitHub description:**
275
+ > An operating system for long-lived agent memory — hierarchical, explainable, and self-managing.
276
+
277
+ **For elevator pitch:**
278
+ > MemCtrl replaces vector databases with a human-like memory system for AI agents. Agents remember, forget, consolidate, and explain their reasoning.
279
+
280
+ **For technical audience:**
281
+ > MemCtrl implements hierarchical memory layers with automatic consolidation and tree-based retrieval traces for autonomous agents.
282
+
283
+ ---
284
+
285
+ ## Launch Sequence
286
+
287
+ ```
288
+ Day 0: PyPI publish + GitHub release
289
+ Day 0: Post X thread
290
+ Day 0: Post Reddit threads
291
+ Day 1: Post Hacker News (Tuesday 8am PST is optimal)
292
+ Day 2: Follow up on comments/questions
293
+ Day 3: Post visualizer clip/GIF on X
294
+ Day 7: Publish technical article on Medium/Dev.to
295
+ Week 2: LangGraph integration tutorial
296
+ Week 3: Community examples + case studies
297
+ ```
298
+
299
+ ---
300
+
301
+ ## Assets Needed
302
+
303
+ - [ ] GitHub release created
304
+ - [ ] PyPI package published
305
+ - [ ] X thread posted
306
+ - [ ] HN post submitted
307
+ - [ ] Reddit posts submitted
308
+ - [ ] Visualizer GIF/clip created
309
+ - [ ] Signature screenshot captured
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memctrl
3
- Version: 1.0.0
3
+ Version: 1.0.1
4
4
  Summary: Cognitive Memory Runtime for AI Agents — hierarchical, explainable, and self-managing
5
5
  Author: MemCtrl Contributors
6
6
  License: MIT
@@ -23,22 +23,32 @@ Requires-Dist: litellm>=1.0.0; extra == 'llm'
23
23
  Requires-Dist: openai>=1.0.0; extra == 'llm'
24
24
  Description-Content-Type: text/markdown
25
25
 
26
- # MemCtrl
26
+ <p align="center">
27
+ <img src="docs/memctrl_logo.png" alt="MemCtrl Logo" width="180">
28
+ </p>
27
29
 
28
- > **Cognitive Memory Runtime for AI Agents**
29
- >
30
- > An operating system for long-lived agent memory — hierarchical, explainable, and self-managing.
30
+ <h1 align="center">MemCtrl</h1>
31
+
32
+ <p align="center">
33
+ <strong>Cognitive Memory Runtime for AI Agents</strong><br>
34
+ An operating system for long-lived agent memory — hierarchical, explainable, and self-managing.
35
+ </p>
31
36
 
32
37
  [![CI](https://github.com/KJ-AIML/memctrl/actions/workflows/ci.yml/badge.svg)](https://github.com/KJ-AIML/memctrl/actions/workflows/ci.yml)
33
38
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
34
39
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
35
- [![PyPI](https://img.shields.io/badge/pypi-memctrl-blue.svg)](https://pypi.org/project/memctrl/)
40
+ [![PyPI](https://img.shields.io/pypi/v/memctrl.svg)](https://pypi.org/project/memctrl/)
36
41
  [![Tests](https://img.shields.io/badge/tests-187%2F187%20passing-brightgreen)]()
37
42
 
38
43
  MemCtrl replaces passive vector dumps with an **active memory hierarchy** inspired by human cognition. Agents don't just "retrieve similar text" — they reason over structured memory layers, forget irrelevant details, and consolidate experience into long-term knowledge.
39
44
 
40
45
  ```bash
46
+ # Via pip
41
47
  pip install memctrl
48
+
49
+ # Or via uv (fast, no global install needed)
50
+ uvx memctrl
51
+
42
52
  memctrl init
43
53
  memctrl add "we use FastAPI + PostgreSQL + Redis cache"
44
54
  memctrl query "what is our stack?"
@@ -107,7 +117,14 @@ Rules in `.memoryrc` automatically move, summarize, or expire memories between l
107
117
  ## 🚀 One-Command Quick Start
108
118
 
109
119
  ```bash
120
+ # Option 1: pip
110
121
  pip install memctrl
122
+
123
+ # Option 2: uv — fast, modern Python packaging
124
+ uvx memctrl # run without installing
125
+ # or
126
+ uv tool install memctrl # install permanently
127
+
111
128
  memctrl init # creates .memoryrc in your project
112
129
  memctrl install # registers SKILL.md with your AI assistant
113
130
  ```
@@ -325,10 +342,22 @@ This demo simulates an AI coding agent working across multiple sessions. Watch h
325
342
 
326
343
  ## 📦 Requirements
327
344
 
328
- | Requirement | Minimum |
329
- |---|---|
330
- | Python | 3.10+ |
331
- | SQLite | bundled with Python |
345
+ | Requirement | Minimum | Recommended |
346
+ |---|---|---|
347
+ | Python | 3.10+ | 3.12+ |
348
+ | SQLite | bundled with Python | — |
349
+ | Package manager | pip | [uv](https://github.com/astral-sh/uv) |
350
+
351
+ **Install via pip:**
352
+ ```bash
353
+ pip install memctrl
354
+ ```
355
+
356
+ **Install via uv (faster, no global clutter):**
357
+ ```bash
358
+ uvx memctrl # run once, no install
359
+ uv tool install memctrl # install as a tool
360
+ ```
332
361
 
333
362
  Optional LLM backends (for extraction only):
334
363
 
@@ -0,0 +1,106 @@
1
+ # PyPI Publish Guide — MemCtrl
2
+
3
+ > This package is ready for PyPI. Follow these steps to publish.
4
+
5
+ ---
6
+
7
+ ## Prerequisites
8
+
9
+ - PyPI account: https://pypi.org/account/register/
10
+ - GitHub repo: https://github.com/KJ-AIML/memctrl
11
+
12
+ ---
13
+
14
+ ## Step 1: Verify the Build
15
+
16
+ ```bash
17
+ python -m build
18
+ ```
19
+
20
+ You should see:
21
+ ```
22
+ Successfully built memctrl-1.0.0.tar.gz and memctrl-1.0.0-py3-none-any.whl
23
+ ```
24
+
25
+ ✅ Already verified — builds cleanly.
26
+
27
+ ---
28
+
29
+ ## Step 2: Configure Trusted Publishing on PyPI
30
+
31
+ Trusted Publishing uses OpenID Connect (OIDC) — no API tokens needed.
32
+
33
+ 1. Go to https://pypi.org/manage/account/publishing/
34
+ 2. Click **"Add a new pending publisher"**
35
+ 3. Fill in:
36
+ - **PyPI Project Name**: `memctrl`
37
+ - **Owner**: `KJ-AIML`
38
+ - **Repository name**: `memctrl`
39
+ - **Workflow name**: `publish.yml`
40
+ - **Environment name**: `pypi`
41
+ 4. Click **"Add"**
42
+
43
+ ---
44
+
45
+ ## Step 3: Publish via GitHub Release
46
+
47
+ 1. Go to https://github.com/KJ-AIML/memctrl/releases
48
+ 2. Click **"Draft a new release"**
49
+ 3. Choose tag: `v1.0.0` (create new tag)
50
+ 4. Release title: `MemCtrl v1.0.0 — Cognitive Memory Runtime`
51
+ 5. Description: copy from `DISTRIBUTION.md` → Release Notes section
52
+ 6. Click **"Publish release"**
53
+
54
+ The GitHub Action `.github/workflows/publish.yml` will auto-trigger and publish to PyPI.
55
+
56
+ ---
57
+
58
+ ## Step 4: Verify
59
+
60
+ Wait 2-3 minutes, then check:
61
+
62
+ ```bash
63
+ pip install memctrl
64
+ memctrl --version
65
+ ```
66
+
67
+ Should output: `MemCtrl v1.0.0`
68
+
69
+ ---
70
+
71
+ ## Step 5: Update README Badge
72
+
73
+ After publish, the PyPI badge in README will auto-update:
74
+
75
+ ```markdown
76
+ [![PyPI](https://img.shields.io/pypi/v/memctrl.svg)](https://pypi.org/project/memctrl/)
77
+ ```
78
+
79
+ Replace the current placeholder badge with this dynamic one.
80
+
81
+ ---
82
+
83
+ ## Troubleshooting
84
+
85
+ ### "Trusted publisher verification failed"
86
+ - Double-check the workflow name is exactly `publish.yml`
87
+ - Ensure the environment name in PyPI matches `pypi` (in the workflow)
88
+
89
+ ### "Project name already taken"
90
+ - Check if `memctrl` exists: https://pypi.org/project/memctrl/
91
+ - If taken, consider `memctrl-ai` or `agent-memory`
92
+ - Update `pyproject.toml` name field
93
+
94
+ ### Build fails
95
+ - Ensure `hatchling` is installed: `pip install hatchling`
96
+ - Ensure version in `memctrl/__init__.py` matches `pyproject.toml`
97
+
98
+ ---
99
+
100
+ ## Post-Publish Checklist
101
+
102
+ - [ ] `pip install memctrl` works on clean machine
103
+ - [ ] `memctrl --version` shows correct version
104
+ - [ ] PyPI page renders README correctly
105
+ - [ ] Badges update on GitHub
106
+ - [ ] Announce on X/Twitter, HN, Reddit
@@ -1,19 +1,29 @@
1
- # MemCtrl
1
+ <p align="center">
2
+ <img src="docs/memctrl_logo.png" alt="MemCtrl Logo" width="180">
3
+ </p>
2
4
 
3
- > **Cognitive Memory Runtime for AI Agents**
4
- >
5
- > An operating system for long-lived agent memory — hierarchical, explainable, and self-managing.
5
+ <h1 align="center">MemCtrl</h1>
6
+
7
+ <p align="center">
8
+ <strong>Cognitive Memory Runtime for AI Agents</strong><br>
9
+ An operating system for long-lived agent memory — hierarchical, explainable, and self-managing.
10
+ </p>
6
11
 
7
12
  [![CI](https://github.com/KJ-AIML/memctrl/actions/workflows/ci.yml/badge.svg)](https://github.com/KJ-AIML/memctrl/actions/workflows/ci.yml)
8
13
  [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
9
14
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
10
- [![PyPI](https://img.shields.io/badge/pypi-memctrl-blue.svg)](https://pypi.org/project/memctrl/)
15
+ [![PyPI](https://img.shields.io/pypi/v/memctrl.svg)](https://pypi.org/project/memctrl/)
11
16
  [![Tests](https://img.shields.io/badge/tests-187%2F187%20passing-brightgreen)]()
12
17
 
13
18
  MemCtrl replaces passive vector dumps with an **active memory hierarchy** inspired by human cognition. Agents don't just "retrieve similar text" — they reason over structured memory layers, forget irrelevant details, and consolidate experience into long-term knowledge.
14
19
 
15
20
  ```bash
21
+ # Via pip
16
22
  pip install memctrl
23
+
24
+ # Or via uv (fast, no global install needed)
25
+ uvx memctrl
26
+
17
27
  memctrl init
18
28
  memctrl add "we use FastAPI + PostgreSQL + Redis cache"
19
29
  memctrl query "what is our stack?"
@@ -82,7 +92,14 @@ Rules in `.memoryrc` automatically move, summarize, or expire memories between l
82
92
  ## 🚀 One-Command Quick Start
83
93
 
84
94
  ```bash
95
+ # Option 1: pip
85
96
  pip install memctrl
97
+
98
+ # Option 2: uv — fast, modern Python packaging
99
+ uvx memctrl # run without installing
100
+ # or
101
+ uv tool install memctrl # install permanently
102
+
86
103
  memctrl init # creates .memoryrc in your project
87
104
  memctrl install # registers SKILL.md with your AI assistant
88
105
  ```
@@ -300,10 +317,22 @@ This demo simulates an AI coding agent working across multiple sessions. Watch h
300
317
 
301
318
  ## 📦 Requirements
302
319
 
303
- | Requirement | Minimum |
304
- |---|---|
305
- | Python | 3.10+ |
306
- | SQLite | bundled with Python |
320
+ | Requirement | Minimum | Recommended |
321
+ |---|---|---|
322
+ | Python | 3.10+ | 3.12+ |
323
+ | SQLite | bundled with Python | — |
324
+ | Package manager | pip | [uv](https://github.com/astral-sh/uv) |
325
+
326
+ **Install via pip:**
327
+ ```bash
328
+ pip install memctrl
329
+ ```
330
+
331
+ **Install via uv (faster, no global clutter):**
332
+ ```bash
333
+ uvx memctrl # run once, no install
334
+ uv tool install memctrl # install as a tool
335
+ ```
307
336
 
308
337
  Optional LLM backends (for extraction only):
309
338
 
@@ -0,0 +1,79 @@
1
+ ## MemCtrl v1.0.0 — Cognitive Memory Runtime for AI Agents
2
+
3
+ ### Overview
4
+
5
+ MemCtrl is an operating system for long-lived agent memory — hierarchical, explainable, and self-managing. It replaces passive vector dumps with human-like memory layers that remember, forget, consolidate, and explain their reasoning.
6
+
7
+ ### What's Included
8
+
9
+ **Core Architecture**
10
+ - **Hierarchical memory layers** — Project (forever), Session (7 days), User (90 days)
11
+ - **Tree-based retrieval** — LLM reasons over memory structure, not vector similarity
12
+ - **Reasoning traces** — Every answer shows its exact path: `root -> project -> auth -> jwt`
13
+ - **Automatic consolidation** — Session memories merge into project knowledge via trigger rules
14
+ - **Security-first** — Secrets, API keys, and PII are redacted before storage
15
+
16
+ **Integrations**
17
+ - **LangGraph** — `MemCtrlSaver` checkpoint saver + `MemoryNode` for agent workflows
18
+ - **MCP** — Stdio transport server for IDE integration
19
+ - **Claude Code / Cursor / Kimi Code / Codex** — SKILL.md registration via `memctrl install`
20
+
21
+ **CLI Commands**
22
+ - `memctrl init` — Create `.memoryrc`
23
+ - `memctrl add` — Store memory with layer, tags, confidence
24
+ - `memctrl query` — Retrieve with reasoning trace
25
+ - `memctrl heatmap` — Visualize memory distribution
26
+ - `memctrl timeline` — Chronological memory events
27
+ - `memctrl tree` — Hierarchical tree view
28
+ - `memctrl trigger-cmd` — Fire automation rules
29
+ - `memctrl audit` — Complete trigger log
30
+
31
+ **Demos & Benchmarks**
32
+ - `examples/coding_agent_demo.py` — Multi-session agent simulation
33
+ - `examples/killer_demo.py` — Bug prevention across sprints (the "holy sh*t" moment)
34
+ - `examples/langgraph_integration.py` — LangGraph usage patterns
35
+ - `benchmarks/retention_benchmark.py` — Measurable retention vs naive baseline
36
+
37
+ **Visualizer**
38
+ - Interactive memory graph: [Live Demo](https://kj-aiml.github.io/memctrl/memory-viz.html)
39
+ - Landing page: [https://kj-aiml.github.io/memctrl/](https://kj-aiml.github.io/memctrl/)
40
+
41
+ ### Installation
42
+
43
+ ```bash
44
+ pip install memctrl
45
+ ```
46
+
47
+ ### Quick Start
48
+
49
+ ```bash
50
+ memctrl init
51
+ memctrl add "we use FastAPI + PostgreSQL" --layer project
52
+ memctrl query "what is our stack?"
53
+ # Trace: root -> project -> tech_stack -> FastAPI + PostgreSQL
54
+ ```
55
+
56
+ ### Benchmarks
57
+
58
+ | Metric | Vector RAG | MemCtrl |
59
+ |---|---|---|
60
+ | Context Retention (10-turn) | 62% | **91%** |
61
+ | Retrieval Explainability | 0% | **100%** |
62
+ | Memory Management Overhead | Manual | **Zero ops** |
63
+ | Long-Horizon Task Success | 45% | **78%** |
64
+
65
+ ### Links
66
+
67
+ - **Repository**: https://github.com/KJ-AIML/memctrl
68
+ - **Landing Page**: https://kj-aiml.github.io/memctrl/
69
+ - **Memory Visualizer**: https://kj-aiml.github.io/memctrl/memory-viz.html
70
+ - **Documentation**: See [README.md](https://github.com/KJ-AIML/memctrl#readme)
71
+ - **Technical Article**: [ARTICLE.md](https://github.com/KJ-AIML/memctrl/blob/master/ARTICLE.md)
72
+
73
+ ### Thanks
74
+
75
+ To everyone who shaped MemCtrl's direction. This is just the beginning.
76
+
77
+ ---
78
+
79
+ **Full Changelog**: https://github.com/KJ-AIML/memctrl/commits/v1.0.0
@@ -380,7 +380,10 @@
380
380
 
381
381
  <nav>
382
382
  <div class="container">
383
- <div class="logo">MemCtrl</div>
383
+ <div style="display: flex; align-items: center; gap: 12px;">
384
+ <img src="memctrl_logo.png" alt="MemCtrl" style="height: 32px; width: 32px; border-radius: 8px;">
385
+ <div class="logo">MemCtrl</div>
386
+ </div>
384
387
  <div class="nav-links">
385
388
  <a href="#features">Features</a>
386
389
  <a href="#architecture">Architecture</a>
@@ -398,9 +401,13 @@
398
401
  <div class="hero-buttons">
399
402
  <a href="https://github.com/KJ-AIML/memctrl" class="btn btn-primary">Get Started</a>
400
403
  <a href="https://pypi.org/project/memctrl/" class="btn btn-secondary">pip install memctrl</a>
404
+ <a href="https://docs.astral.sh/uv/" class="btn btn-secondary" style="border-color: var(--accent-secondary); color: var(--accent-secondary);">uvx memctrl</a>
401
405
  </div>
402
406
 
403
407
  <div class="code-block">
408
+ <span class="comment"># Install via pip or uv</span><br>
409
+ <span class="prompt">$</span> pip install memctrl<br>
410
+ <span class="comment"># or: uvx memctrl (no install needed)</span><br><br>
404
411
  <span class="prompt">$</span> memctrl init<br>
405
412
  <span class="comment"># Created .memoryrc</span><br><br>
406
413
  <span class="prompt">$</span> memctrl add <span class="string">"we use FastAPI + PostgreSQL"</span> --layer project<br>
Binary file