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/README.md CHANGED
@@ -1,429 +1,488 @@
1
- <p align="center">
2
- <img src="assets/logo.png" alt="Memorix" width="120">
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
- Compatible with Cursor, Claude Code, Codex, Windsurf, Gemini CLI, GitHub Copilot, Kiro, OpenCode, Antigravity, and Trae through MCP.
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="README.zh-CN.md">简体中文</a> |
26
- <a href="#quick-start">Quick Start</a> |
27
- <a href="#supported-clients">Supported Clients</a> |
28
- <a href="#core-workflows">Core Workflows</a> |
29
- <a href="#documentation">Documentation</a> |
30
- <a href="docs/SETUP.md">Setup Guide</a>
31
- </p>
32
-
33
- ---
34
-
35
- ## For Coding Agents
36
-
37
- If you are using an AI coding agent to install or operate Memorix, have it read the [Agent Operator Playbook](docs/AGENT_OPERATOR_PLAYBOOK.md) first.
38
-
39
- That playbook is the canonical AI-facing guide for:
40
-
41
- - installation and runtime-mode selection
42
- - Git/project binding rules
43
- - stdio vs HTTP control-plane setup
44
- - per-agent integration and hooks
45
- - generated dot-directory behavior
46
- - troubleshooting and safe operating rules
47
-
48
- ## Why Memorix
49
-
50
- Most coding agents remember only the current thread. Memorix gives them a shared, persistent memory layer across IDEs, sessions, and projects.
51
-
52
- What makes Memorix different:
53
-
54
- - **Git Memory**: turn `git commit` into searchable engineering memory with noise filtering and commit provenance.
55
- - **Reasoning Memory**: store why a decision was made, not just what changed.
56
- - **Cross-Agent Local Recall**: multiple IDEs and agents can read the same local memory base instead of living in isolated silos.
57
- - **Memory Quality Pipeline**: formation, compaction, retention, and source-aware retrieval work together instead of acting like isolated tools.
58
-
59
- Memorix is built for one job: let multiple coding agents share the same durable project memory through MCP without giving up Git truth, reasoning history, or local control.
60
-
61
- ## Supported Clients
62
-
63
- Memorix currently ships first-class integrations for:
64
-
65
- - Cursor
66
- - Claude Code
67
- - Codex
68
- - Windsurf
69
- - Gemini CLI
70
- - GitHub Copilot
71
- - Kiro
72
- - OpenCode
73
- - Antigravity
74
- - Trae
75
-
76
- 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.
77
-
78
- ---
79
-
80
- ## Quick Start
81
-
82
- Install globally:
83
-
84
- ```bash
85
- npm install -g memorix
86
- ```
87
-
88
- Initialize Memorix config:
89
-
90
- ```bash
91
- memorix init
92
- ```
93
-
94
- `memorix init` lets you choose between `Global defaults` and `Project config`.
95
-
96
- Memorix uses two files with two roles:
97
-
98
- - `memorix.yml` for behavior and project settings
99
- - `.env` for secrets such as API keys
100
-
101
- Then pick the path that matches what you want to do:
102
-
103
- | You want | Run | Best for |
104
- | --- | --- | --- |
105
- | Quick MCP setup inside one IDE | `memorix serve` | Cursor, Claude Code, Codex, Windsurf, Gemini CLI, and other stdio MCP clients |
106
- | Dashboard + long-lived HTTP MCP in the background | `memorix background start` | Daily use, multiple agents, collaboration, dashboard |
107
- | Foreground HTTP mode for debugging or a custom port | `memorix serve-http --port 3211` | Manual supervision, debugging, custom launch control |
108
-
109
- Most users should choose **one** of the first two options:
110
-
111
- - `memorix serve` if you just want Memorix available inside your IDE as fast as possible
112
- - `memorix background start` if you want the dashboard and a shared HTTP control plane running in the background
113
-
114
- Optional local UI:
115
-
116
- ```bash
117
- memorix
118
- ```
119
-
120
- Use bare `memorix` only when you want the interactive local workbench in a TTY. It is not the main setup path for most users.
121
-
122
- Companion commands:
123
-
124
- ```bash
125
- memorix background status
126
- memorix background logs
127
- memorix background stop
128
- ```
129
-
130
- If you need the HTTP control plane in the foreground for debugging, manual supervision, or a custom port, use:
131
-
132
- ```bash
133
- memorix serve-http --port 3211
134
- ```
135
-
136
- If you are using the HTTP control plane across multiple workspaces or agents, make sure each session binds with `memorix_session_start(projectRoot=...)`.
137
-
138
- The deeper details around startup root selection, project binding, config precedence, and agent/operator workflows live in [docs/SETUP.md](docs/SETUP.md) and the [Agent Operator Playbook](docs/AGENT_OPERATOR_PLAYBOOK.md).
139
-
140
- Add Memorix to your MCP client:
141
-
142
- ### Generic stdio MCP config
143
-
144
- ```json
145
- {
146
- "mcpServers": {
147
- "memorix": {
148
- "command": "memorix",
149
- "args": ["serve"]
150
- }
151
- }
152
- }
153
- ```
154
-
155
- ### Generic HTTP MCP config
156
-
157
- ```json
158
- {
159
- "mcpServers": {
160
- "memorix": {
161
- "transport": "http",
162
- "url": "http://localhost:3211/mcp"
163
- }
164
- }
165
- }
166
- ```
167
-
168
- If you use the HTTP control plane across multiple workspaces or agents, the client or agent should also call `memorix_session_start(projectRoot=ABSOLUTE_WORKSPACE_PATH)` at the beginning of each project session.
169
-
170
- 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).
171
-
172
- <details open>
173
- <summary><strong>Cursor</strong> | <code>.cursor/mcp.json</code></summary>
174
-
175
- ```json
176
- {
177
- "mcpServers": {
178
- "memorix": {
179
- "command": "memorix",
180
- "args": ["serve"]
181
- }
182
- }
183
- }
184
- ```
185
- </details>
186
-
187
- <details>
188
- <summary><strong>Claude Code</strong></summary>
189
-
190
- ```bash
191
- claude mcp add memorix -- memorix serve
192
- ```
193
- </details>
194
-
195
- <details>
196
- <summary><strong>Codex</strong> | <code>~/.codex/config.toml</code></summary>
197
-
198
- ```toml
199
- [mcp_servers.memorix]
200
- command = "memorix"
201
- args = ["serve"]
202
- ```
203
- </details>
204
-
205
- For the full IDE matrix, Windows notes, and troubleshooting, see [docs/SETUP.md](docs/SETUP.md).
206
-
207
- ---
208
-
209
- ## Core Workflows
210
-
211
- ### 1. Store and retrieve memory
212
-
213
- Use MCP tools such as:
214
-
215
- - `memorix_store`
216
- - `memorix_search`
217
- - `memorix_detail`
218
- - `memorix_timeline`
219
- - `memorix_resolve`
220
-
221
- This covers decisions, gotchas, problem-solution notes, and session handoff context.
222
-
223
- ### 2. Capture Git truth automatically
224
-
225
- Install the post-commit hook:
226
-
227
- ```bash
228
- memorix git-hook --force
229
- ```
230
-
231
- Or ingest manually:
232
-
233
- ```bash
234
- memorix ingest commit
235
- memorix ingest log --count 20
236
- ```
237
-
238
- Git memories are stored with `source='git'`, commit hashes, changed files, and noise filtering.
239
-
240
- ### 3. Run the control plane
241
-
242
- ```bash
243
- memorix background start
244
- ```
245
-
246
- Then open:
247
-
248
- - MCP HTTP endpoint: `http://localhost:3211/mcp`
249
- - Dashboard: `http://localhost:3211`
250
-
251
- Companion commands:
252
-
253
- ```bash
254
- memorix background status
255
- memorix background logs
256
- memorix background stop
257
- ```
258
-
259
- Use `background start` as the default long-lived HTTP mode. If you need to keep the control plane in the foreground for debugging or manual supervision, use:
260
-
261
- ```bash
262
- memorix serve-http --port 3211
263
- ```
264
-
265
- This HTTP mode gives you collaboration tools, project identity diagnostics, config provenance, Git Memory views, and the dashboard in one place.
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
+ ![Memorix TUI Workbench](https://raw.githubusercontent.com/AVIDS2/memorix/main/assets/readme-tui-workbench.png)
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 Ingress["Ingress Surfaces"]
276
- A1["Git hooks / ingest"]
277
- A2["MCP tools"]
278
- A3["CLI / TUI"]
279
- A4["HTTP dashboard"]
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 Runtime["Memorix Runtime"]
283
- B1["stdio MCP server"]
284
- B2["HTTP control plane"]
285
- B3["project binding + config"]
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 Memory["Memory Substrates"]
289
- C1["Observation memory"]
290
- C2["Reasoning memory"]
291
- C3["Git memory"]
292
- C4["Session + team state"]
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 Processing["Async Processing"]
296
- D1["Formation pipeline"]
297
- D2["Embedding + indexing"]
298
- D3["Graph linking"]
299
- D4["Dedup + retention"]
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 Consumption["Consumption Surfaces"]
303
- E1["Search / detail / timeline"]
304
- E2["Dashboard / team views"]
305
- E3["Agent recall / handoff"]
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
- A1 --> B1
309
- A2 --> B1
310
- A2 --> B2
311
- A3 --> B1
312
- A3 --> B2
313
- A4 --> B2
314
-
315
- B1 --> B3
316
- B2 --> B3
317
-
318
- B3 --> C1
319
- B3 --> C2
320
- B3 --> C3
321
- B3 --> C4
322
-
323
- C1 --> D1
324
- C1 --> D2
325
- C1 --> D3
326
- C1 --> D4
327
- C2 --> D1
328
- C2 --> D3
329
- C3 --> D2
330
- C4 --> D3
331
-
332
- D1 --> E1
333
- D2 --> E1
334
- D3 --> E2
335
- D4 --> E3
336
- C4 --> E3
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
- Key local commands:
402
-
403
- ```bash
404
- memorix status
405
- memorix dashboard
406
- memorix background start
407
- memorix serve-http --port 3211
408
- memorix git-hook --force
409
- ```
410
-
411
- ---
412
-
413
- ## Acknowledgements
414
-
415
- 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.
416
-
417
- ## Star History
418
-
419
- <a href="https://star-history.com/#AVIDS2/memorix&Date">
420
- <picture>
421
- <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=AVIDS2/memorix&type=Date&theme=dark" />
422
- <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=AVIDS2/memorix&type=Date" />
423
- <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=AVIDS2/memorix&type=Date" width="600" />
424
- </picture>
425
- </a>
426
-
427
- ## License
428
-
429
- [Apache 2.0](LICENSE)
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)