memorix 1.0.6 → 1.0.8
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.
- package/CHANGELOG.md +362 -245
- package/README.md +469 -410
- package/README.zh-CN.md +468 -409
- package/TEAM.md +106 -0
- package/dist/cli/index.js +58011 -46132
- package/dist/cli/index.js.map +1 -1
- package/dist/dashboard/static/app.js +977 -205
- package/dist/dashboard/static/index.html +11 -4
- package/dist/dashboard/static/style.css +46 -0
- package/dist/index.js +7116 -2696
- package/dist/index.js.map +1 -1
- package/dist/sdk.d.ts +677 -0
- package/dist/sdk.js +18962 -0
- package/dist/sdk.js.map +1 -0
- package/dist/types.d.ts +396 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/docs/AGENT_OPERATOR_PLAYBOOK.md +684 -0
- package/docs/AI_CONTEXT.md +18 -0
- package/docs/API_REFERENCE.md +687 -0
- package/docs/ARCHITECTURE.md +488 -0
- package/docs/CLOUD_SYNC_AND_MULTI_AGENT_RESEARCH.md +470 -0
- package/docs/CONFIGURATION.md +265 -0
- package/docs/DESIGN_DECISIONS.md +358 -0
- package/docs/DEVELOPMENT.md +317 -0
- package/docs/DOCKER.md +138 -0
- package/docs/GIT_MEMORY.md +221 -0
- package/docs/KNOWN_ISSUES_AND_ROADMAP.md +149 -0
- package/docs/MEMORY_FORMATION_PIPELINE.md +224 -0
- package/docs/MODULES.md +383 -0
- package/docs/PERFORMANCE.md +64 -0
- package/docs/README.md +79 -0
- package/docs/SETUP.md +521 -0
- package/docs/hooks-architecture.md +108 -0
- package/package.json +33 -11
package/README.md
CHANGED
|
@@ -1,429 +1,488 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="assets/logo.png" alt="Memorix" width="
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<h1 align="center">Memorix</h1>
|
|
6
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/AVIDS2/memorix/main/assets/readme-logo-bridge.png" alt="Memorix Bridge" width="720">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Memorix</h1>
|
|
6
|
+
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>Open-source cross-agent memory layer for coding agents.</strong><br>
|
|
9
|
-
|
|
10
|
-
</p>
|
|
11
|
-
|
|
12
|
-
<p align="center">
|
|
13
|
-
<a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/v/memorix.svg?style=flat-square&color=cb3837" alt="npm"></a>
|
|
14
|
-
<a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/dm/memorix.svg?style=flat-square&color=blue" alt="downloads"></a>
|
|
15
|
-
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-green.svg?style=flat-square" alt="license"></a>
|
|
16
|
-
<a href="https://github.com/AVIDS2/memorix/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/AVIDS2/memorix/ci.yml?style=flat-square&label=CI" alt="CI"></a>
|
|
17
|
-
<a href="https://github.com/AVIDS2/memorix"><img src="https://img.shields.io/github/stars/AVIDS2/memorix?style=flat-square&color=yellow" alt="stars"></a>
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
<p align="center">
|
|
21
|
-
<strong>Git Memory</strong> | <strong>Reasoning Memory</strong> | <strong>Cross-Agent Recall</strong> | <strong>Control Plane Dashboard</strong>
|
|
9
|
+
Tiered MCP support across Cursor, Claude Code, Codex, Windsurf, Gemini CLI, GitHub Copilot, Kiro, OpenCode, Antigravity, Trae, and other MCP-compatible clients.
|
|
22
10
|
</p>
|
|
23
|
-
|
|
24
|
-
<p align="center">
|
|
25
|
-
<a href="
|
|
26
|
-
<a href="
|
|
27
|
-
<a href="
|
|
28
|
-
<a href="
|
|
29
|
-
<a href="
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
memorix
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
memorix
|
|
126
|
-
memorix
|
|
127
|
-
memorix
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
###
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
```bash
|
|
228
|
-
memorix
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
memorix
|
|
255
|
-
memorix
|
|
256
|
-
memorix
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
```bash
|
|
262
|
-
memorix
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
When multiple HTTP sessions are open at once, each session should bind itself with `memorix_session_start(projectRoot=...)` before using project-scoped memory tools.
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/v/memorix.svg?style=flat-square&color=cb3837" alt="npm"></a>
|
|
14
|
+
<a href="https://www.npmjs.com/package/memorix"><img src="https://img.shields.io/npm/dm/memorix.svg?style=flat-square&color=blue" alt="downloads"></a>
|
|
15
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-green.svg?style=flat-square" alt="license"></a>
|
|
16
|
+
<a href="https://github.com/AVIDS2/memorix/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/AVIDS2/memorix/ci.yml?style=flat-square&label=CI" alt="CI"></a>
|
|
17
|
+
<a href="https://github.com/AVIDS2/memorix"><img src="https://img.shields.io/github/stars/AVIDS2/memorix?style=flat-square&color=yellow" alt="stars"></a>
|
|
18
|
+
</p>
|
|
19
|
+
|
|
20
|
+
<p align="center">
|
|
21
|
+
<strong>Three-Layer Memory</strong> | <strong>Agent Team</strong> | <strong>Workspace Sync</strong> | <strong>Multi-Agent Orchestration</strong> | <strong>Dashboard</strong>
|
|
22
|
+
</p>
|
|
23
|
+
|
|
24
|
+
<p align="center">
|
|
25
|
+
<a href="README.zh-CN.md">Chinese</a> |
|
|
26
|
+
<a href="#quick-start">Quick Start</a> |
|
|
27
|
+
<a href="#docker">Docker</a> |
|
|
28
|
+
<a href="#supported-clients">Supported Clients</a> |
|
|
29
|
+
<a href="#common-workflows">Common Workflows</a> |
|
|
30
|
+
<a href="#documentation">Documentation</a> |
|
|
31
|
+
<a href="docs/SETUP.md">Setup Guide</a>
|
|
32
|
+
</p>
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
> Using Memorix through Cursor, Windsurf, Claude Code, Codex, or another AI coding agent? Read the [Agent Operator Playbook](docs/AGENT_OPERATOR_PLAYBOOK.md) for the agent-facing install, MCP, hook, and troubleshooting rules.
|
|
37
|
+
|
|
38
|
+
## What Is Memorix?
|
|
39
|
+
|
|
40
|
+
**Memorix is a local-first memory control plane for coding agents.**
|
|
41
|
+
|
|
42
|
+
It keeps project memory, reasoning context, Git-derived facts, and optional autonomous-agent state in one place so you can continue work across IDEs, sessions, terminals, and agent runs without losing project truth.
|
|
43
|
+
|
|
44
|
+
For most users, the default path is simple: use the local TUI/CLI or connect one IDE over stdio MCP. Treat HTTP as the shared-control-plane mode you opt into when you specifically want one long-lived background service, shared MCP access, or a live dashboard endpoint.
|
|
45
|
+
|
|
46
|
+
## Why Memorix
|
|
47
|
+
|
|
48
|
+
Most coding agents remember only the current thread. Memorix gives them a shared, persistent memory layer across IDEs, sessions, and projects.
|
|
49
|
+
|
|
50
|
+
<table>
|
|
51
|
+
<tr><td><b>🧠 Three-Layer Memory</b></td><td>Observation (what/how), Reasoning (why/trade-offs), Git Memory (immutable commit-derived facts with noise filtering)</td></tr>
|
|
52
|
+
<tr><td><b>🔍 Source-Aware Retrieval</b></td><td>"What changed" queries favor Git Memory; "why" queries favor reasoning; project-scoped by default, global on demand</td></tr>
|
|
53
|
+
<tr><td><b>⚙️ Memory Quality Pipeline</b></td><td>Formation (LLM-assisted evaluation), dedup, consolidation, retention with exponential decay — memory stays clean, not noisy</td></tr>
|
|
54
|
+
<tr><td><b>🔄 Workspace & Rules Sync</b></td><td>One command to migrate MCP configs, workflows, rules, and skills across Cursor, Windsurf, Claude Code, Codex, Copilot, Kiro, etc.</td></tr>
|
|
55
|
+
<tr><td><b>👥 Agent Team</b></td><td>Opt-in autonomous-agent state: task board with role-based claiming, inter-agent messaging, advisory file locks, situational-awareness poll</td></tr>
|
|
56
|
+
<tr><td><b>🤖 Multi-Agent Orchestration</b></td><td><code>memorix orchestrate</code> runs a structured coordination loop — plan → parallel execution → verify → fix → review — with capability routing and worktree isolation</td></tr>
|
|
57
|
+
<tr><td><b>📋 Session Lifecycle</b></td><td>Session start/end with handoff summaries, watermark tracking (new memories since last session), cross-session context recovery</td></tr>
|
|
58
|
+
<tr><td><b>🎯 Project Skills</b></td><td>Auto-generate SKILL.md from memory patterns; promote observations to permanent mini-skills injected at session start</td></tr>
|
|
59
|
+
<tr><td><b>📊 Dashboard</b></td><td>Local web UI for browsing memories, Git history, sessions, and read-only autonomous agent team state</td></tr>
|
|
60
|
+
<tr><td><b>🔒 Local & Private</b></td><td>SQLite as canonical store, Orama for search, no cloud dependency — everything stays on your machine</td></tr>
|
|
61
|
+
</table>
|
|
62
|
+
|
|
63
|
+
## Supported Clients
|
|
64
|
+
|
|
65
|
+
| Tier | Clients |
|
|
66
|
+
|------|---------|
|
|
67
|
+
| ★ Core | Claude Code, Cursor, Windsurf |
|
|
68
|
+
| ◆ Extended | GitHub Copilot, Kiro, Codex |
|
|
69
|
+
| ○ Community | Gemini CLI, OpenCode, Antigravity, Trae |
|
|
70
|
+
|
|
71
|
+
**Core** = full hook integration + tested MCP + rules sync. **Extended** = hook integration with platform caveats. **Community** = best-effort hooks, community-reported compatibility.
|
|
72
|
+
|
|
73
|
+
If a client can speak MCP and launch a local command or HTTP endpoint, it can usually connect to Memorix even if it is not in the list above yet.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Quick Start
|
|
78
|
+
|
|
79
|
+
Install globally:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm install -g memorix
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Initialize Memorix config:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
memorix init
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
`memorix init` lets you choose between `Global defaults` and `Project config`.
|
|
92
|
+
|
|
93
|
+
Memorix uses two files with two roles:
|
|
94
|
+
|
|
95
|
+
- `memorix.yml` for behavior and project settings
|
|
96
|
+
- `.env` for secrets such as API keys
|
|
97
|
+
|
|
98
|
+
Then pick the path that matches what you want to do:
|
|
99
|
+
|
|
100
|
+
| You want | Run | Best for |
|
|
101
|
+
| --- | --- | --- |
|
|
102
|
+
| Interactive terminal workbench | `memorix` | Default starting point for local search, chat, memory capture, and diagnostics |
|
|
103
|
+
| Quick MCP setup inside one IDE | `memorix serve` | Default MCP path for Cursor, Claude Code, Codex, Windsurf, Gemini CLI, and other stdio clients |
|
|
104
|
+
| Dashboard + shared HTTP MCP in the background | `memorix background start` | A long-lived shared control plane for multiple clients and a live dashboard endpoint |
|
|
105
|
+
| Foreground HTTP mode for debugging or a custom port | `memorix serve-http --port 3211` | Manual supervision, debugging, custom launch control |
|
|
106
|
+
|
|
107
|
+
Most users should choose **one** of the first two options above. Move to HTTP only when you intentionally want one shared background service, multi-client MCP access, or a live dashboard endpoint.
|
|
108
|
+
|
|
109
|
+
Common paths:
|
|
110
|
+
|
|
111
|
+
| Goal | Use | Why |
|
|
112
|
+
| --- | --- | --- |
|
|
113
|
+
| Work directly in the terminal | `memorix` or `memorix <command>` | CLI/TUI is the primary product surface. |
|
|
114
|
+
| Connect an IDE or coding agent over MCP | `memorix serve` first; HTTP + `memorix_session_start` when needed | Start a lightweight memory session without joining Agent Team by default. |
|
|
115
|
+
| Run autonomous multi-agent execution | `memorix orchestrate` | Structured plan → spawn → verify → fix → review loop with CLI agents. |
|
|
116
|
+
| Watch project memory and agent state in the browser | `memorix dashboard` | Standalone read-mostly dashboard for memory, sessions, and autonomous agent team state. |
|
|
117
|
+
|
|
118
|
+
Companion commands: `memorix background status|logs|stop`. For multi-workspace HTTP sessions, bind with `memorix_session_start(projectRoot=...)`.
|
|
119
|
+
|
|
120
|
+
Deeper details on startup, project binding, config precedence, and agent workflows: [docs/SETUP.md](docs/SETUP.md) and the [Agent Operator Playbook](docs/AGENT_OPERATOR_PLAYBOOK.md).
|
|
121
|
+
|
|
122
|
+
### TUI Workbench
|
|
123
|
+
|
|
124
|
+

|
|
125
|
+
|
|
126
|
+
Running `memorix` without arguments opens an interactive fullscreen terminal UI (requires a TTY). Use it for chat with project memory, search, quick memory capture, diagnostics, background service control, dashboard launch, and IDE setup. Press `/help` inside the TUI for the current command list.
|
|
127
|
+
|
|
128
|
+
Single-shot chat (no TUI): `memorix ask "your question"`.
|
|
129
|
+
|
|
130
|
+
### Operator CLI
|
|
131
|
+
|
|
132
|
+
Memorix exposes a **CLI-first operator surface**. Use it when you want to inspect or control the current project directly from a terminal. MCP remains the integration layer for IDEs and agents.
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
memorix session start --agent codex-main --agentType codex
|
|
136
|
+
memorix memory search --query "docker control plane"
|
|
137
|
+
memorix reasoning search --query "why sqlite"
|
|
138
|
+
memorix retention status
|
|
139
|
+
memorix team status
|
|
140
|
+
memorix task list
|
|
141
|
+
memorix audit project
|
|
142
|
+
memorix sync workspace --action scan
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
The CLI is intentionally **task-shaped**, not a 1:1 mirror of MCP tool names. Native capabilities are available through these namespaces: `session`, `memory`, `reasoning`, `retention`, `formation`, `audit`, `transfer`, `skills`, `team`, `task`, `message`, `lock`, `handoff`, `poll`, `sync`, `ingest`. MCP stays available for IDEs, agents, and optional graph-compatibility tools.
|
|
146
|
+
|
|
147
|
+
## Docker
|
|
148
|
+
|
|
149
|
+
Memorix now includes an official Docker path for the **HTTP control plane**.
|
|
150
|
+
|
|
151
|
+
Quick start:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
docker compose up --build -d
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Then connect to:
|
|
158
|
+
|
|
159
|
+
- dashboard: `http://localhost:3211`
|
|
160
|
+
- MCP: `http://localhost:3211/mcp`
|
|
161
|
+
- health: `http://localhost:3211/health`
|
|
162
|
+
|
|
163
|
+
Important: Docker support is for `serve-http`, not `memorix serve`. Project-scoped Git/config behavior only works when the container can see the repositories it is asked to bind.
|
|
164
|
+
|
|
165
|
+
Full Docker guide: [docs/DOCKER.md](docs/DOCKER.md)
|
|
166
|
+
|
|
167
|
+
Add Memorix to your MCP client:
|
|
168
|
+
|
|
169
|
+
### Generic stdio MCP config
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"mcpServers": {
|
|
174
|
+
"memorix": {
|
|
175
|
+
"command": "memorix",
|
|
176
|
+
"args": ["serve"]
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Generic HTTP MCP config
|
|
183
|
+
|
|
184
|
+
```json
|
|
185
|
+
{
|
|
186
|
+
"mcpServers": {
|
|
187
|
+
"memorix": {
|
|
188
|
+
"transport": "http",
|
|
189
|
+
"url": "http://localhost:3211/mcp"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The per-client examples below show the simplest stdio shape. If you prefer the shared HTTP control plane, keep the generic HTTP block above and use the client-specific variants in [docs/SETUP.md](docs/SETUP.md).
|
|
196
|
+
|
|
197
|
+
<details open>
|
|
198
|
+
<summary><strong>Cursor</strong> | <code>.cursor/mcp.json</code></summary>
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"mcpServers": {
|
|
203
|
+
"memorix": {
|
|
204
|
+
"command": "memorix",
|
|
205
|
+
"args": ["serve"]
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
```
|
|
210
|
+
</details>
|
|
211
|
+
|
|
212
|
+
<details>
|
|
213
|
+
<summary><strong>Claude Code</strong></summary>
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
claude mcp add memorix -- memorix serve
|
|
217
|
+
```
|
|
218
|
+
</details>
|
|
219
|
+
|
|
220
|
+
<details>
|
|
221
|
+
<summary><strong>Codex</strong> | <code>~/.codex/config.toml</code></summary>
|
|
222
|
+
|
|
223
|
+
```toml
|
|
224
|
+
[mcp_servers.memorix]
|
|
225
|
+
command = "memorix"
|
|
226
|
+
args = ["serve"]
|
|
227
|
+
```
|
|
228
|
+
</details>
|
|
229
|
+
|
|
230
|
+
For the full IDE matrix, Windows notes, and troubleshooting, see [docs/SETUP.md](docs/SETUP.md).
|
|
231
|
+
|
|
232
|
+
---
|
|
233
|
+
|
|
234
|
+
## Common Workflows
|
|
235
|
+
|
|
236
|
+
| You want to... | Use this | More detail |
|
|
237
|
+
| --- | --- | --- |
|
|
238
|
+
| Save and retrieve project memory | `memorix memory store/search/detail/resolve` or MCP `memorix_store/search/detail/resolve` | [API Reference](docs/API_REFERENCE.md#3-core-memory-tools) |
|
|
239
|
+
| Capture Git truth | `memorix git-hook --force`, `memorix ingest commit`, `memorix ingest log` | [Git Memory Guide](docs/GIT_MEMORY.md) |
|
|
240
|
+
| Run dashboard + HTTP MCP | `memorix background start` | [Setup Guide](docs/SETUP.md), [Docker](docs/DOCKER.md) |
|
|
241
|
+
| Keep memory-only sessions lightweight | `memorix_session_start(projectRoot=...)` or `memorix session start` | [Agent Operator Playbook](docs/AGENT_OPERATOR_PLAYBOOK.md#8-what-an-agent-should-do-at-session-start) |
|
|
242
|
+
| Join the autonomous agent team | `memorix session start --joinTeam` or `memorix team join` | [TEAM.md](TEAM.md), [API Reference](docs/API_REFERENCE.md#9-agent-team-tools) |
|
|
243
|
+
| Run autonomous multi-agent work | `memorix orchestrate --goal "..."` | [API Reference](docs/API_REFERENCE.md) |
|
|
244
|
+
| Sync agent configs/rules | `memorix sync workspace ...`, `memorix sync rules ...` | [Setup Guide](docs/SETUP.md) |
|
|
245
|
+
| Use Memorix from code | `import { createMemoryClient } from 'memorix/sdk'` | [API Reference](docs/API_REFERENCE.md) |
|
|
246
|
+
|
|
247
|
+
The most common loop is deliberately small:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
memorix memory store --text "Auth tokens expire after 24h" --title "Auth token TTL" --entity auth --type decision
|
|
251
|
+
memorix memory search --query "auth token ttl"
|
|
252
|
+
memorix session start --agent codex-main --agentType codex
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
When multiple HTTP sessions are open at once, each session should bind itself with `memorix_session_start(projectRoot=...)` before using project-scoped memory tools.
|
|
256
|
+
|
|
257
|
+
HTTP MCP sessions idle out after 30 minutes by default. If your client does not automatically recover from stale HTTP session IDs, set a longer timeout before starting the control plane:
|
|
258
|
+
|
|
259
|
+
```bash
|
|
260
|
+
MEMORIX_SESSION_TIMEOUT_MS=86400000 memorix background start # 24h
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Agent Team is **not** the normal memory startup path and it is **not** a chat room between IDE windows. Join only when you need tasks, messages, locks, or a structured autonomous-agent workflow. For real multi-agent execution, prefer:
|
|
264
|
+
|
|
265
|
+
```bash
|
|
266
|
+
memorix orchestrate --goal "Add user authentication" --agents claude-code,cursor,codex
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
## Resource Profile
|
|
270
|
+
|
|
271
|
+
Memorix is designed to stay light during normal memory use:
|
|
272
|
+
|
|
273
|
+
- stdio MCP starts on demand and exits with the client
|
|
274
|
+
- HTTP background mode is one local Node process plus SQLite/Orama state
|
|
275
|
+
- LLM enrichment is optional; without API keys, Memorix falls back to local heuristic dedup/search
|
|
276
|
+
- the heavier paths are build/test, Docker image builds, dashboard browsing, large imports, and optional LLM-backed formation
|
|
277
|
+
|
|
278
|
+
On this Windows development machine, the healthy HTTP control plane was observed at about 16 MB working set after several hours idle. Treat that as a local observation, not a cross-platform guarantee. See [Performance and Resource Notes](docs/PERFORMANCE.md) for knobs and trade-offs.
|
|
279
|
+
|
|
280
|
+
## Programmatic SDK
|
|
281
|
+
|
|
282
|
+
Import Memorix directly into your own TypeScript/Node.js project — no MCP or CLI needed:
|
|
283
|
+
|
|
284
|
+
```ts
|
|
285
|
+
import { createMemoryClient } from 'memorix/sdk';
|
|
286
|
+
|
|
287
|
+
const client = await createMemoryClient({ projectRoot: '/path/to/repo' });
|
|
288
|
+
|
|
289
|
+
// Store a memory
|
|
290
|
+
await client.store({
|
|
291
|
+
entityName: 'auth-module',
|
|
292
|
+
type: 'decision',
|
|
293
|
+
title: 'Use JWT for API auth',
|
|
294
|
+
narrative: 'Chose JWT over session cookies for stateless API.',
|
|
295
|
+
});
|
|
296
|
+
|
|
297
|
+
// Search
|
|
298
|
+
const results = await client.search({ query: 'authentication' });
|
|
299
|
+
|
|
300
|
+
// Retrieve, resolve, count
|
|
301
|
+
const obs = await client.get(1);
|
|
302
|
+
const all = await client.getAll();
|
|
303
|
+
await client.resolve([1, 2]);
|
|
304
|
+
|
|
305
|
+
await client.close();
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Three subpath exports:
|
|
309
|
+
|
|
310
|
+
| Import | What you get |
|
|
311
|
+
| --- | --- |
|
|
312
|
+
| `memorix/sdk` | `createMemoryClient`, `createMemorixServer`, `detectProject`, all types |
|
|
313
|
+
| `memorix/types` | Type-only — interfaces, enums, constants |
|
|
314
|
+
| `memorix` | MCP stdio entry point (not for programmatic use) |
|
|
315
|
+
|
|
316
|
+
---
|
|
317
|
+
|
|
271
318
|
## How It Works
|
|
272
319
|
|
|
273
320
|
```mermaid
|
|
274
321
|
flowchart LR
|
|
275
|
-
subgraph
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
322
|
+
subgraph ING["Ingress"]
|
|
323
|
+
A["Git Hooks<br/>commit + ingest"]
|
|
324
|
+
B["MCP Tools<br/>search, store, recall"]
|
|
325
|
+
C["CLI / TUI<br/>operator workflows"]
|
|
326
|
+
D["Dashboard<br/>read-mostly project view"]
|
|
280
327
|
end
|
|
281
328
|
|
|
282
|
-
subgraph
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
329
|
+
subgraph RUN["Runtime"]
|
|
330
|
+
E["stdio MCP Server<br/>memorix serve"]
|
|
331
|
+
F["HTTP Control Plane<br/>background / serve-http"]
|
|
332
|
+
G["Project Binding<br/>git root + config"]
|
|
286
333
|
end
|
|
287
334
|
|
|
288
|
-
subgraph
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
335
|
+
subgraph MEM["Memory"]
|
|
336
|
+
H["Observation<br/>facts, gotchas, fixes"]
|
|
337
|
+
I["Reasoning<br/>why, trade-offs, risks"]
|
|
338
|
+
J["Git Memory<br/>commit-derived ground truth"]
|
|
339
|
+
K["Session + Agent Team<br/>opt-in tasks, locks, handoffs"]
|
|
293
340
|
end
|
|
294
341
|
|
|
295
|
-
subgraph
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
342
|
+
subgraph PROC["Processing"]
|
|
343
|
+
L["Formation<br/>quality shaping"]
|
|
344
|
+
M["Embedding + Index<br/>hybrid retrieval"]
|
|
345
|
+
N["Graph Linking<br/>entity relations"]
|
|
346
|
+
O["Dedup + Retention<br/>consolidate over time"]
|
|
300
347
|
end
|
|
301
348
|
|
|
302
|
-
subgraph
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
349
|
+
subgraph USE["Consumption"]
|
|
350
|
+
P["Search / Timeline / Detail"]
|
|
351
|
+
Q["Dashboard / Agent Team View<br/>read-mostly state"]
|
|
352
|
+
R["Recall / Handoff / Resume"]
|
|
353
|
+
S["Skills / Sync / Orchestrate"]
|
|
306
354
|
end
|
|
307
355
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
```
|
|
338
|
-
|
|
339
|
-
Memorix is not a single linear pipeline. It accepts memory from multiple ingress surfaces, persists it across multiple substrates, runs several asynchronous quality/indexing branches, and exposes the results through different retrieval and collaboration surfaces.
|
|
340
|
-
|
|
341
|
-
### Memory Layers
|
|
342
|
-
|
|
343
|
-
- **Observation Memory**: what changed, how something works, gotchas, problem-solution notes
|
|
344
|
-
- **Reasoning Memory**: why a choice was made, alternatives, trade-offs, risks
|
|
345
|
-
- **Git Memory**: immutable engineering facts derived from commits
|
|
346
|
-
|
|
347
|
-
### Retrieval Model
|
|
348
|
-
|
|
349
|
-
- Default search is **project-scoped**
|
|
350
|
-
- `scope="global"` searches across projects
|
|
351
|
-
- Global hits can be opened explicitly with project-aware refs
|
|
352
|
-
- Source-aware retrieval boosts Git memories for "what changed" questions and reasoning memories for "why" questions
|
|
353
|
-
|
|
354
|
-
---
|
|
355
|
-
|
|
356
|
-
## Documentation
|
|
357
|
-
|
|
358
|
-
### Getting Started
|
|
359
|
-
|
|
360
|
-
- [Setup Guide](docs/SETUP.md)
|
|
361
|
-
- [Configuration Guide](docs/CONFIGURATION.md)
|
|
362
|
-
|
|
363
|
-
### Product and Architecture
|
|
364
|
-
|
|
365
|
-
- [Architecture](docs/ARCHITECTURE.md)
|
|
366
|
-
- [Memory Formation Pipeline](docs/MEMORY_FORMATION_PIPELINE.md)
|
|
367
|
-
- [Design Decisions](docs/DESIGN_DECISIONS.md)
|
|
368
|
-
|
|
369
|
-
### Reference
|
|
370
|
-
|
|
371
|
-
- [API Reference](docs/API_REFERENCE.md)
|
|
372
|
-
- [Git Memory Guide](docs/GIT_MEMORY.md)
|
|
373
|
-
- [Modules](docs/MODULES.md)
|
|
374
|
-
|
|
375
|
-
### Development
|
|
376
|
-
|
|
377
|
-
- [Development Guide](docs/DEVELOPMENT.md)
|
|
378
|
-
- [Known Issues and Roadmap](docs/KNOWN_ISSUES_AND_ROADMAP.md)
|
|
379
|
-
|
|
380
|
-
### AI-Facing Project Docs
|
|
381
|
-
|
|
382
|
-
- [Agent Operator Playbook](docs/AGENT_OPERATOR_PLAYBOOK.md)
|
|
383
|
-
- [AI Context Note](docs/AI_CONTEXT.md)
|
|
384
|
-
- [`llms.txt`](llms.txt)
|
|
385
|
-
- [`llms-full.txt`](llms-full.txt)
|
|
386
|
-
|
|
387
|
-
---
|
|
388
|
-
|
|
389
|
-
## Development
|
|
390
|
-
|
|
391
|
-
```bash
|
|
392
|
-
git clone https://github.com/AVIDS2/memorix.git
|
|
393
|
-
cd memorix
|
|
394
|
-
npm install
|
|
395
|
-
|
|
396
|
-
npm run dev
|
|
397
|
-
npm test
|
|
398
|
-
npm run build
|
|
356
|
+
A --> E
|
|
357
|
+
B --> E
|
|
358
|
+
C --> E
|
|
359
|
+
D --> F
|
|
360
|
+
|
|
361
|
+
E --> G
|
|
362
|
+
F --> G
|
|
363
|
+
|
|
364
|
+
G --> H
|
|
365
|
+
G --> I
|
|
366
|
+
G --> J
|
|
367
|
+
G --> K
|
|
368
|
+
|
|
369
|
+
H --> L
|
|
370
|
+
H --> M
|
|
371
|
+
I --> L
|
|
372
|
+
I --> N
|
|
373
|
+
J --> M
|
|
374
|
+
J --> N
|
|
375
|
+
K --> O
|
|
376
|
+
|
|
377
|
+
H --> P
|
|
378
|
+
I --> P
|
|
379
|
+
J --> P
|
|
380
|
+
K --> Q
|
|
381
|
+
H --> R
|
|
382
|
+
I --> R
|
|
383
|
+
J --> R
|
|
384
|
+
K --> S
|
|
399
385
|
```
|
|
400
386
|
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
[
|
|
387
|
+
Memorix is not a single linear pipeline. It accepts memory from multiple ingress surfaces, persists it across multiple substrates, runs several asynchronous quality/indexing branches, and exposes the results through retrieval, dashboard, and explicit Agent Team surfaces.
|
|
388
|
+
|
|
389
|
+
### Memory Layers
|
|
390
|
+
|
|
391
|
+
- **Observation Memory**: what changed, how something works, gotchas, problem-solution notes
|
|
392
|
+
- **Reasoning Memory**: why a choice was made, alternatives, trade-offs, risks
|
|
393
|
+
- **Git Memory**: immutable engineering facts derived from commits
|
|
394
|
+
|
|
395
|
+
### Retrieval Model
|
|
396
|
+
|
|
397
|
+
- Default search is **project-scoped**
|
|
398
|
+
- `scope="global"` searches across projects
|
|
399
|
+
- Global hits can be opened explicitly with project-aware refs
|
|
400
|
+
- Source-aware retrieval boosts Git memories for "what changed" questions and reasoning memories for "why" questions
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## Documentation
|
|
405
|
+
|
|
406
|
+
📖 **[Docs Map](docs/README.md)** — fastest route to the right document.
|
|
407
|
+
|
|
408
|
+
| Section | What's Covered |
|
|
409
|
+
| --- | --- |
|
|
410
|
+
| [Setup Guide](docs/SETUP.md) | Install, stdio vs HTTP control plane, per-client config |
|
|
411
|
+
| [Docker Deployment](docs/DOCKER.md) | Official container image path, compose, healthcheck, and path caveats |
|
|
412
|
+
| [Performance](docs/PERFORMANCE.md) | Resource profile, idle/runtime costs, optimization knobs |
|
|
413
|
+
| [Configuration](docs/CONFIGURATION.md) | `memorix.yml`, `.env`, project overrides |
|
|
414
|
+
| [Agent Operator Playbook](docs/AGENT_OPERATOR_PLAYBOOK.md) | Canonical AI-facing guide for installation, binding, hooks, troubleshooting |
|
|
415
|
+
| [Architecture](docs/ARCHITECTURE.md) | System shape, memory layers, data flows, module map |
|
|
416
|
+
| [API Reference](docs/API_REFERENCE.md) | MCP / HTTP / CLI command surface |
|
|
417
|
+
| [Git Memory Guide](docs/GIT_MEMORY.md) | Ingestion, noise filtering, retrieval semantics |
|
|
418
|
+
| [Development Guide](docs/DEVELOPMENT.md) | Contributor workflow, build, test, release |
|
|
419
|
+
|
|
420
|
+
Additional deep references:
|
|
421
|
+
|
|
422
|
+
- [Memory Formation Pipeline](docs/MEMORY_FORMATION_PIPELINE.md)
|
|
423
|
+
- [Design Decisions](docs/DESIGN_DECISIONS.md)
|
|
424
|
+
- [Modules](docs/MODULES.md)
|
|
425
|
+
- [Known Issues and Roadmap](docs/KNOWN_ISSUES_AND_ROADMAP.md)
|
|
426
|
+
- [AI Context Note](docs/AI_CONTEXT.md)
|
|
427
|
+
- [`llms.txt`](llms.txt)
|
|
428
|
+
- [`llms-full.txt`](llms-full.txt)
|
|
429
|
+
|
|
430
|
+
---
|
|
431
|
+
|
|
432
|
+
## What's New in 1.0.8
|
|
433
|
+
|
|
434
|
+
Version `1.0.8` builds on the 1.0.7 coordination/storage/team baseline with a CLI-first operator surface, official Docker path, dashboard refinements, and broad hooks fixes.
|
|
435
|
+
|
|
436
|
+
- **CLI-First Product Surface**: Every Memorix-native operator capability now has a task-oriented CLI route — `session`, `memory`, `reasoning`, `retention`, `formation`, `audit`, `transfer`, `skills`, `team`, `task`, `message`, `lock`, `handoff`, `poll`, `sync`, `ingest`. MCP remains the integration protocol and optional graph-compatibility layer.
|
|
437
|
+
- **Docker Deployment**: Official `Dockerfile`, `compose.yaml`, healthcheck, `--host` binding, and [DOCKER.md](docs/DOCKER.md) for running the HTTP control plane in a container.
|
|
438
|
+
- **Multi-Agent Orchestrator**: `memorix orchestrate` runs plan, parallel execution, verification, fix, review, and merge loops across Claude, Codex, Gemini CLI, and OpenCode with capability routing, worktree isolation, and agent fallback.
|
|
439
|
+
- **SQLite Canonical Store**: Observations, mini-skills, sessions, and archives in SQLite. Shared DB handle, freshness-safe retrieval, dead `JsonBackend` removed.
|
|
440
|
+
- **Opt-in Agent Team**: task board, messages, file locks, handoff artifacts, and autonomous-agent heartbeat state. `session_start` is lightweight by default; team identity is opt-in via `joinTeam` or `team_manage join`.
|
|
441
|
+
- **Dashboard Semantic Layering**: Team page filter tabs (Active/Recent/Historical), de-emphasized historical agents, project switcher grouped by real/temporary/placeholder, identity page cleanup.
|
|
442
|
+
- **Hooks Fixes**: OpenCode event-name key mapping + `Bun.spawn` → `spawnSync`; Copilot `pwsh` fallback + global-hooks guard; hook handler diagnostic logging.
|
|
443
|
+
- **Programmatic SDK**: `import { createMemoryClient } from 'memorix/sdk'` to store, search, get, and resolve observations directly from your own code without MCP or CLI. Also exports `createMemorixServer` and `detectProject`.
|
|
444
|
+
- **Test Suite Stabilization**: E2e and live-LLM tests are excluded from the default suite, and load-sensitive tests are isolated so the default verification path stays deterministic.
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Development
|
|
449
|
+
|
|
450
|
+
```bash
|
|
451
|
+
git clone https://github.com/AVIDS2/memorix.git
|
|
452
|
+
cd memorix
|
|
453
|
+
npm install
|
|
454
|
+
|
|
455
|
+
npm run dev
|
|
456
|
+
npm test
|
|
457
|
+
npm run build
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
Key local commands:
|
|
461
|
+
|
|
462
|
+
```bash
|
|
463
|
+
memorix status
|
|
464
|
+
memorix dashboard
|
|
465
|
+
memorix background start
|
|
466
|
+
memorix serve-http --port 3211
|
|
467
|
+
memorix git-hook --force
|
|
468
|
+
```
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
## Acknowledgements
|
|
473
|
+
|
|
474
|
+
Memorix builds on ideas from [mcp-memory-service](https://github.com/doobidoo/mcp-memory-service), [MemCP](https://github.com/maydali28/memcp), [claude-mem](https://github.com/anthropics/claude-code), [Mem0](https://github.com/mem0ai/mem0), and the broader MCP ecosystem.
|
|
475
|
+
|
|
476
|
+
## Star History
|
|
477
|
+
|
|
478
|
+
<a href="https://star-history.com/#AVIDS2/memorix&Date">
|
|
479
|
+
<picture>
|
|
480
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=AVIDS2/memorix&type=Date&theme=dark" />
|
|
481
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=AVIDS2/memorix&type=Date" />
|
|
482
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=AVIDS2/memorix&type=Date" width="600" />
|
|
483
|
+
</picture>
|
|
484
|
+
</a>
|
|
485
|
+
|
|
486
|
+
## License
|
|
487
|
+
|
|
488
|
+
[Apache 2.0](LICENSE)
|