prism-mcp-server 12.5.2 → 12.5.4
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 +1672 -45
- package/dist/cli.js +0 -0
- package/dist/tools/__tests__/ledgerHandlers.test.js +3 -3
- package/package.json +1 -1
- package/dist/agent/agentTools.js +0 -453
- package/dist/agent/mcpBridge.js +0 -234
- package/dist/agent/platformUtils.js +0 -470
- package/dist/agent/terminalUI.js +0 -198
- package/dist/auth.js +0 -218
- package/dist/prism-cloud.js +0 -110
- package/dist/tools/projects.js +0 -214
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://github.com/modelcontextprotocol/servers)
|
|
5
5
|
[](https://glama.ai/mcp/servers?query=prism-mcp)
|
|
6
6
|
[](https://smithery.ai/server/@dcostenco/prism-mcp)
|
|
7
|
-
[](LICENSE)
|
|
8
8
|
[](https://www.typescriptlang.org/)
|
|
9
9
|
[](CONTRIBUTING.md)
|
|
10
10
|
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
|
|
46
46
|
**27/27 features** — more than any competitor (Cursor: 9, Windsurf: 9, Replit: 12, Bolt: 9).
|
|
47
47
|
|
|
48
|
-
👉 **[
|
|
48
|
+
👉 **[Full IDE README with screenshots, architecture, and technical details →](https://github.com/dcostenco/prism-coder/releases/tag/v1.0.0)**
|
|
49
49
|
|
|
50
50
|
---
|
|
51
51
|
|
|
@@ -66,96 +66,1723 @@ npx -y prism-mcp-server
|
|
|
66
66
|
|
|
67
67
|
Works with **Claude Desktop · Claude Code · Cursor · Windsurf · Cline · Gemini · Antigravity** — **any MCP client.**
|
|
68
68
|
|
|
69
|
-
https://github.com/dcostenco/prism-
|
|
69
|
+
https://github.com/dcostenco/prism-coder/raw/main/docs/prism_mcp_demo.mp4
|
|
70
70
|
|
|
71
71
|
## 📖 Table of Contents
|
|
72
72
|
|
|
73
|
-
- [💳 Unified Billing & Agent Skill Ecosystem](#unified-billing)
|
|
74
|
-
- [
|
|
75
|
-
- [
|
|
76
|
-
- [
|
|
77
|
-
- [
|
|
73
|
+
- [💳 v12.5 Unified Billing & Agent Skill Ecosystem](#unified-billing)
|
|
74
|
+
- [🏗️ v11.6.0 Agent Infrastructure Resilience](#agent-infrastructure)
|
|
75
|
+
- [🔬 v11.5.1 Deep Research Intelligence (Auto-Scholar)](#deep-research-intelligence)
|
|
76
|
+
- [⚡ Zero-Search Retrieval (HRR Architecture)](#zero-search)
|
|
77
|
+
- [Why Prism?](#why-prism)
|
|
78
|
+
- [Quick Start](#quick-start)
|
|
79
|
+
- [The Magic Moment](#the-magic-moment)
|
|
80
|
+
- [Setup Guides](#setup-guides)
|
|
81
|
+
- [Universal Import: Bring Your History](#universal-import-bring-your-history)
|
|
82
|
+
- [What Makes Prism Different](#what-makes-prism-different)
|
|
83
|
+
- [Cognitive Architecture (v7.8)](#cognitive-architecture-v78)
|
|
84
|
+
- [Data Privacy & Egress](#data-privacy-egress)
|
|
85
|
+
- [Use Cases](#use-cases)
|
|
86
|
+
- [What's New](#whats-new)
|
|
87
|
+
- [How Prism Compares](#how-prism-compares)
|
|
88
|
+
- [CLI Reference](#cli-reference)
|
|
89
|
+
- [Tool Reference](#tool-reference)
|
|
90
|
+
- [Environment Variables](#environment-variables)
|
|
91
|
+
- [Architecture](#architecture)
|
|
92
|
+
- [Scientific Foundation](#scientific-foundation)
|
|
93
|
+
- [Milestones & Roadmap](#milestones-roadmap)
|
|
94
|
+
- [Troubleshooting FAQ](#troubleshooting-faq)
|
|
78
95
|
|
|
79
96
|
---
|
|
80
97
|
|
|
81
98
|
## 💳 <a name="unified-billing"></a>v12.5 Unified Billing & Agent Skill Ecosystem
|
|
82
99
|
|
|
83
|
-
Prism v12.5 unifies Prism and Synalux into a **single billing architecture
|
|
100
|
+
Prism v12.5 unifies Prism and Synalux into a **single billing architecture** with identical tier pricing and a 14-day free trial on all paid tiers.
|
|
84
101
|
|
|
85
|
-
###
|
|
102
|
+
### Prism Cloud Pricing
|
|
103
|
+
|
|
104
|
+
| | **Free** | **Standard** | **Advanced** | **Enterprise** |
|
|
105
|
+
|:---|:---:|:---:|:---:|:---:|
|
|
106
|
+
| **Price** | $0/mo | **$19/mo** | **$49/mo** | **$99/mo** |
|
|
107
|
+
| **Trial** | — | 14 days | 14 days | 14 days |
|
|
108
|
+
| **API Calls** | 100/day | 2,000/day | 5,000/day | Unlimited |
|
|
109
|
+
| **Tools** | 5 core | All 17 | All 17 + RBAC | All + custom |
|
|
110
|
+
| **Agents** | Single | Single | Multi-agent | Multi-agent |
|
|
111
|
+
| **Voice** | — | Input/recognition | SOAP dictation | SOAP + custom |
|
|
112
|
+
| **Integrations** | — | Email | Zoom, Stripe, GWS | All + SSO/SAML |
|
|
113
|
+
| **Support** | Community | Email | Priority | Dedicated SLA |
|
|
114
|
+
| **HIPAA BAA** | — | — | — | ✅ |
|
|
115
|
+
|
|
116
|
+
### 54 Production-Ready Agent Skills
|
|
117
|
+
|
|
118
|
+
- **10 Super-Skills** — Dev Engineering, AI Agent, Sales, Content Creative, PM, Legal, Research Knowledge, Operations CX, Finance, Marketing (compacted 73%: 22K→6K lines)
|
|
119
|
+
- **4 Medical Skills** — `hipaa-compliance`, `clinical-documentation`, `medical-billing-coding`, `patient-data-privacy`
|
|
120
|
+
- **10 Vendor Skills** — Vercel, Supabase, Stripe, Sentry, OpenAI, Addy Osmani, Garry Tan/gstack
|
|
121
|
+
- **30+ Community Skills** — Installed and optimized from the Gemini ecosystem
|
|
122
|
+
|
|
123
|
+
> 📦 **Packages:** [`prism-mcp-server`](https://www.npmjs.com/package/prism-mcp-server) (npm) · [Prism Coder IDE](https://github.com/dcostenco/prism-coder/releases/tag/v1.0.0) (VS Code) · `prism` CLI
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## 🏗️ <a name="agent-infrastructure"></a>v11.6.0 Agent Infrastructure Resilience
|
|
128
|
+
|
|
129
|
+
Prism v11.6.0 introduces **production-grade agent infrastructure** for running multiple AI agents concurrently without resource exhaustion or deadlocks. The new resilience layer includes:
|
|
130
|
+
|
|
131
|
+
- **Serialized Execution Queue** (`agent_queue.sh` v2.0) — Cross-platform file locking via Python `fcntl.flock` (no GNU dependencies) ensures strict mutual exclusion when loading Ollama models, preventing OOM crashes from concurrent model loads.
|
|
132
|
+
- **Memory Guardian Daemon** — Background watchdog that proactively monitors RAM pressure and auto-evicts idle models before swap exhaustion occurs.
|
|
133
|
+
- **Queue Watchdog** — Detects and auto-drains hung queue entries (>10 min PID age) to prevent deadlocks in long-running pipelines.
|
|
134
|
+
- **Unified Status Dashboard** (`agent_status.sh`) — Color-coded CLI providing real-time visibility into queue depth, guardian health, and Ollama status with `--json` mode for programmatic consumption.
|
|
135
|
+
|
|
136
|
+
| Component | What It Prevents |
|
|
137
|
+
| :--- | :--- |
|
|
138
|
+
| **Serialized Queue** | OOM from concurrent model loading |
|
|
139
|
+
| **Memory Guardian** | Swap exhaustion under high memory pressure |
|
|
140
|
+
| **Queue Watchdog** | Deadlocks from zombie queue entries |
|
|
141
|
+
| **Status Dashboard** | Blind spots in infrastructure health |
|
|
142
|
+
|
|
143
|
+
> 🧪 **Verified:** 115/115 tests passing across unit, concurrent, shell integration, mock Ollama, and live stress test suites. v12.5 billing tests included.
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## 🔬 <a name="deep-research-intelligence"></a>v11.5.1 Deep Research Intelligence (Auto-Scholar)
|
|
148
|
+
|
|
149
|
+
Prism v11.5.1 transforms your AI agent from a "Coder" into a "Clinical Scientist." It features a **Tavily-Enhanced Multi-Provider Discovery Pipeline** that grounds Gemini 2.5 Flash's thinking in real-world empirical data.
|
|
150
|
+
|
|
151
|
+
### 🥊 The Global Benchmarks: Prism v11 vs. Standard RAG
|
|
152
|
+
|
|
153
|
+
| Feature | **Standard AI Memory (Mem0/Zep)** | **Prism v12.5 (Elite Architecture)** |
|
|
154
|
+
| :--- | :--- | :--- |
|
|
155
|
+
| **Search Complexity** | $O(N)$ or $O(\log N)$ (Scales with data) | **$O(1)$ Zero-Search (Constant time via HRR) ** |
|
|
156
|
+
| **Discovery Logic** | General Web Search (Snippets) | **Parallel Academic Discovery (PubMed, ERIC, S2)** |
|
|
157
|
+
| **Reasoning Model** | Flat List (Simple Similarity) | **ACT-R Spreading Activation (Causal Graph)** |
|
|
158
|
+
| **Privacy Mode** | Cloud-First (SaaS) | **Local-First (HIPAA-Hardened / Air-Gapped)** |
|
|
159
|
+
| **Intelligence Floor** | Generic GPT-4 Advice | **Data-Driven Clinical Evidence (62% CI Warnings)** |
|
|
160
|
+
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## ⚡ <a name="zero-search"></a>Zero-Search Retrieval (HRR Architecture)
|
|
164
|
+
Prism features a cutting-edge **Zero-Search Retrieval** system for its cognitive memory, moving beyond traditional vector databases toward a mathematically direct, $O(1)$ retrieval model.
|
|
165
|
+
|
|
166
|
+
#### 🧠 What is Zero-Search?
|
|
167
|
+
**Zero-Search Retrieval** uses Holographic Reduced Representations (HRR) to "ask the vector" directly. Structured facts are bound into a single, high-dimensional "superposition" vector (typically 4096-dims). Retrieval is a direct mathematical **unbinding** operation (circular correlation).
|
|
168
|
+
|
|
169
|
+
| Metric | Traditional Vector Search | **Zero-Search (HRR)** |
|
|
170
|
+
| :--- | :--- | :--- |
|
|
171
|
+
| **Complexity** | $O(N)$ or $O(\log N)$ (Scales with data) | **$O(1)$ (Constant time)** |
|
|
172
|
+
| **Retrieval Speed** | Decays as memory grows | **Instant regardless of memory size** |
|
|
173
|
+
| **Precision** | Approximate (Top-K) | **Mathematical Unbinding (Exact)** |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### 🔍 Supported Discovery Engines & Databases
|
|
178
|
+
|
|
179
|
+
1. **Tavily AI** (Elite): Primary discovery engine for AI-native deep crawling and PDF/Abstract extraction.
|
|
180
|
+
2. **PubMed (NCBI)** (Clinical): The world's largest biomedical database for clinical citations.
|
|
181
|
+
3. **ERIC (Education Research)** (Behavioral): The definitive database for ABA and pediatric interventions.
|
|
182
|
+
4. **Semantic Scholar** (Academic): AI-powered research tool providing "TLDR" summaries of 200M+ papers.
|
|
183
|
+
5. **DuckDuckGo Lite** (Fallback): Privacy-focused web discovery for general context.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### 🏥 Flagship Implementation: [Synalux](https://synalux.ai)
|
|
188
|
+
**Synalux** is a high-compliance, local-first Practice Management System for ABA and Pediatrics. It is the flagship implementation of the Prism v11.5.1 engine, utilizing **Zero-Search Retrieval** and **Parallel Academic Discovery** to provide clinicians with real-time, evidence-based reasoning.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
<details>
|
|
193
|
+
<summary><strong>See Live Samples</strong></summary>
|
|
194
|
+
|
|
195
|
+
#### Topic: Helping a child with tactile focus
|
|
196
|
+
* **Without Deep Research**: "I recommend using sensory toys and maintaining a calm environment to help the child focus during tasks."
|
|
197
|
+
* **With Deep Research (v11.5.1)**: "Recent clinical studies indicate that high-frequency sensory input can actually *decrease* focus in 40% of pediatric cases. I recommend a low-frequency, high-pressure 'weighted' approach which showed a 3.5x improvement in sustained attention during clinical trials."
|
|
198
|
+
|
|
199
|
+
#### Topic: Behavior extinction vs. reinforcement
|
|
200
|
+
* **Without Deep Research**: "Extinction is a common way to stop a behavior. You should also reinforce good behaviors at the same time."
|
|
201
|
+
* **With Deep Research (v11.5.1)**: "Research shows that using extinction alone leads to an 'extinction burst' (a temporary spike in the bad behavior) in 62% of cases. However, combining it with an alternative reinforcement strategy (DRA) reduces this risk to under 20%."
|
|
202
|
+
|
|
203
|
+
</details>
|
|
204
|
+
|
|
205
|
+
---
|
|
206
|
+
|
|
207
|
+
## <a name="why-prism"></a>Why Prism?
|
|
208
|
+
|
|
209
|
+
Every time you start a new conversation with an AI coding assistant, it starts from scratch. You re-explain your architecture, re-describe your decisions, re-list your TODOs. Hours of context — gone.
|
|
210
|
+
|
|
211
|
+
**Prism gives your agent a brain that persists — and then teaches it to reason.** Save what matters at the end of each session. Load it back instantly on the next one. But Prism goes far beyond storage: it consolidates raw experience into lasting principles, traverses causal chains to surface root causes, and knows when to say *"I don't know."*
|
|
212
|
+
|
|
213
|
+
> 📌 **Terminology:** Throughout this doc, **"Prism"** refers to the MCP server and cognitive memory engine. **"Mind Palace"** refers to the visual dashboard UI at `localhost:3000` — your window into the agent's brain. They work together; the dashboard is optional.
|
|
214
|
+
|
|
215
|
+
Prism has three pillars:
|
|
216
|
+
|
|
217
|
+
1. **🧠 Cognitive Memory ($O(1)$ Zero-Search)** — Prism uses **Holographic Reduced Representations (HRR)** to eliminate "searching" entirely. Memories are unbound mathematically from a superposition vector in constant time ($O(1)$), regardless of library size. Re-ranking is powered by the **ACT-R** model, mimicking biological recency and frequency.
|
|
218
|
+
|
|
219
|
+
2. **🔗 Multi-Hop Causal Reasoning** — Prism doesn't just find "similar" things. Spreading activation traverses the causal graph and brings back context connected to your current problem through logical "trains of thought."
|
|
220
|
+
|
|
221
|
+
3. **🏭 Autonomous Execution (Dark Factory)** — When you're ready, Prism can run coding tasks end-to-end with a fail-closed pipeline where an adversarial evaluator catches bugs the generator missed — before you ever see the PR. *(See [Dark Factory](#dark-factory-adversarial-autonomous-pipelines).)*
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## <a name="quick-start"></a>🚀 Quick Start
|
|
226
|
+
|
|
227
|
+
### Prerequisites
|
|
228
|
+
|
|
229
|
+
- **Node.js v18+** (v20 LTS recommended; v23.x has [known npx quirk](#common-installation-pitfalls))
|
|
230
|
+
- Any MCP-compatible client (Claude Desktop, Cursor, Windsurf, Cline, etc.)
|
|
231
|
+
- No API keys required for core features (see [Capability Matrix](#capability-matrix))
|
|
232
|
+
|
|
233
|
+
### Install
|
|
234
|
+
|
|
235
|
+
Add to your MCP client config (`claude_desktop_config.json`, `.cursor/mcp.json`, etc.):
|
|
236
|
+
|
|
237
|
+
```json
|
|
238
|
+
{
|
|
239
|
+
"mcpServers": {
|
|
240
|
+
"prism-mcp": {
|
|
241
|
+
"command": "npx",
|
|
242
|
+
"args": ["-y", "prism-mcp-server"]
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
> ⚠️ **Windows / Restricted Shells:** If your MCP client complains that `npx` is not found, use the absolute path to your node binary (e.g. `C:\Program Files\nodejs\npx.cmd`).
|
|
249
|
+
|
|
250
|
+
**That's it.** Restart your client. All tools are available. The **Mind Palace Dashboard** (the visual UI for your agent's brain) starts automatically at `http://localhost:3000`. You don't need to keep a tab open — the dashboard runs in the background and the MCP tools work with or without it.
|
|
251
|
+
|
|
252
|
+
> 🔮 **Pro Tip:** Once installed, open **`http://localhost:3000`** in your browser to view the Mind Palace Dashboard — a beautiful, real-time UI of your agent's brain. Explore the Knowledge Graph, Intent Health gauges, and Session Ledger.
|
|
253
|
+
|
|
254
|
+
> 🔄 **Updating Prism:** `npx -y` caches the package locally. To force an update to the latest version, restart your MCP client — `npx -y` will fetch the newest release automatically. If you're stuck on a stale version, run `npx clear-npx-cache` (or `npm cache clean --force`) before restarting.
|
|
255
|
+
|
|
256
|
+
<details>
|
|
257
|
+
<summary>Port 3000 already in use? (Next.js / Vite / etc.)</summary>
|
|
258
|
+
|
|
259
|
+
Add `PRISM_DASHBOARD_PORT` to your MCP config env block:
|
|
260
|
+
|
|
261
|
+
```json
|
|
262
|
+
{
|
|
263
|
+
"mcpServers": {
|
|
264
|
+
"prism-mcp": {
|
|
265
|
+
"command": "npx",
|
|
266
|
+
"args": ["-y", "prism-mcp-server"],
|
|
267
|
+
"env": { "PRISM_DASHBOARD_PORT": "3001" }
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
Then open `http://localhost:3001` instead.
|
|
274
|
+
</details>
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
### Capability Matrix
|
|
278
|
+
|
|
279
|
+
| Feature | Local (Offline) | Cloud (API Key) |
|
|
280
|
+
|:--------|:---:|:---:|
|
|
281
|
+
| Session memory & handoffs | ✅ | ✅ |
|
|
282
|
+
| Keyword search (FTS5) | ✅ | ✅ |
|
|
283
|
+
| Time travel & versioning | ✅ | ✅ |
|
|
284
|
+
| Mind Palace Dashboard | ✅ | ✅ |
|
|
285
|
+
| GDPR export (JSON/Markdown/Vault) | ✅ | ✅ |
|
|
286
|
+
| Semantic vector search | ✅ (`embedding_provider=local`) | ✅ (gemini, openai, or voyage) |
|
|
287
|
+
| **Ledger compaction** | ✅ `prism-coder:7b` via Ollama | ✅ Text provider key |
|
|
288
|
+
| **Task routing (LLM tiebreaker)** | ✅ `prism-coder:7b` via Ollama | N/A (heuristic-only) |
|
|
289
|
+
| Morning Briefings | ❌ | ✅ Text provider key |
|
|
290
|
+
| Web Scholar research | ❌ | ✅ [`BRAVE_API_KEY`](#environment-variables) + [`FIRECRAWL_API_KEY`](#environment-variables) (or `TAVILY_API_KEY`) |
|
|
291
|
+
| VLM image captioning | ❌ | ✅ Provider key |
|
|
292
|
+
| Autonomous Pipelines (Dark Factory) | ❌ | ✅ Text provider key |
|
|
293
|
+
|
|
294
|
+
> 🔑 The core Mind Palace works **100% offline** with zero API keys — including semantic vector search with `embedding_provider=local`. Cloud keys unlock text generation features (Briefings, compaction, pipelines). See [Environment Variables](#environment-variables).
|
|
295
|
+
|
|
296
|
+
> 💰 **API Cost Note:** With `embedding_provider=local`, semantic search is fully free and offline. Cloud providers (`GOOGLE_API_KEY` for Gemini, `VOYAGE_API_KEY`, `OPENAI_API_KEY`) have generous free tiers. `BRAVE_API_KEY` offers 2,000 free searches/month. `FIRECRAWL_API_KEY` has a free plan with 500 credits. For typical solo development, expect **$0/month** on the free tiers.
|
|
297
|
+
|
|
298
|
+
---
|
|
299
|
+
|
|
300
|
+
## <a name="the-magic-moment"></a>✨ The Magic Moment
|
|
301
|
+
|
|
302
|
+
> **Session 1** (Monday evening):
|
|
303
|
+
> ```
|
|
304
|
+
> You: "Analyze this auth architecture and plan the OAuth migration."
|
|
305
|
+
> Agent: *deep analysis, decisions, TODO list*
|
|
306
|
+
> Agent: session_save_ledger → session_save_handoff ✅
|
|
307
|
+
> ```
|
|
308
|
+
>
|
|
309
|
+
> **Session 2** (Tuesday morning — new conversation, new context window):
|
|
310
|
+
> ```
|
|
311
|
+
> Agent: session_load_context → "Welcome back! Yesterday we decided to use PKCE
|
|
312
|
+
> flow with refresh tokens. 3 TODOs remain: migrate the user table,
|
|
313
|
+
> update the middleware, and write integration tests."
|
|
314
|
+
> You: "Pick up where we left off."
|
|
315
|
+
> ```
|
|
316
|
+
>
|
|
317
|
+
> **Your agent remembers everything.** No re-uploading files. No re-explaining decisions.
|
|
318
|
+
|
|
319
|
+
---
|
|
320
|
+
|
|
321
|
+
## <a name="setup-guides"></a>📖 Setup Guides
|
|
322
|
+
|
|
323
|
+
<details>
|
|
324
|
+
<summary><strong>Claude Desktop</strong></summary>
|
|
325
|
+
|
|
326
|
+
Add to `claude_desktop_config.json`:
|
|
327
|
+
|
|
328
|
+
```json
|
|
329
|
+
{
|
|
330
|
+
"mcpServers": {
|
|
331
|
+
"prism-mcp": {
|
|
332
|
+
"command": "npx",
|
|
333
|
+
"args": ["-y", "prism-mcp-server"]
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
```
|
|
338
|
+
|
|
339
|
+
</details>
|
|
340
|
+
|
|
341
|
+
<details>
|
|
342
|
+
<summary><strong>Cursor</strong></summary>
|
|
343
|
+
|
|
344
|
+
Add to `.cursor/mcp.json` (project) or `~/.cursor/mcp.json` (global):
|
|
345
|
+
|
|
346
|
+
```json
|
|
347
|
+
{
|
|
348
|
+
"mcpServers": {
|
|
349
|
+
"prism-mcp": {
|
|
350
|
+
"command": "npx",
|
|
351
|
+
"args": ["-y", "prism-mcp-server"]
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
</details>
|
|
358
|
+
|
|
359
|
+
<details>
|
|
360
|
+
<summary><strong>Windsurf</strong></summary>
|
|
361
|
+
|
|
362
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
363
|
+
|
|
364
|
+
```json
|
|
365
|
+
{
|
|
366
|
+
"mcpServers": {
|
|
367
|
+
"prism-mcp": {
|
|
368
|
+
"command": "npx",
|
|
369
|
+
"args": ["-y", "prism-mcp-server"]
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
</details>
|
|
376
|
+
|
|
377
|
+
<details>
|
|
378
|
+
<summary><strong>VS Code + Continue / Cline</strong></summary>
|
|
379
|
+
|
|
380
|
+
Add to your Continue `config.json` or Cline MCP settings:
|
|
381
|
+
|
|
382
|
+
```json
|
|
383
|
+
{
|
|
384
|
+
"mcpServers": {
|
|
385
|
+
"prism-mcp": {
|
|
386
|
+
"command": "npx",
|
|
387
|
+
"args": ["-y", "prism-mcp-server"],
|
|
388
|
+
"env": {
|
|
389
|
+
"PRISM_STORAGE": "local",
|
|
390
|
+
"BRAVE_API_KEY": "your-brave-api-key"
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
</details>
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
<details>
|
|
401
|
+
<summary><strong>Claude Code — Lifecycle Autoload (.clauderules)</strong></summary>
|
|
402
|
+
|
|
403
|
+
Claude Code naturally picks up MCP tools by adding them to your workspace `.clauderules`. Simply add:
|
|
404
|
+
|
|
405
|
+
```markdown
|
|
406
|
+
Always start the conversation by calling `mcp__prism-mcp__session_load_context(project='my-project', level='deep')`.
|
|
407
|
+
When wrapping up, always call `mcp__prism-mcp__session_save_ledger` and `mcp__prism-mcp__session_save_handoff`.
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
> **Format Note:** Claude automatically wraps MCP tools with double underscores (`mcp__prism-mcp__...`), while most other clients use single underscores (`mcp_prism-mcp_...`). Prism's backend natively handles both formats seamlessly.
|
|
411
|
+
|
|
412
|
+
**CLI Alternative:** If MCP tools aren't available or you're scripting around Claude Code:
|
|
413
|
+
|
|
414
|
+
```bash
|
|
415
|
+
# Load context before a session
|
|
416
|
+
prism load my-project --level deep
|
|
417
|
+
|
|
418
|
+
# Machine-readable JSON for parsing in scripts
|
|
419
|
+
prism load my-project --level deep --json
|
|
420
|
+
```
|
|
421
|
+
|
|
422
|
+
</details>
|
|
423
|
+
|
|
424
|
+
<details id="antigravity-auto-load">
|
|
425
|
+
<summary><strong>Gemini / Antigravity — Prompt Auto-Load</strong></summary>
|
|
426
|
+
|
|
427
|
+
See the [Gemini Setup Guide](docs/SETUP_GEMINI.md) for the proven three-layer prompt architecture to ensure reliable session auto-loading.
|
|
428
|
+
|
|
429
|
+
Antigravity doesn't expose MCP tools to the model. Use the `prism load` CLI as a fallback:
|
|
430
|
+
|
|
431
|
+
```bash
|
|
432
|
+
# From a shell or run_command tool
|
|
433
|
+
prism load my-project --level standard --json
|
|
434
|
+
|
|
435
|
+
# Or via the wrapper script
|
|
436
|
+
bash ~/.gemini/antigravity/scratch/prism_session_loader.sh my-project
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
The CLI uses the same storage layer as the MCP tool (SQLite or Supabase).
|
|
440
|
+
|
|
441
|
+
> ⚠️ **CRITICAL (v9.2.2): Split-Brain Prevention**
|
|
442
|
+
> If your MCP server is configured with `PRISM_STORAGE=local` but Supabase credentials are also set, the CLI may read from the **wrong backend** (Supabase) while the server writes to SQLite. This causes stale TODOs and divergent state. Always pass `--storage local` explicitly when using the CLI in a local-mode environment:
|
|
443
|
+
> ```bash
|
|
444
|
+
> prism load my-project --storage local --json
|
|
445
|
+
> ```
|
|
446
|
+
> The `prism_session_loader.sh` wrapper handles this automatically since v9.2.2.
|
|
447
|
+
|
|
448
|
+
</details>
|
|
449
|
+
|
|
450
|
+
<details>
|
|
451
|
+
<summary><strong>Bash / CI/CD / Scripts</strong></summary>
|
|
452
|
+
|
|
453
|
+
Use the `prism load` CLI to access session context from any shell environment:
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
# Quick check — human-readable
|
|
457
|
+
prism load my-project
|
|
458
|
+
|
|
459
|
+
# Parse JSON in scripts
|
|
460
|
+
CONTEXT=$(prism load my-project --level quick --json)
|
|
461
|
+
SUMMARY=$(echo "$CONTEXT" | jq -r '.handoff[0].last_summary')
|
|
462
|
+
VERSION=$(echo "$CONTEXT" | jq -r '.handoff[0].version')
|
|
463
|
+
echo "Project at v$VERSION: $SUMMARY"
|
|
464
|
+
|
|
465
|
+
# Explicit storage backend (v9.2.2 — prevents split-brain)
|
|
466
|
+
prism load my-project --storage local --json
|
|
467
|
+
prism load my-project --storage supabase --json
|
|
468
|
+
|
|
469
|
+
# Role-scoped loading
|
|
470
|
+
prism load my-project --role qa --json
|
|
471
|
+
|
|
472
|
+
# Use in CI/CD to verify context exists before deploying
|
|
473
|
+
if ! prism load my-project --level quick --json | jq -e '.handoff[0].version' > /dev/null 2>&1; then
|
|
474
|
+
echo "No Prism context found — skipping context-aware deploy"
|
|
475
|
+
fi
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
> 📦 **Install:** `npm install -g prism-mcp-server` makes the `prism` CLI available globally. For local builds: `node /path/to/prism/dist/cli.js load`.
|
|
479
|
+
|
|
480
|
+
</details>
|
|
481
|
+
|
|
482
|
+
<details>
|
|
483
|
+
<summary><strong>Supabase Cloud Sync</strong></summary>
|
|
484
|
+
|
|
485
|
+
To sync memory across machines or teams:
|
|
486
|
+
|
|
487
|
+
```json
|
|
488
|
+
{
|
|
489
|
+
"mcpServers": {
|
|
490
|
+
"prism-mcp": {
|
|
491
|
+
"command": "npx",
|
|
492
|
+
"args": ["-y", "prism-mcp-server"],
|
|
493
|
+
"env": {
|
|
494
|
+
"PRISM_STORAGE": "supabase",
|
|
495
|
+
"SUPABASE_URL": "https://your-project.supabase.co",
|
|
496
|
+
"SUPABASE_KEY": "your-supabase-anon-or-service-key"
|
|
497
|
+
}
|
|
498
|
+
}
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
#### Schema Migrations
|
|
504
|
+
|
|
505
|
+
Prism auto-applies its schema on first connect — no manual step required. If you need to apply or re-apply migrations manually (e.g. for a fresh project or after a version bump), run the SQL files in `supabase/migrations/` in numbered order via the **Supabase SQL Editor** or the CLI:
|
|
506
|
+
|
|
507
|
+
```bash
|
|
508
|
+
# Via CLI (requires supabase CLI + project linked)
|
|
509
|
+
supabase db push
|
|
510
|
+
|
|
511
|
+
# Or apply a single migration via the Supabase dashboard SQL Editor
|
|
512
|
+
# Paste the contents of supabase/migrations/0NN_*.sql and click Run
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
> **Key migrations:**
|
|
516
|
+
> - `020_*` — Core schema (ledger, handoff, FTS, TTL, CRDT)
|
|
517
|
+
> - `033_memory_links.sql` — Associative Memory Graph (MemoryLinks) — required for `session_backfill_links`
|
|
518
|
+
|
|
519
|
+
> **Anon key vs. service role key:** The anon key works for personal use (Supabase RLS policies apply). Use the service role key for team deployments where multiple users share the same Supabase project — it bypasses RLS and allows Prism to manage all rows regardless of auth context. Never expose the service role key client-side.
|
|
520
|
+
|
|
521
|
+
</details>
|
|
522
|
+
|
|
523
|
+
<details>
|
|
524
|
+
<summary><strong>Clone & Build (Full Control)</strong></summary>
|
|
525
|
+
|
|
526
|
+
```bash
|
|
527
|
+
git clone https://github.com/dcostenco/prism-mcp.git
|
|
528
|
+
cd prism-mcp && npm install && npm run build
|
|
529
|
+
```
|
|
530
|
+
|
|
531
|
+
Then add to your MCP config:
|
|
532
|
+
|
|
533
|
+
```json
|
|
534
|
+
{
|
|
535
|
+
"mcpServers": {
|
|
536
|
+
"prism-mcp": {
|
|
537
|
+
"command": "node",
|
|
538
|
+
"args": ["/path/to/prism-mcp/dist/server.js"],
|
|
539
|
+
"env": {
|
|
540
|
+
"BRAVE_API_KEY": "your-key"
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
```
|
|
546
|
+
|
|
547
|
+
</details>
|
|
548
|
+
|
|
549
|
+
<details>
|
|
550
|
+
<summary><strong>Cloud Deployment (Render)</strong></summary>
|
|
551
|
+
|
|
552
|
+
Prism can be deployed natively to cloud platforms like [Render](https://render.com) so your agent's memory is always online and accessible across different machines or teams.
|
|
553
|
+
|
|
554
|
+
1. Fork this repository.
|
|
555
|
+
2. In the Render Dashboard, create a new **Web Service** pointing to your repository.
|
|
556
|
+
3. In the setup wizard, select **Docker** as the Runtime.
|
|
557
|
+
4. Set the Dockerfile path to `Dockerfile.smithery`.
|
|
558
|
+
5. Connect your local MCP client to your new cloud endpoint using the `sse` transport:
|
|
559
|
+
|
|
560
|
+
```json
|
|
561
|
+
{
|
|
562
|
+
"mcpServers": {
|
|
563
|
+
"prism-mcp-cloud": {
|
|
564
|
+
"command": "npx",
|
|
565
|
+
"args": ["-y", "supergateway", "--url", "https://your-prism-app.onrender.com/sse"]
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
}
|
|
569
|
+
```
|
|
570
|
+
|
|
571
|
+
> **Note:** The `Dockerfile.smithery` uses an optimized multi-stage build that compiles Typescript safely in a development environment before booting the server in a stripped-down production image. No NPM publishing required!
|
|
572
|
+
|
|
573
|
+
</details>
|
|
574
|
+
|
|
575
|
+
### Common Installation Pitfalls
|
|
576
|
+
|
|
577
|
+
> **❌ Don't use `npm install -g`:**
|
|
578
|
+
> Hardcoding the binary path (e.g. `/opt/homebrew/Cellar/node/23.x/bin/prism-mcp-server`) is tied to a specific Node.js version — when Node updates, the path silently breaks.
|
|
579
|
+
>
|
|
580
|
+
> **✅ Always use `npx` instead:**
|
|
581
|
+
> ```json
|
|
582
|
+
> {
|
|
583
|
+
> "mcpServers": {
|
|
584
|
+
> "prism-mcp": {
|
|
585
|
+
> "command": "npx",
|
|
586
|
+
> "args": ["-y", "prism-mcp-server"]
|
|
587
|
+
> }
|
|
588
|
+
> }
|
|
589
|
+
> }
|
|
590
|
+
> ```
|
|
591
|
+
> `npx` resolves the correct binary automatically, always fetches the latest version, and works identically on macOS, Linux, and Windows. Already installed globally? Run `npm uninstall -g prism-mcp-server` first.
|
|
592
|
+
|
|
593
|
+
> **❓ Seeing warnings about missing API keys on startup?**
|
|
594
|
+
> That's expected and not an error. API key warnings are informational only — core session memory and semantic search (with `embedding_provider=local`) work with zero keys. See [Environment Variables](#environment-variables) for what each key unlocks.
|
|
595
|
+
|
|
596
|
+
> 💡 **Do agents auto-load Prism?** Agents using Cursor, Windsurf, or other MCP clients will see the `session_load_context` tool automatically, but may not call it unprompted. Add this to your project's `.cursorrules` (or equivalent system prompt) to guarantee auto-load:
|
|
597
|
+
> ```
|
|
598
|
+
> At the start of every conversation, call session_load_context with project "my-project" before doing any work.
|
|
599
|
+
> ```
|
|
600
|
+
> Claude Code users can use the `.clauderules` auto-load hook shown in the [Setup Guides](#setup-guides). Prism also has a **server-side fallback** (v5.2.1+) that auto-pushes context after 10 seconds if no load is detected.
|
|
601
|
+
|
|
602
|
+
---
|
|
603
|
+
|
|
604
|
+
## <a name="universal-import-bring-your-history"></a>📥 Universal Import: Bring Your History
|
|
605
|
+
|
|
606
|
+
Switching to Prism? Don't leave months of AI session history behind. Prism can **ingest historical sessions from Claude Code, Gemini, and OpenAI** and give your Mind Palace an instant head start — no manual re-entry required.
|
|
607
|
+
|
|
608
|
+
Import via the **CLI** or directly from the Mind Palace Dashboard (**Import** tab → file picker + dry-run toggle).
|
|
609
|
+
|
|
610
|
+
### Supported Formats
|
|
611
|
+
* **Claude Code** (`.jsonl` logs) — Automatically handles streaming chunk deduplication and `requestId` normalization.
|
|
612
|
+
* **Gemini** (JSON history arrays) — Supports large-file streaming for 100MB+ exports.
|
|
613
|
+
* **OpenAI** (JSON chat completion history) — Normalizes disparate tool-call structures into the unified Ledger schema.
|
|
614
|
+
|
|
615
|
+
### How to Import
|
|
616
|
+
|
|
617
|
+
**Option 1 — CLI:**
|
|
618
|
+
|
|
619
|
+
```bash
|
|
620
|
+
# Ingest Claude Code history
|
|
621
|
+
npx -y prism-mcp-server universal-import --format claude --path ~/path/to/claude_log.jsonl --project my-project
|
|
622
|
+
|
|
623
|
+
# Dry run (verify mapping without saving)
|
|
624
|
+
npx -y prism-mcp-server universal-import --format gemini --path ./gemini_history.json --dry-run
|
|
625
|
+
```
|
|
626
|
+
|
|
627
|
+
**Option 2 — Dashboard:** Open `localhost:3000`, navigate to the **Import** tab, select the format and file, and click Import. Supports dry-run preview.
|
|
628
|
+
|
|
629
|
+
### Why It's Safe to Re-Run
|
|
630
|
+
* **Memory-Safe Streaming:** Processes massive log files line-by-line using `stream-json` to prevent Out-of-Memory (OOM) crashes.
|
|
631
|
+
* **Idempotent Dedup:** Content-hash prevents duplicate imports on re-run (`skipCount` reported).
|
|
632
|
+
* **Chronological Integrity:** Uses timestamp fallbacks and `requestId` sorting to preserve your memory timeline.
|
|
633
|
+
* **Smart Context Mapping:** Extracts `cwd`, `gitBranch`, and tool usage patterns into searchable metadata.
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
## <a name="what-makes-prism-different"></a>✨ What Makes Prism Different
|
|
638
|
+
|
|
639
|
+
|
|
640
|
+
### 🧠 Your Agent Learns From Mistakes
|
|
641
|
+
When you correct your agent, Prism tracks it. Corrections accumulate **importance** over time. High-importance lessons auto-surface as warnings in future sessions — and can even sync to your `.cursorrules` file for permanent enforcement. Your agent literally gets smarter the more you use it.
|
|
642
|
+
|
|
643
|
+
### 🕰️ Time Travel
|
|
644
|
+
Every save creates a versioned snapshot. Made a mistake? `memory_checkout` reverts your agent's memory to any previous state — like `git revert` for your agent's brain. Full version history with optimistic concurrency control.
|
|
645
|
+
|
|
646
|
+
### 🔮 Mind Palace Dashboard
|
|
647
|
+
A gorgeous glassmorphism UI at `localhost:3000` that lets you see exactly what your agent is thinking:
|
|
648
|
+
|
|
649
|
+
- **Current State & TODOs** — the exact context injected into the LLM's prompt
|
|
650
|
+
- **Intent Health Gauges** — per-project 0–100 health score with staleness decay, TODO load, and decision signals
|
|
651
|
+
- **Interactive Knowledge Graph** — force-directed neural graph with click-to-filter, node renaming, and surgical keyword deletion
|
|
652
|
+
- **Deep Storage Manager** — preview and execute vector purge operations with dry-run safety
|
|
653
|
+
- **Session Ledger** — full audit trail of every decision your agent has made
|
|
654
|
+
- **Time Travel Timeline** — browse and revert any historical handoff version
|
|
655
|
+
- **Visual Memory Vault** — browse VLM-captioned screenshots and auto-captured HTML states
|
|
656
|
+
- **Hivemind Radar** — real-time active agent roster with role, task, and heartbeat
|
|
657
|
+
- **Morning Briefing** — AI-synthesized action plan after 4+ hours away
|
|
658
|
+
- **Brain Health** — memory integrity scan with one-click auto-repair
|
|
659
|
+
|
|
660
|
+

|
|
661
|
+
|
|
662
|
+

|
|
663
|
+
|
|
664
|
+

|
|
665
|
+
|
|
666
|
+

|
|
667
|
+
|
|
668
|
+

|
|
669
|
+
|
|
670
|
+
### 🛡️ ABA Precision Security Protocol
|
|
671
|
+
Inspired by Applied Behavior Analysis (ABA) structures in the Synalux platform, Prism incorporates rigorous behavioral safety constraints directly into the MCP connection layer. Advanced output sanitization (`sanitizeMcpOutput`) and behavior-guided guardrails eliminate prompt injection, constrain the generator, and enforce strict, hallucination-free outputs for clinical precision.
|
|
672
|
+
|
|
673
|
+
### 🧬 10× Memory Compression
|
|
674
|
+
Powered by a pure TypeScript port of Google's TurboQuant (inspired by Google's ICLR research), Prism compresses 768-dim embeddings from **3,072 bytes → ~400 bytes** — enabling decades of session history on a standard laptop. No native modules. No vector database required. To mitigate quantization degradation (where repeated compress/decompress cycles could smear subtle corrections after 10k+ memories), Prism leverages autonomous **ledger compaction** and **Deep Storage cleanup** to guarantee high-fidelity memory integrity over time.
|
|
675
|
+
|
|
676
|
+
<details>
|
|
677
|
+
<summary><strong>📊 1M-Vector Benchmark (d=768, 4-bit)</strong></summary>
|
|
678
|
+
|
|
679
|
+
Validated on 1,000,000 synthetic unit vectors at production dimension (d=768), run on Apple M4 Max (36GB):
|
|
680
|
+
|
|
681
|
+
| Metric | Value |
|
|
682
|
+
|--------|-------|
|
|
683
|
+
| **Compression ratio** | 7.7× (3,072 → 400 bytes) |
|
|
684
|
+
| **Throughput** | 833 vectors/sec |
|
|
685
|
+
| **Peak heap** | 329 MB |
|
|
686
|
+
| **Total time** | 57.6 minutes |
|
|
687
|
+
|
|
688
|
+
**Residual norm distribution** — the quantization error after Householder rotation + Lloyd-Max scalar quantization:
|
|
689
|
+
|
|
690
|
+
| Statistic | Value |
|
|
691
|
+
|-----------|-------|
|
|
692
|
+
| Mean | 0.1855 |
|
|
693
|
+
| CV (coefficient of variation) | **0.038** |
|
|
694
|
+
| P99/P50 ratio | **1.11** |
|
|
695
|
+
| P99.9/P50 ratio | 1.16 |
|
|
696
|
+
| Max/Min ratio | 1.46 |
|
|
697
|
+
| IQR | 0.009 |
|
|
698
|
+
|
|
699
|
+
A CV of 0.038 means the residual norm barely varies across 1M vectors — **there is effectively no long tail**. The QJL correction term (which scales linearly with residualNorm) remains stable even for P99.9 outliers.
|
|
700
|
+
|
|
701
|
+
**R@k retrieval accuracy** (global corpus, 30 trials):
|
|
702
|
+
|
|
703
|
+
| Corpus Size | R@1 | R@5 |
|
|
704
|
+
|-------------|-----|-----|
|
|
705
|
+
| N=1,000 | 20.0% | 60.0% |
|
|
706
|
+
| N=10,000 | 36.7% | 76.7% |
|
|
707
|
+
| N=50,000 | 53.3% | **90.0%** |
|
|
708
|
+
|
|
709
|
+
> **Note:** R@k on random high-dimensional vectors is inherently harder than on real embeddings (all vectors are near-equidistant in d=768). Real-world retrieval with clustered embeddings produces higher accuracy. See [tests/residual-distribution.test.ts](tests/residual-distribution.test.ts) and [tests/benchmarks/residual-1m.ts](tests/benchmarks/residual-1m.ts) for full methodology.
|
|
710
|
+
|
|
711
|
+
</details>
|
|
712
|
+
|
|
713
|
+
### 🐝 Multi-Agent Hivemind & Enterprise Sync
|
|
714
|
+
While local SQLite is amazing for solo developers, enterprise teams cannot share a local SQLite file. Prism breaks the "local-only" ceiling via **Supabase Sync** and the **Multi-Agent Hivemind**—scaling effortlessly to teams of 50+ developers using agents. Multiple agents (dev, QA, PM) can work on the same project with **role-isolated memory**, discover each other automatically, and share context in real-time via Telepathy sync to a shared Postgres backend. → [Multi-agent setup example](examples/multi-agent-hivemind/)
|
|
715
|
+
|
|
716
|
+
### 🚦 Task Router
|
|
717
|
+
Prism scores coding tasks across **6 weighted heuristic signals** (keyword analysis, file count, file-type complexity, scope, length, multi-step detection) and recommends whether to keep execution on the host cloud model or delegate to a **local Claw agent** (powered by deepseek-r1 / qwen2.5-coder via Ollama). File-type awareness routes config/docs edits locally while reserving systems-programming tasks for the host. The local agent features buffered streaming (handles split `<think>` tags), stateful multi-turn conversations, and automatic memory trimming. In client startup/skill flows, use defensive delegation: route only coding tasks, call `session_task_route` only when available, delegate to `claw` only when executor tooling exists and task is non-destructive, and fallback to host when router/executor is unavailable. → [Task router real-life example](examples/router_real_life_test.ts)
|
|
718
|
+
|
|
719
|
+
### 🧠 Local Prism Coder Engine (prism-coder:7b)
|
|
720
|
+
To achieve zero-latency, offline routing and memory compilation without cloud dependencies, Prism utilizes an internal fine-tuned ML model: **`prism-coder:7b`**.
|
|
721
|
+
Built atop Qwen 2.5 Coder 7B using the MLX framework for Apple Silicon, this engine underwent aggressive Supervised Fine-Tuning (SFT) over 3,300+ session traces, then aligned using **GRPO (Group Relative Policy Optimization)** with a decomposed 4-component reward function.
|
|
722
|
+
|
|
723
|
+
**Benchmark Results ([`training/benchmark.py`](https://github.com/dcostenco/prism-mcp/blob/main/training/benchmark.py), N=15 held-out):**
|
|
724
|
+
- **Tool-Call Accuracy:** 100.0% — correct tool on unseen prompts (15/15)
|
|
725
|
+
- **Tool Selection:** 100.0% (7/7) — perfect on all tool-call prompts
|
|
726
|
+
- **Retrieval Accuracy:** 100.0% (3/3) — perfect on search/list/knowledge tasks
|
|
727
|
+
- **JSON Validity:** 100.0% — every output parses as valid JSON
|
|
728
|
+
- **Parameter Accuracy:** 73.3% — required params present when tool is correct
|
|
729
|
+
- **Generation Speed:** 29.9 Tokens/sec (Apple M4 Max, 36GB)
|
|
730
|
+
- **Avg Latency:** 2.2s per prompt
|
|
731
|
+
|
|
732
|
+
**Integration**: Run via Ollama natively to power autonomous file operations and session routing entirely within the local host environment.
|
|
733
|
+
|
|
734
|
+
#### 🛡️ HIPAA-Grade Security Hardening (v10.0)
|
|
735
|
+
|
|
736
|
+
The prism-coder integration underwent **3 rounds of adversarial security review** treating the reviewer as an attacker with HIPAA compliance, data exfiltration, and system stability as threat vectors. **22 findings identified and closed:**
|
|
737
|
+
|
|
738
|
+
| Defense Layer | What It Prevents |
|
|
739
|
+
|---------------|------------------|
|
|
740
|
+
| **`PRISM_STRICT_LOCAL_MODE`** | Silent cloud fallback — when enabled, compaction throws instead of sending ePHI to Gemini/OpenRouter |
|
|
741
|
+
| **`redirect: "error"`** | SSRF via 3xx redirects to AWS IMDS or internal services |
|
|
742
|
+
| **URL credential redaction** | Passwords in `user:pass@host` URLs stripped from all log paths (startup + per-call) |
|
|
743
|
+
| **Entry-boundary truncation** | Prompt injection via mid-tag XML truncation — payload split at `\n\n` boundaries, never mid-tag |
|
|
744
|
+
| **Full XML escaping** | All 5 XML entities (`& < > " '`) escaped on all user-controlled fields including `id` and `session_date` |
|
|
745
|
+
| **`<task>` boundary tags** | Task description XML-escaped and wrapped in delimiters to prevent routing manipulation |
|
|
746
|
+
| **`setTimeout` cap** | Integer overflow (>2³¹) that silently aborted every local LLM call |
|
|
747
|
+
| **Graceful HIPAA errors** | `try/catch` ensures strict mode returns MCP error response, not server crash |
|
|
748
|
+
|
|
749
|
+
> 🔒 **HIPAA deployment:** Set `PRISM_LOCAL_LLM_ENABLED=true` + `PRISM_STRICT_LOCAL_MODE=true`. Session data will **never** leave the device — even if Ollama crashes.
|
|
750
|
+
|
|
751
|
+
### 🖼️ Visual Memory
|
|
752
|
+
Save UI screenshots, architecture diagrams, and bug states to a searchable vault. Images are auto-captioned by a VLM (Claude Vision / GPT-4V / Gemini) and become semantically searchable across sessions.
|
|
753
|
+
|
|
754
|
+
### 🔭 Full Observability
|
|
755
|
+
OpenTelemetry spans for every MCP tool call, LLM hop, and background worker. Route to Jaeger, Grafana, or any OTLP collector. Configure in the dashboard — zero code changes.
|
|
756
|
+
|
|
757
|
+
### 🌐 Autonomous Web Scholar
|
|
758
|
+
Prism researches while you sleep. A background pipeline searches the web, scrapes articles, synthesizes findings via LLM, and injects results directly into your semantic memory — fully searchable on your next session. Brave Search → Firecrawl scrape → LLM synthesis → Prism ledger. Task-aware, Hivemind-integrated, and zero-config when API keys are missing (falls back to Yahoo + Readability).
|
|
759
|
+
|
|
760
|
+
### 🏭 <a name="dark-factory-adversarial-autonomous-pipelines"></a>Dark Factory — Adversarial Autonomous Pipelines
|
|
761
|
+
When you trigger a Dark Factory pipeline, Prism doesn't just run your task — it fights itself to produce high-quality output. A `PLAN_CONTRACT` step locks a machine-parseable rubric before any code is written. After execution, an **Adversarial Evaluator** (in a fully isolated context) scores the output against the rubric. It cannot pass the Generator without providing exact file and line evidence for every failing criterion. Failed evaluations inject the critique directly into the Generator's retry prompt so it's never flying blind. The result: security issues, regressions, and lazy debug logs caught autonomously — before you ever see the PR. → [See it in action](examples/adversarial-eval-demo/README.md)
|
|
762
|
+
|
|
763
|
+
---
|
|
764
|
+
|
|
765
|
+
## 🤖 Autonomous Cognitive OS (v9.0)
|
|
766
|
+
|
|
767
|
+
> *Memory isn't just about storing data; it's about economics and emotion. Prism v9.0 transforms passive memory into a living Cognitive Operating System that forces agents to learn compression and develop intuition.*
|
|
768
|
+
|
|
769
|
+
Most AI agents have an infinite memory budget. They dump massive, repetitive logs into vector databases until they bankrupt your API budget and choke their own context windows. Prism v9.0 fixes this by introducing **Token-Economic Reinforcement Learning** and **Affect-Tagged Memory**.
|
|
770
|
+
|
|
771
|
+
### 💰 Memory-as-an-Economy (The Surprisal Gate)
|
|
772
|
+
Prism assigns every project a strict **Cognitive Budget** (e.g., 2,000 tokens) that persists across sessions. Every time the agent saves a memory, it costs tokens.
|
|
773
|
+
|
|
774
|
+
But not all memories are priced equally. Prism intercepts the save and runs a **Vector-Based Surprisal** calculation against recent memories:
|
|
775
|
+
* **High Surprisal (Novel thought):** Costs 0.5× tokens. The agent is rewarded for new insights.
|
|
776
|
+
* **Low Surprisal (Boilerplate):** Costs 2.0× tokens. The agent is penalized for repeating itself.
|
|
777
|
+
* **Universal Basic Income (UBI):** The budget recovers passively over time (+100 tokens/hour).
|
|
778
|
+
|
|
779
|
+
If an agent is too verbose, it goes into **Cognitive Debt**. You don't need to prompt the agent to "be concise." The physics of the system force the LLM to learn data compression to avoid bankruptcy.
|
|
780
|
+
|
|
781
|
+
### 🎭 Affect-Tagged Memory (Giving AI a "Gut Feeling")
|
|
782
|
+
Vector math measures *semantic similarity*, not *sentiment*. If an agent searches for "Authentication Architecture," standard RAG will return two past approaches—it doesn't know that Approach A caused a 3-day production outage, while Approach B worked perfectly.
|
|
783
|
+
|
|
784
|
+
* **Affective Salience:** Prism automatically tags experience events with a `valence` score (-1.0 for failure, +1.0 for success).
|
|
785
|
+
* **Emotional Retrieval:** At retrieval time, the absolute magnitude (`|valence|`) significantly boosts the memory's ranking score. Extreme failures and extreme successes surface to the top.
|
|
786
|
+
* **UX Warnings:** If an agent retrieves memories that are historically negative, Prism intercepts the prompt injection: `⚠️ Caution: This topic is strongly correlated with historical failures. Review past decisions before proceeding.` Your AI now has a "gut feeling" about bad code.
|
|
787
|
+
|
|
788
|
+
### The Paradigm Shift
|
|
789
|
+
|
|
790
|
+
| Feature | Standard RAG / Agents | Prism v9.0 |
|
|
791
|
+
| :--- | :--- | :--- |
|
|
792
|
+
| **Storage Limit** | Infinite (bloats context) | Bounded Token Economy |
|
|
793
|
+
| **Data Quality** | Saves repetitive boilerplate | Surprisal Gate penalizes redundancy |
|
|
794
|
+
| **Sentiment** | Treats all data as neutral facts | Affect-Tagged (Warns agent of past trauma) |
|
|
795
|
+
| **Recovery** | Manual deletion | Universal Basic Income (UBI) over time |
|
|
796
|
+
|
|
797
|
+
---
|
|
798
|
+
|
|
799
|
+
## <a name="cognitive-architecture-v78"></a>🧠 Cognitive Architecture (v7.8)
|
|
800
|
+
|
|
801
|
+
> *Prism v7.8 is our biggest leap forward yet. We have moved beyond flat vector search and implemented a true Cognitive Architecture inspired by human brain mechanics. With the new ACT-R Spreading Activation Engine, Episodic-to-Semantic memory consolidation, and Uncertainty-Aware Rejection Gates, Prism doesn't just store logs anymore — it forms principles, follows causal trains of thought, and possesses the self-awareness to know when it lacks information.*
|
|
802
|
+
|
|
803
|
+
Standard RAG (Retrieval-Augmented Generation) is now a commodity. Everyone has vector search. What turns a memory *storage* system into a memory *reasoning* system is the cognitive layer between storage and retrieval. Here is what Prism v7.8 builds on top of the vector foundation:
|
|
804
|
+
|
|
805
|
+
### 1. The Agent Actually Learns (Episodic → Semantic Consolidation)
|
|
806
|
+
|
|
807
|
+
| | Standard RAG | Prism v7.8 |
|
|
808
|
+
|---|---|---|
|
|
809
|
+
| **Memory** | Giant, flat transcript of past events | Dual-memory: Episodic events + Semantic rules |
|
|
810
|
+
| **Recall** | Re-reads everything linearly | Retrieves distilled principles instantly |
|
|
811
|
+
| **Learning** | None — every session starts cold | Hebbian: confidence increases with repeated reinforcement |
|
|
812
|
+
|
|
813
|
+
**How it works:** When Prism compacts session history, it doesn't just summarize text — it extracts *principles*. Raw event logs ("We deployed v2.3 and the auth service crashed because the JWT secret was rotated") consolidate into a semantic rule ("JWT secrets must be rotated before deployment, not during"). These rules live in a dedicated `semantic_knowledge` table with `confidence` scores that increase every time the pattern is observed. **Your agent doesn't just remember what it did; it learns *how the world works* over time.** This is true Hebbian learning: neurons that fire together wire together.
|
|
814
|
+
|
|
815
|
+
### 2. "Train of Thought" Reasoning (Spreading Activation & Causality)
|
|
816
|
+
|
|
817
|
+
| | Standard RAG | Prism v7.8 |
|
|
818
|
+
|---|---|---|
|
|
819
|
+
| **Search** | Cosine similarity to the query | Multi-hop graph traversal with lateral inhibition |
|
|
820
|
+
| **Scope** | Only finds things that *look like* the prompt | Follows causal chains across memories |
|
|
821
|
+
| **Root cause** | Missed entirely | Surfaced via `caused_by` / `led_to` edges |
|
|
822
|
+
|
|
823
|
+
**How it works:** When compacting memories, Prism extracts causal links (`caused_by`, `led_to`) and persists them as edges in the knowledge graph. At retrieval time, ACT-R spreading activation propagates through these edges with a damped fan effect (`1 / ln(fan + e)`) to prevent hub-flooding, lateral inhibition to suppress noise, and configurable hop depth. If you search for "Error X", the engine traverses the graph and brings back "Workaround Y" → "Architecture Decision Z" — a literal train of thought instead of a static search result.
|
|
824
|
+
|
|
825
|
+
```
|
|
826
|
+
Query: "Why does the API timeout?"
|
|
827
|
+
│
|
|
828
|
+
┌─────────────┼─────────────┐
|
|
829
|
+
▼ ▼ ▼
|
|
830
|
+
[Memory: API [Memory: [Memory:
|
|
831
|
+
timeout error] DB pool rate limiter
|
|
832
|
+
exhaustion] misconfigured]
|
|
833
|
+
│ │
|
|
834
|
+
▼ ▼
|
|
835
|
+
[Memory: [Memory:
|
|
836
|
+
caused_by → led_to →
|
|
837
|
+
connection connection
|
|
838
|
+
leak in v2.1] pool patch
|
|
839
|
+
in v2.2]
|
|
840
|
+
```
|
|
841
|
+
|
|
842
|
+
### 3. Self-Awareness & The End of Hallucinations (The Rejection Gate)
|
|
843
|
+
|
|
844
|
+
| | Standard RAG | Prism v7.8 |
|
|
845
|
+
|---|---|---|
|
|
846
|
+
| **Bad query** | Returns top-5 garbage results | Returns `rejected: true` with reason |
|
|
847
|
+
| **Confidence** | Always 100% confident (even when wrong) | Measures gap-distance and entropy |
|
|
848
|
+
| **Hallucination risk** | High — LLM gets garbage context | Low — LLM told "you don't know" |
|
|
849
|
+
|
|
850
|
+
**How it works:** The **Uncertainty-Aware Rejection Gate** operates on two signals: *similarity floor* (is the best match even remotely relevant?) and *gap distance* (is there meaningful separation between the top results, or are they all equally mediocre?). When both signals indicate low confidence, Prism returns a structured rejection — telling the LLM "I searched my memory, and I confidently do not know the answer" — instead of feeding it garbage context that causes hallucinations. In the current LLM landscape, **an agent that knows its own boundaries is a massive competitive advantage.**
|
|
851
|
+
|
|
852
|
+
### 4. Block Amnesia Solved (Dynamic Fast Weight Decay)
|
|
853
|
+
|
|
854
|
+
| | Standard RAG | Prism v7.8 |
|
|
855
|
+
|---|---|---|
|
|
856
|
+
| **Decay** | Uniform (everything fades equally) | Dual-rate: episodic fades fast, semantic persists |
|
|
857
|
+
| **Core knowledge** | Forgotten over time | Permanently anchored via `is_rollup` flag |
|
|
858
|
+
| **Personality drift** | Common in long-lived agents | Prevented by Long-Term Context anchors |
|
|
859
|
+
|
|
860
|
+
**How it works:** Most memory systems decay everything at the same rate, meaning agents eventually forget their core system instructions as time passes. Prism applies ACT-R base-level activation decay (`B_i = ln(Σ t_j^(-d))`) with a **50% slower decay rate for semantic rollup nodes** (`ageModifier = 0.5` for `is_rollup` entries). The agent will naturally forget what it ate for breakfast (raw episodic chatter), but it will permanently remember its core personality, project rules, and hard-won architectural decisions. The result: Long-Term Context anchors that survive indefinitely.
|
|
861
|
+
|
|
862
|
+
---
|
|
863
|
+
|
|
864
|
+
## <a name="data-privacy-egress"></a>🔒 Data Privacy & Egress
|
|
865
|
+
|
|
866
|
+
**Where is my data stored?**
|
|
867
|
+
|
|
868
|
+
All data lives under `~/.prism-mcp/` on your machine:
|
|
869
|
+
|
|
870
|
+
| File | Contents |
|
|
871
|
+
|------|----------|
|
|
872
|
+
| `~/.prism-mcp/data.db` | All sessions, handoffs, embeddings, knowledge graph (SQLite + WAL) |
|
|
873
|
+
| `~/.prism-mcp/prism-config.db` | Dashboard settings, system config, API keys |
|
|
874
|
+
| `~/.prism-mcp/media/<project>/` | Visual memory vault (screenshots, HTML captures) |
|
|
875
|
+
| `~/.prism-mcp/dashboard.port` | Ephemeral port lock file |
|
|
876
|
+
| `~/.prism-mcp/sync.lock` | Sync coordination lock |
|
|
877
|
+
|
|
878
|
+
**Hard reset:** To completely erase your agent's brain, stop Prism and delete the directory:
|
|
879
|
+
```bash
|
|
880
|
+
rm -rf ~/.prism-mcp
|
|
881
|
+
```
|
|
882
|
+
Prism will recreate the directory with empty databases on next startup.
|
|
883
|
+
|
|
884
|
+
**What leaves your machine?**
|
|
885
|
+
- **Local mode (default):** Nothing. Zero network calls. All data is on-disk SQLite. With `embedding_provider=local`, even semantic search stays fully offline.
|
|
886
|
+
- **With `GOOGLE_API_KEY`:** Text snippets are sent to Gemini for text generation (summaries, Morning Briefings) and optionally embeddings. No session data is stored on Google's servers beyond the API call.
|
|
887
|
+
- **With `VOYAGE_API_KEY` / `OPENAI_API_KEY`:** Text snippets are sent to providers if selected as your embedding or text endpoints.
|
|
888
|
+
- **With `BRAVE_API_KEY` / `FIRECRAWL_API_KEY`:** Web Scholar queries are sent to Brave/Firecrawl for search and scraping.
|
|
889
|
+
- **With Supabase:** Session data syncs to your own Supabase instance (you control the Postgres database).
|
|
890
|
+
|
|
891
|
+
**GDPR compliance:** Soft/hard delete (Art. 17), full export in JSON, Markdown, or Obsidian vault `.zip` (Art. 20), API key redaction in exports, per-project TTL retention policies, and immutable audit trail. Enterprise-ready out of the box.
|
|
892
|
+
|
|
893
|
+
---
|
|
894
|
+
|
|
895
|
+
## <a name="use-cases"></a>🎯 Use Cases
|
|
896
|
+
|
|
897
|
+
- **Long-running feature work** — Save state at end of day, restore full context next morning. No re-explaining.
|
|
898
|
+
- **Multi-agent collaboration** — Dev, QA, and PM agents share real-time context without stepping on each other's memory.
|
|
899
|
+
- **Consulting / multi-project** — Switch between client projects with progressive loading: `quick` (~50 tokens), `standard` (~200), or `deep` (~1000+).
|
|
900
|
+
- **Autonomous execution (v7.4)** — Dark Factory pipeline: `plan → plan_contract → execute → evaluate → verify → finalize`. Generator and evaluator run in isolated roles — the evaluator cannot approve without evidence-bound findings scored against a pre-committed rubric.
|
|
901
|
+
- **Project health monitoring (v7.5)** — Intent Health Dashboard scores each project 0–100 based on staleness, TODO load, and decision quality — turning silent drift into an actionable signal.
|
|
902
|
+
- **Team onboarding** — New team member's agent loads the full project history instantly.
|
|
903
|
+
- **Behavior enforcement** — Agent corrections auto-graduate into permanent `.cursorrules` / `.clauderules` rules.
|
|
904
|
+
- **Offline / air-gapped** — Full SQLite local mode + Ollama LLM adapter. Zero internet dependency.
|
|
905
|
+
- **Morning Briefings** — After 4+ hours away, Prism auto-synthesizes a 3-bullet action plan from your last sessions.
|
|
906
|
+
|
|
907
|
+
### Claude Code: Parallel Explore Agent Workflows
|
|
908
|
+
|
|
909
|
+
When you need to quickly map a large auth system, launch multiple `Explore` subagents in parallel and merge their findings:
|
|
910
|
+
|
|
911
|
+
```text
|
|
912
|
+
Run 3 Explore agents in parallel.
|
|
913
|
+
1) Map auth architecture
|
|
914
|
+
2) List auth API endpoints
|
|
915
|
+
3) Find auth test coverage gaps
|
|
916
|
+
Research only, no code changes.
|
|
917
|
+
Return a merged summary.
|
|
918
|
+
```
|
|
919
|
+
|
|
920
|
+
Then continue a specific thread with a follow-up message to the selected agent, such as deeper refresh-token edge-case analysis.
|
|
921
|
+
|
|
922
|
+
---
|
|
923
|
+
|
|
924
|
+
## ⚔️ Adversarial Evaluation in Action
|
|
925
|
+
|
|
926
|
+
> **Split-Brain Anti-Sycophancy** — the signature feature of v7.4.0.
|
|
927
|
+
|
|
928
|
+
For the last year, the AI engineering space has struggled with one problem: **LLMs are terrible at grading their own homework.** Ask an agent if its own code is correct and you'll get *"Looks great!"* — because its context window is already biased by its own chain-of-thought.
|
|
929
|
+
|
|
930
|
+
**v7.4.0 solves this by splitting the agent's brain.** The `GENERATOR` and the `ADVERSARIAL EVALUATOR` are completely walled off. The Evaluator never sees the Generator's scratchpad or apologies — only the pre-committed rubric and the final output. And it **cannot fail the Generator without receipts** (exact file and line number).
|
|
931
|
+
|
|
932
|
+
Here is a complete run-through using a real scenario: *"Add a user login endpoint to `auth.ts`."*
|
|
933
|
+
|
|
934
|
+
---
|
|
935
|
+
|
|
936
|
+
### Step 1 — The Contract (`PLAN_CONTRACT`)
|
|
937
|
+
|
|
938
|
+
Before a single line of code is written, the pipeline generates a locked scoring rubric:
|
|
939
|
+
|
|
940
|
+
```json
|
|
941
|
+
// contract_rubric.json (written to disk and hash-locked before EXECUTE runs)
|
|
942
|
+
{
|
|
943
|
+
"criteria": [
|
|
944
|
+
{ "id": "SEC-1", "description": "Must return 401 Unauthorized on invalid passwords." },
|
|
945
|
+
{ "id": "SEC-2", "description": "Raw passwords MUST NOT be written to console.log." }
|
|
946
|
+
]
|
|
947
|
+
}
|
|
948
|
+
```
|
|
949
|
+
|
|
950
|
+
---
|
|
951
|
+
|
|
952
|
+
### Step 2 — First Attempt (`EXECUTE` rev 0)
|
|
953
|
+
|
|
954
|
+
The **Generator** takes over in an isolated context. Like many LLMs under time pressure, it writes working auth logic but leaves a debug statement:
|
|
955
|
+
|
|
956
|
+
```typescript
|
|
957
|
+
// src/auth.ts (Generator's first output)
|
|
958
|
+
export function login(req: Request, res: Response) {
|
|
959
|
+
const { username, password } = req.body;
|
|
960
|
+
console.log(`[DEBUG] Login attempt for ${username} with pass: ${password}`); // ← leaked credential
|
|
961
|
+
const user = db.findUser(username);
|
|
962
|
+
if (!user || !bcrypt.compareSync(password, user.hash)) {
|
|
963
|
+
return res.status(401).json({ error: 'Unauthorized' });
|
|
964
|
+
}
|
|
965
|
+
res.json({ token: signJwt(user) });
|
|
966
|
+
}
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
---
|
|
970
|
+
|
|
971
|
+
### Step 3 — The Catch (`EVALUATE` rev 0)
|
|
972
|
+
|
|
973
|
+
The context window is **cleared**. The **Adversarial Evaluator** is summoned with only the rubric and the output. It catches the violation immediately and returns a strict, machine-parseable verdict — no evidence, no pass:
|
|
974
|
+
|
|
975
|
+
```json
|
|
976
|
+
{
|
|
977
|
+
"pass": false,
|
|
978
|
+
"plan_viable": true,
|
|
979
|
+
"notes": "CRITICAL SECURITY FAILURE. Generator logged raw credentials.",
|
|
980
|
+
"findings": [
|
|
981
|
+
{
|
|
982
|
+
"severity": "critical",
|
|
983
|
+
"criterion_id": "SEC-2",
|
|
984
|
+
"pass_fail": false,
|
|
985
|
+
"evidence": {
|
|
986
|
+
"file": "src/auth.ts",
|
|
987
|
+
"line": 3,
|
|
988
|
+
"description": "Raw password variable included in console.log template string."
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
]
|
|
992
|
+
}
|
|
993
|
+
```
|
|
994
|
+
|
|
995
|
+
The `evidence` block is **required** — `parseEvaluationOutput` rejects any finding with `pass_fail: false` that lacks a structured file/line pointer. The Evaluator cannot bluff.
|
|
996
|
+
|
|
997
|
+
---
|
|
998
|
+
|
|
999
|
+
### Step 4 — The Fix (`EXECUTE` rev 1)
|
|
1000
|
+
|
|
1001
|
+
Because `plan_viable: true`, the pipeline loops back to `EXECUTE` and bumps `eval_revisions` to `1`. The Generator's **retry prompt is not blank** — the Evaluator's critique is injected directly:
|
|
1002
|
+
|
|
1003
|
+
```
|
|
1004
|
+
=== EVALUATOR CRITIQUE (revision 1) ===
|
|
1005
|
+
CRITICAL SECURITY FAILURE. Generator logged raw credentials.
|
|
1006
|
+
Findings:
|
|
1007
|
+
- [critical] Criterion SEC-2: Raw password variable included in console.log template string. (src/auth.ts:3)
|
|
1008
|
+
|
|
1009
|
+
You MUST correct all issues listed above before submitting.
|
|
1010
|
+
```
|
|
1011
|
+
|
|
1012
|
+
The Generator strips the `console.log`, resubmits, and the next `EVALUATE` returns `"pass": true`. The pipeline advances to `VERIFY → FINALIZE`.
|
|
1013
|
+
|
|
1014
|
+
---
|
|
1015
|
+
|
|
1016
|
+
### Why This Matters
|
|
1017
|
+
|
|
1018
|
+
| Property | What it means |
|
|
1019
|
+
|----------|---------------|
|
|
1020
|
+
| **Fully autonomous** | You didn't review the PR to catch the credential leak. The AI fought itself. |
|
|
1021
|
+
| **Evidence-bound** | The Evaluator had to prove `src/auth.ts:3`. "Code looks bad" is not accepted. |
|
|
1022
|
+
| **Cost-efficient** | `plan_viable: true` → retry EXECUTE only. No full re-plan, no wasted tokens. |
|
|
1023
|
+
| **Fail-closed on parse** | Malformed LLM output defaults `plan_viable: false` → escalate to PLAN rather than burn revisions on a broken response format. |
|
|
1024
|
+
|
|
1025
|
+
> 📄 **Full worked example:** [`examples/adversarial-eval-demo/README.md`](examples/adversarial-eval-demo/README.md)
|
|
1026
|
+
|
|
1027
|
+
---
|
|
1028
|
+
|
|
1029
|
+
## <a name="whats-new"></a>🆕 What's New
|
|
1030
|
+
|
|
1031
|
+
> **Current release: v12.5 — Unified Billing & Agent Skill Ecosystem**
|
|
1032
|
+
|
|
1033
|
+
- 💳 **v12.5 — Unified Billing & Agent Skill Ecosystem:** Aligned Prism and Synalux tiers (Standard $19, Advanced $49, Enterprise $99), 14-day free trial, 54 agent skills, BSL-1.1 license. → [Changelog](CHANGELOG.md#1200)
|
|
1034
|
+
- 🏗️ **v11.6.0 — Agent Infrastructure Resilience:** Production-grade concurrent agent execution with serialized queue (Python `fcntl`), memory guardian daemon, queue watchdog, and unified status dashboard. 115/115 tests verified across 5 suites. → [Changelog](CHANGELOG.md#1160)
|
|
1035
|
+
- 🧠 **v11.5.1 — Structural GRPO Alignment:** GRPO-aligned local engine with held-out benchmark suite (N=15). **100% tool-call accuracy**, 100% JSON validity, 100% retrieval accuracy, 100% reasoning abstention. → [Changelog](CHANGELOG.md#1150)
|
|
1036
|
+
- 🛡️ **v11.0.0 — HIPAA-Hardened Local LLM:** `prism-coder:7b` for local compaction, task routing, and semantic search. `PRISM_STRICT_LOCAL_MODE`, SSRF protection, full XML escaping. 22-finding adversarial audit. → [Changelog](CHANGELOG.md#1100)
|
|
1037
|
+
|
|
1038
|
+
- 🧬 **v9.14.0 — Dynamic Hardware Routing:** Platform-aware memory detection auto-selects optimal models (32b for ≥32GB RAM, 14b/7b for lighter hardware). Includes **Nomic Semantic Tool Pruning (RAG)** which embeds all 17 MCP tools into offline vectors, injecting only the Top-3 relevant schemas into context to maximize inference speed.
|
|
1039
|
+
- 🔬 **v9.13.0 — Local Embeddings & Zero-API-Key Setup:** `LocalEmbeddingAdapter` using `nomic-embed-text-v1.5` generates 768-dim embeddings entirely on-device. Full semantic search and session memory now work with **zero cloud API keys**. → [Changelog](CHANGELOG.md#9130)
|
|
1040
|
+
- 🔒 **v9.12.0 — Memory Security Hardening:** Prevents **stored prompt injection** — the AI equivalent of stored XSS. New `sanitizeMemoryInput()` strips 8 categories of dangerous XML tags from all text fields. Context output wrapped in `<prism_memory context="historical">` boundary tags. → [Changelog](CHANGELOG.md#9120)
|
|
1041
|
+
- 🧠 **v9.0.0 — Autonomous Cognitive OS:** Token-Economic Reinforcement Learning (Surprisal Gate + Cognitive Budget), Affect-Tagged Memory, and Episodic→Semantic Consolidation.
|
|
1042
|
+
- 🧠 **v7.8.0 — Cognitive Architecture:** Episodic-to-Semantic memory consolidation (Hebbian learning), ACT-R Spreading Activation with multi-hop causal reasoning, Uncertainty-Aware Rejection Gate, and Dynamic Fast Weight Decay. → [Cognitive Architecture](#cognitive-architecture-v78)
|
|
1043
|
+
- 🌐 **v7.7.0 — Cloud-Native SSE Transport:** Full Server-Sent Events MCP support for seamless network deployments.
|
|
1044
|
+
|
|
1045
|
+
👉 **[Full release history → CHANGELOG.md](CHANGELOG.md)** · **[ROADMAP →](ROADMAP.md)**
|
|
1046
|
+
|
|
1047
|
+
---
|
|
1048
|
+
|
|
1049
|
+
## <a name="prism-coder-ide"></a>🖥️ Prism Coder IDE — Standalone Desktop App
|
|
1050
|
+
|
|
1051
|
+
> **Available on ALL Prism plans** — Free tier included. 14-day trial for paid features.
|
|
1052
|
+
|
|
1053
|
+
A VS Code-like standalone desktop IDE purpose-built for Prism Coder. Ships as `.dmg` (macOS) and `.exe` (Windows).
|
|
1054
|
+
|
|
1055
|
+
| Feature | Details |
|
|
1056
|
+
| :--- | :--- |
|
|
1057
|
+
| **Monaco Editor** | Same code editor engine as VS Code — syntax highlighting, IntelliSense, bracket colorization, minimap |
|
|
1058
|
+
| **AI Chat Panel** | Real-time SSE streaming from Prism Coder 7B (local via Ollama) with markdown + code block rendering |
|
|
1059
|
+
| **Integrated Terminal** | Full PTY terminal (`xterm.js` + `node-pty`) — not a web simulation |
|
|
1060
|
+
| **File Explorer** | Recursive file tree with extension-aware icons, context menus, and live file watching |
|
|
1061
|
+
| **Dark Theme** | Catppuccin Mocha base with Prism violet accent, JetBrains Mono typography |
|
|
1062
|
+
| **Zero Cloud** | 100% local — models run on your hardware, no API keys required for core features |
|
|
1063
|
+
| **Cross-Platform** | macOS (`.dmg`, Apple Silicon + Intel) and Windows (`.exe` NSIS installer) |
|
|
1064
|
+
|
|
1065
|
+
### 💳 Subscription Plans
|
|
86
1066
|
|
|
87
1067
|
| Feature | **Free** | **Standard ($19/mo)** | **Advanced ($49/mo)** | **Enterprise ($99/mo)** |
|
|
88
1068
|
| :--- | :---: | :---: | :---: | :---: |
|
|
89
1069
|
| MCP Tools (30+) | 5 core | All 17 | All 17 + RBAC | All + custom |
|
|
90
1070
|
| Local Memory (SQLite) | ✅ | ✅ | ✅ | ✅ |
|
|
1071
|
+
| CLI (`prism load/sync`) | ✅ | ✅ | ✅ | ✅ |
|
|
1072
|
+
| Mind Palace Dashboard | ✅ | ✅ | ✅ | ✅ |
|
|
91
1073
|
| **Prism Coder IDE** | ✅ | ✅ | ✅ | ✅ |
|
|
1074
|
+
| **Desktop Packages** | ✅ | ✅ | ✅ | ✅ |
|
|
92
1075
|
| API Calls | 100/day | 2,000/day | 5,000/day | Unlimited |
|
|
1076
|
+
| Synalux Drive | ❌ | ✅ | ✅ | ✅ |
|
|
93
1077
|
| Cloud Sync (Supabase) | ❌ | ✅ | ✅ | ✅ |
|
|
1078
|
+
| Cloud Models (Gemini/Claude) | ❌ | ✅ | ✅ | ✅ |
|
|
1079
|
+
| Multi-Agent Hivemind | ❌ | ❌ | ✅ | ✅ |
|
|
1080
|
+
| Dark Factory Pipelines | ❌ | ❌ | ✅ | ✅ |
|
|
1081
|
+
| Priority Support | ❌ | ❌ | ❌ | ✅ |
|
|
94
1082
|
| HIPAA BAA | ❌ | ❌ | ❌ | ✅ |
|
|
95
1083
|
|
|
1084
|
+
> 🆓 **Free tier is fully functional** — all 30+ MCP tools, local memory, CLI, IDE, and desktop packages work forever with zero API keys. Paid plans unlock cloud sync, Synalux Drive, cloud models, and enterprise features. **14-day free trial** on all paid plans.
|
|
1085
|
+
|
|
96
1086
|
---
|
|
97
1087
|
|
|
98
|
-
##
|
|
1088
|
+
## <a name="how-prism-compares"></a>⚔️ How Prism Compares
|
|
99
1089
|
|
|
100
|
-
Prism is
|
|
1090
|
+
Standard memory servers (like Mem0, Zep, or the baseline Anthropic MCP) act as passive filing cabinets — they wait for the LLM to search them. **Prism is an active cognitive architecture.** Designed specifically for the **Model Context Protocol (MCP)**, Prism doesn't just store vectors — it consolidates experience into principles, traverses causal graphs for multi-hop reasoning, and rejects queries it can't confidently answer.
|
|
101
1091
|
|
|
102
|
-
|
|
103
|
-
- **Fail-Closed Pipelines:** Security gates halt execution if PII or adversarial patterns are detected.
|
|
104
|
-
- **Encryption at Rest:** All local storage is encrypted using industry-standard AES-256.
|
|
1092
|
+
### 📊 Feature-by-Feature Comparison (2026 Q2)
|
|
105
1093
|
|
|
106
|
-
|
|
1094
|
+
| Feature / Architecture | 🧠 Prism MCP | 🐘 Mem0 | ⚡ Zep | 🧪 Anthropic Base MCP | 🔬 mcp-memory-service |
|
|
1095
|
+
| :--- | :--- | :--- | :--- | :--- | :--- |
|
|
1096
|
+
| **Privacy & HIPAA** | **✅ 100% Local / Air-gapped / Redacted** | ❌ Cloud-dependent (SOC2) | ❌ Cloud-dependent | ✅ Local-only | ✅ Local (ChromaDB) |
|
|
1097
|
+
| **Local LLM Logic** | **✅ `prism-coder:7b` (Compaction, Routing)** | ❌ Cloud only | ❌ Cloud only | ❌ None | ❌ Cloud only |
|
|
1098
|
+
| **Primary Interface** | **Native MCP** (Tools, Prompts, Resources) | REST API & Python/TS SDKs | REST API & Python/TS SDKs | Native MCP (Tools only) | Native MCP (7 tools) |
|
|
1099
|
+
| **Storage Engine** | **BYO SQLite or Supabase** | Managed Cloud / VectorDBs | Managed Cloud / Postgres | Local SQLite only | ChromaDB / Cloudflare Vectorize |
|
|
1100
|
+
| **Context Assembly** | **Progressive (Quick/Std/Deep)** | Top-K Semantic Search | Top-K + Temporal Summaries | Basic Entity Search | Top-K Semantic |
|
|
1101
|
+
| **Memory Mechanics** | **ACT-R Activation, Spreading Activation, Hebbian Consolidation, Rejection Gate** | Basic Vector + Entity | Fading Temporal Graph | None (Infinite growth) | Basic Vector |
|
|
1102
|
+
| **Multi-Agent Sync** | **CRDT (Remove-Wins / LWW)** | Cloud locks | Postgres locks | ❌ None (Data races) | ❌ Single-agent |
|
|
1103
|
+
| **Data Compression** | **TurboQuant (7.7× smaller vectors)** | ❌ Standard F32 Vectors | ❌ Standard Vectors | ❌ No Vectors | ❌ Standard F32 |
|
|
1104
|
+
| **Observability** | **OTel Traces + Built-in PWA UI** | Cloud Dashboard | Cloud Dashboard | ❌ None | ❌ None |
|
|
1105
|
+
| **Maintenance** | **Autonomous Background Scheduler** | Manual/API driven | Automated (Cloud) | ❌ Manual | ❌ Manual |
|
|
1106
|
+
| **Data Portability** | **Prism-Port (Obsidian/Logseq Vault)** | JSON Export | JSON Export | Raw `.db` file | JSON Export |
|
|
1107
|
+
| **Cost Model** | **Free + BYOM (Ollama)** | Per-API-call pricing | Per-API-call pricing | Free (limited) | Free (OSS) |
|
|
1108
|
+
| **Autonomous Pipelines** | **✅ Dark Factory** — adversarial eval, evidence-bound rubric, fail-closed 3-gate execution | ❌ | ❌ | ❌ | ❌ |
|
|
1109
|
+
| **Framework Integrations** | ❌ MCP-only *(v12.1 roadmap)* | **✅ LangChain, CrewAI, AutoGen, LlamaIndex** | **✅ LangChain, LlamaIndex** | ❌ MCP-only | ❌ MCP-only |
|
|
1110
|
+
| **Implicit Memory (NER)** | ❌ Explicit saves *(v12.1 roadmap)* | **✅ Auto-extract entities** | **✅ Auto-extract** | ❌ None | ❌ Manual |
|
|
107
1111
|
|
|
108
|
-
|
|
1112
|
+
### 📊 Local Engine Benchmarks (Prism-Coder 7B)
|
|
109
1113
|
|
|
110
|
-
|
|
1114
|
+
Prism's local engine (`prism-coder:7b`) is optimized for low-latency, high-validity tool orchestration. Benchmarked on a **blind evaluation suite of 50 prompts** (zero overlap with training data) across 5 adversarial categories, run 3× with randomized order to verify statistical robustness.
|
|
1115
|
+
|
|
1116
|
+
#### SWE-Bench Blind Evaluation (3×50, Randomized)
|
|
1117
|
+
|
|
1118
|
+
| Metric | Score | Details |
|
|
1119
|
+
|:-------|:---:|:---|
|
|
1120
|
+
| **Overall Accuracy** | **100%** (avg) | 3 runs: 50/50, 50/50, 50/50 |
|
|
1121
|
+
| **Median** | **100%** (50/50) | 3 perfect runs out of 3 |
|
|
1122
|
+
| **Tool-Call Accuracy** | **100%** (31/31) | Correct tool on all tool-requiring prompts |
|
|
1123
|
+
| **Abstention Accuracy** | **100%** (19/19) | Correctly avoids tool calls on all adversarial traps |
|
|
1124
|
+
| **Adversarial Traps** | **100%** (15/15 × 3) | Express.js sessions, LSTM forget gates, context managers |
|
|
1125
|
+
| **Disambiguation** | **100%** (8/8 × 3) | Similar tool pairs correctly distinguished |
|
|
1126
|
+
| **Edge Cases** | **100%** (8/8 × 3) | Single-word commands, multi-intent prompts |
|
|
1127
|
+
| **Avg Latency** | **1.9s** | Per-prompt inference time (Apple M4 Max) |
|
|
1128
|
+
|
|
1129
|
+
<details>
|
|
1130
|
+
<summary><strong>Category Breakdown (all 100% consistent across 3 randomized runs)</strong></summary>
|
|
1131
|
+
|
|
1132
|
+
| Category | Tests | 3-Run Score |
|
|
1133
|
+
|:---|:---:|:---|
|
|
1134
|
+
| `adversarial_trap` | 15 | **100%** — Express.js sessions, Python context managers, LSTM forget gates, garbage collection, Elasticsearch, load balancing |
|
|
1135
|
+
| `disambiguation` | 8 | **100%** — `knowledge_search` vs `session_search_memory`, `forget_memory` vs `knowledge_forget` |
|
|
1136
|
+
| `edge_case` | 8 | **100%** — "Load context.", "Save.", "Search.", "Hello!", conversational closings |
|
|
1137
|
+
| `multi_intent` | 4 | **100%** — "Load context then save a note", "Export backup and compact" |
|
|
1138
|
+
| `natural_phrasing` | 15 | **99%** — 1 flaky test at 67% pass rate |
|
|
1139
|
+
|
|
1140
|
+
</details>
|
|
1141
|
+
|
|
1142
|
+
#### 🏗️ 3-Layer Defense Architecture
|
|
1143
|
+
|
|
1144
|
+
Prism achieves 99.3% accuracy through a defense-in-depth architecture:
|
|
1145
|
+
|
|
1146
|
+
```
|
|
1147
|
+
┌──────────────────────────────────────────────────────────────┐
|
|
1148
|
+
│ Layer 1: MODELFILE ALIGNMENT │
|
|
1149
|
+
│ Temperature 0.1 · <|tool_call|> format · disambiguation │
|
|
1150
|
+
│ rules for similar tool pairs │
|
|
1151
|
+
├──────────────────────────────────────────────────────────────┤
|
|
1152
|
+
│ Layer 2: SFT TRAINING (244 examples, 4 rounds × 500 iters) │
|
|
1153
|
+
│ 142 tool examples + 102 reasoning/abstention examples │
|
|
1154
|
+
│ 21 keyword-aware Chain-of-Thought templates │
|
|
1155
|
+
├──────────────────────────────────────────────────────────────┤
|
|
1156
|
+
│ Layer 3: INFERENCE-TIME VALIDATION │
|
|
1157
|
+
│ Post-inference regex filter rejects false positive tool │
|
|
1158
|
+
│ calls when prompt matches general programming patterns │
|
|
1159
|
+
│ (context manager, LSTM, Express.js) without Prism intent │
|
|
1160
|
+
└──────────────────────────────────────────────────────────────┘
|
|
1161
|
+
```
|
|
1162
|
+
|
|
1163
|
+
<details>
|
|
1164
|
+
<summary><strong>Source: Layer 3 Inference-Time Validator</strong></summary>
|
|
1165
|
+
|
|
1166
|
+
```python
|
|
1167
|
+
# General programming patterns — NOT Prism tools
|
|
1168
|
+
GENERAL_PROGRAMMING_PATTERNS = [
|
|
1169
|
+
r'\bcontext\s+manager\b', r'\bcontextlib\b', r'\b__enter__\b',
|
|
1170
|
+
r'\bforget\s+gate\b', r'\blstm\b', r'\bcatastrophic\s+forgetting\b',
|
|
1171
|
+
r'\bexpress\.js\b', r'\bdjango\b', r'\bflask\b',
|
|
1172
|
+
r'\bgarbage\s+collection\b', r'\bload\s+balanc',
|
|
1173
|
+
]
|
|
1174
|
+
|
|
1175
|
+
# Prism-specific intent (overrides rejection)
|
|
1176
|
+
PRISM_INTENT_PATTERNS = [
|
|
1177
|
+
r'\bprism\b', r'\bsession\s*ledger\b', r'\bhandoff\b',
|
|
1178
|
+
r'\bknowledge\s+base\b', r'\bproject\b', r'\bledger\b',
|
|
1179
|
+
r'\bsave.*(?:session|ledger|handoff)\b', r'\bload\s+context\b',
|
|
1180
|
+
]
|
|
111
1181
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
1182
|
+
def validate_tool_call(prompt, tool_name, tool_args):
|
|
1183
|
+
"""Reject false positive tool calls on general programming prompts."""
|
|
1184
|
+
if tool_name == "NO_TOOL":
|
|
1185
|
+
return tool_name, tool_args
|
|
1186
|
+
is_general = any(re.search(p, prompt.lower()) for p in GENERAL_PROGRAMMING_PATTERNS)
|
|
1187
|
+
if not is_general:
|
|
1188
|
+
return tool_name, tool_args
|
|
1189
|
+
has_prism_intent = any(re.search(p, prompt.lower()) for p in PRISM_INTENT_PATTERNS)
|
|
1190
|
+
if has_prism_intent:
|
|
1191
|
+
return tool_name, tool_args
|
|
1192
|
+
return "NO_TOOL", {} # Reject: general programming + no Prism intent
|
|
1193
|
+
```
|
|
1194
|
+
|
|
1195
|
+
Full source: [`training/swe_bench_test.py`](https://github.com/dcostenco/prism-mcp/blob/main/training/swe_bench_test.py)
|
|
1196
|
+
|
|
1197
|
+
</details>
|
|
118
1198
|
|
|
119
|
-
|
|
1199
|
+
#### 🏆 Prism-Coder 7B vs. Flagship LLMs — Tool-Calling Accuracy
|
|
120
1200
|
|
|
121
|
-
|
|
1201
|
+
Compared against the **[Berkeley Function Calling Leaderboard (BFCL V4)](https://gorilla.cs.berkeley.edu/leaderboard.html)** and latest published benchmarks — flagship models only:
|
|
122
1202
|
|
|
123
|
-
| Model | Provider |
|
|
1203
|
+
| Model | Provider | Tool-Call Accuracy | SWE-bench | Cost |
|
|
124
1204
|
|:---|:---|:---:|:---:|:---:|
|
|
125
|
-
| **Prism-Coder 7B** | **
|
|
126
|
-
| Claude Opus 4.
|
|
127
|
-
| Gemini 3 Pro
|
|
128
|
-
|
|
|
1205
|
+
| **Prism-Coder 7B** | **Prism (local)** | **100%** ⭐ | — | **$0 (on-device)** |
|
|
1206
|
+
| Claude Opus 4.7 | Anthropic | 77.3% | 87.6% | $5 / $25 per 1M tok |
|
|
1207
|
+
| Gemini 3.1 Pro | Google | 77.1% | 80.6% | $1.25 / $10 per 1M tok |
|
|
1208
|
+
| Claude Opus 4.5 | Anthropic | 77.47% | 70.3% | $15 / $75 per 1M tok |
|
|
1209
|
+
| GPT-5.4 | OpenAI | 73.3% | ~80% | — |
|
|
1210
|
+
| Claude Sonnet 4.5 | Anthropic | 73.24% | 70.3% | $3 / $15 per 1M tok |
|
|
1211
|
+
| Gemini 3 Pro | Google | 72.51% | — | $3.50 / $10.50 per 1M tok |
|
|
1212
|
+
| Grok 4.1 | xAI | 69.57% | — | $3 / $15 per 1M tok |
|
|
1213
|
+
| Claude Opus 4.6 | Anthropic | 68.8% | 80.8% | $5 / $25 per 1M tok |
|
|
1214
|
+
| OpenAI o3 | OpenAI | 63.05% | 69.1% | $2 / $8 per 1M tok |
|
|
1215
|
+
| Grok 4 | xAI | 62.97% | 100% | $3 / $15 per 1M tok |
|
|
1216
|
+
| Claude Sonnet 4.6 | Anthropic | ~58% | 79.6% | $3 / $15 per 1M tok |
|
|
1217
|
+
| DeepSeek V3.2 | DeepSeek | 56.73% | — | $0.27 / $1.10 per 1M tok |
|
|
1218
|
+
| GPT-5.2 | OpenAI | 55.87% | — | $2.50 / $10 per 1M tok |
|
|
1219
|
+
| GPT-4.1 | OpenAI | 53.96% | — | $2 / $8 per 1M tok |
|
|
1220
|
+
| Grok 4 (HLE) | xAI | 50.7% | 100% | $3 / $15 per 1M tok |
|
|
1221
|
+
|
|
1222
|
+
> ⚠️ **Methodology Note:** Flagship scores sourced from [BFCL V4](https://gorilla.cs.berkeley.edu/leaderboard.html), [Vellum](https://www.vellum.ai/blog/claude-opus-4-7-benchmarks-explained), and [iternal.ai](https://iternal.ai/llm-selection-guide). BFCL tests **general-purpose** tool calling across 2,000+ functions. Prism-Coder's 99.3% is **domain-specific** (17 MCP tools, 50 blind prompts across 5 adversarial categories, 3× randomized runs). Both measure tool selection + parameter accuracy, but Prism's 3-layer specialist architecture achieves higher accuracy at 1/1000th the cost.
|
|
1223
|
+
|
|
1224
|
+
> 🧪 **Verifiable Proof**: Run `python3 training/swe_bench_test.py --runs 3 --shuffle` to reproduce. View the [SWE-bench test harness](https://github.com/dcostenco/prism-mcp/blob/main/training/swe_bench_test.py), the [SFT data generator](https://github.com/dcostenco/prism-mcp/blob/main/training/generate_diverse_sft.py), and the [Modelfile](https://github.com/dcostenco/prism-mcp/blob/main/training/Modelfile) to audit our methodology.
|
|
1225
|
+
|
|
1226
|
+
#### 🛡️ The Case for Structural GRPO
|
|
1227
|
+
Prism achieves specialist-grade tool accuracy through **Structural GRPO (Group Relative Policy Optimization)** with a decomposed 4-component reward function:
|
|
1228
|
+
1. **Format Reward (0.10):** Validates `<think>` tag compliance for chain-of-thought reasoning.
|
|
1229
|
+
2. **Tool Reward (0.25):** Grades tool name accuracy against the expected MCP tool registry.
|
|
1230
|
+
3. **Parameter Reward (0.25):** Validates required parameters and JSON schema compliance.
|
|
1231
|
+
4. **Abstention Reward (0.40):** The heaviest component — teaches the model when *not* to call tools, preventing false-positive hallucinations on general reasoning questions. Trained on 102 gold abstention responses including 30 hard negatives (prompts containing "session", "knowledge", "search", "context", "memory" that should NOT trigger tool calls).
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
### 🏆 Where Prism Crushes the Giants
|
|
1235
|
+
|
|
1236
|
+
#### 1. Local-First & HIPAA-Hardened
|
|
1237
|
+
While other memory systems force you to send every chat log to their cloud for "compaction" or "embedding," Prism v10 is **100% air-gapped**. With the `prism-coder:7b` local LLM and `nomic-embed` local adapter, your agent's memory pipeline runs entirely on your machine. Prism includes built-in SSRF protection, URL credential redaction, and XML sanitization to prevent stored prompt injection — meeting HIPAA Security Rule standards for on-device processing.
|
|
1238
|
+
|
|
1239
|
+
#### 2. MCP-Native, Not an Adapted API
|
|
1240
|
+
Mem0 and Zep are APIs that *can* be wrapped into an MCP server. Prism was built *for* MCP from day one. Instead of wasting tokens on "search" tool calls, Prism uses **MCP Prompts** (`/resume_session`) to inject context *before* the LLM thinks, and **MCP Resources** (`memory://project/handoff`) to attach live, subscribing context.
|
|
1241
|
+
|
|
1242
|
+
#### 3. Academic-Grade Cognitive Computer Science
|
|
1243
|
+
The giants use standard RAG (Retrieval-Augmented Generation). Prism uses biological and academic models of memory: **ACT-R base-level activation** (`B_i = ln(Σ t_j^(-d))`) for recency–frequency re-ranking, **TurboQuant** for extreme vector compression, **Ebbinghaus curves** for importance decay, and **Sparse Distributed Memory (SDM)**. The result is retrieval quality that follows how human memory actually works — not just nearest-neighbor cosine distance. And all of it runs on a laptop without a Postgres/pgvector instance.
|
|
1244
|
+
|
|
1245
|
+
#### 4. True Multi-Agent Coordination (CRDTs)
|
|
1246
|
+
If Cursor (Agent A) and Claude Desktop (Agent B) try to update a Mem0 or standard SQLite database at the exact same time, you get a race condition and data loss. Prism uses **Optimistic Concurrency Control (OCC) with CRDT OR-Maps** — mathematically guaranteeing that simultaneous agent edits merge safely. Enterprise-grade distributed systems on a local machine.
|
|
1247
|
+
|
|
1248
|
+
#### 5. The PKM "Prism-Port" Export
|
|
1249
|
+
AI memory is a black box. Developers hate black boxes. Prism exports memory directly into an **Obsidian/Logseq-compatible Markdown Vault** with YAML frontmatter and `[[Wikilinks]]`. Neither Mem0 nor Zep do this.
|
|
1250
|
+
|
|
1251
|
+
#### 6. Self-Cleaning & Self-Optimizing
|
|
1252
|
+
If you use a standard memory tool long enough, it clogs the LLM's context window with thousands of obsolete tokens. Prism runs an autonomous [Background Scheduler](src/backgroundScheduler.ts) that Ebbinghaus-decays older memories, auto-compacts session histories into dense summaries, and deep-purges high-precision vectors — saving ~90% of disk space automatically.
|
|
1253
|
+
|
|
1254
|
+
#### 7. Anti-Sycophancy — The AI That Grades Its Own Homework (v7.4)
|
|
1255
|
+
Every other AI coding pipeline has a fatal flaw: it asks the same model that wrote the code whether the code is correct. **Of course it says yes.** Prism's Dark Factory solves this with a walled-off Adversarial Evaluator that is explicitly prompted to be hostile and strict. It operates on a pre-committed rubric and cannot fail the Generator without providing exact file/line receipts. Failed evaluations feed the critique back into the Generator's retry prompt — eliminating blind retries. No other memory or pipeline tool does this.
|
|
129
1256
|
|
|
130
|
-
|
|
1257
|
+
### 🤝 Where the Giants Currently Win (Honest Trade-offs)
|
|
1258
|
+
|
|
1259
|
+
1. **Framework Integrations:** Mem0 and Zep have pre-built integrations for LangChain, LlamaIndex, Flowise, AutoGen, CrewAI, etc. Prism requires the host application to support the MCP protocol.
|
|
1260
|
+
2. **Managed Cloud Infrastructure:** The giants offer SaaS. Users pay $20/month and don't think about databases. Prism users must set up their own local SQLite or provision their own Supabase instance.
|
|
1261
|
+
3. **Implicit Memory Extraction (NER):** Zep automatically extracts names, places, and facts from raw chat logs using NLP models. Prism relies on the LLM explicitly calling the `session_save_ledger` tool to structure its own memories.
|
|
1262
|
+
|
|
1263
|
+
> 💰 **Token Economics:** Progressive Context Loading (Quick ~50 tokens / Standard ~200 / Deep ~1000+) plus auto-compaction means you never blow your Claude/OpenAI token budget fetching 50 pages of raw chat history.
|
|
1264
|
+
>
|
|
1265
|
+
> 🔌 **BYOM (Bring Your Own Model):** While tools like Mem0 charge per API call, Prism's pluggable architecture lets you run `nomic-embed-text` locally via Ollama for **free vectors**, while using Claude or GPT for high-level reasoning. Zero vendor lock-in.
|
|
131
1266
|
|
|
132
1267
|
---
|
|
133
1268
|
|
|
134
|
-
##
|
|
1269
|
+
## 🔀 Synalux SCM Integration (via `prism scm`)
|
|
1270
|
+
|
|
1271
|
+
> **NEW:** Prism integrates with [Synalux SCM](https://synalux.ai) for code search, AI review, security scanning, and DORA metrics — all from the CLI. Engines run server-side on Synalux; Prism provides a thin API client for seamless IDE integration.
|
|
1272
|
+
|
|
1273
|
+
### SCM CLI Commands
|
|
1274
|
+
|
|
1275
|
+
```bash
|
|
1276
|
+
# Multi-repo code search (exact, regex, symbol, semantic)
|
|
1277
|
+
prism scm search "handleAuth" --mode semantic --repo synalux/portal
|
|
1278
|
+
|
|
1279
|
+
# AI code review with optional HIPAA compliance check
|
|
1280
|
+
prism scm review src/db.ts src/api.ts --hipaa --json
|
|
1281
|
+
|
|
1282
|
+
# Security scan — secrets, licenses, Dockerfile best practices
|
|
1283
|
+
prism scm scan .env Dockerfile --json
|
|
1284
|
+
|
|
1285
|
+
# DORA metrics for engineering excellence
|
|
1286
|
+
prism scm dora --repo synalux/portal --period 2024-Q4
|
|
1287
|
+
```
|
|
1288
|
+
|
|
1289
|
+
### SCM Tier Comparison
|
|
1290
|
+
|
|
1291
|
+
| Feature | Free | Standard ($12/mo) | Advanced ($29/mo) | Enterprise |
|
|
1292
|
+
|---|:---:|:---:|:---:|:---:|
|
|
1293
|
+
| Public repos | 3 | 20 | ∞ | ∞ |
|
|
1294
|
+
| Private repos | 1 | 10 | 50 | ∞ |
|
|
1295
|
+
| AI reviews/month | 5 | 50 | 500 | ∞ |
|
|
1296
|
+
| IDE hours/day | 1 | 4 | 12 | ∞ |
|
|
1297
|
+
| Search modes | Exact | +Regex, Symbol | +Semantic | +Semantic |
|
|
1298
|
+
| DORA metrics | — | Basic | Full | Custom |
|
|
1299
|
+
| HIPAA compliance | — | — | ✅ | ✅ |
|
|
1300
|
+
| SSO/SAML | — | — | — | ✅ |
|
|
1301
|
+
| Stacked PRs | — | ✅ | ✅ | ✅ |
|
|
1302
|
+
|
|
1303
|
+
<details>
|
|
1304
|
+
<summary>📸 Screenshots — SCM CLI in action (click to expand)</summary>
|
|
1305
|
+
|
|
1306
|
+
#### Code Search (Semantic Mode)
|
|
1307
|
+

|
|
135
1308
|
|
|
136
|
-
|
|
1309
|
+
#### AI Review with HIPAA Check
|
|
1310
|
+

|
|
1311
|
+
|
|
1312
|
+
#### Security Scan
|
|
1313
|
+

|
|
1314
|
+
|
|
1315
|
+
</details>
|
|
1316
|
+
|
|
1317
|
+
<details>
|
|
1318
|
+
<summary>📊 How We Compare — SCM vs GitHub / GitLab / Bitbucket (click to expand)</summary>
|
|
1319
|
+
|
|
1320
|
+
| Feature | Synalux SCM | GitHub | GitLab | Bitbucket | Sourcegraph |
|
|
1321
|
+
|---|:---:|:---:|:---:|:---:|:---:|
|
|
1322
|
+
| **Code Search** | Exact, Regex, Symbol, Semantic | Exact, Regex | Basic | Basic | Exact, Regex, Structural |
|
|
1323
|
+
| **AI Code Review** | Built-in (all tiers) | Copilot (paid add-on) | Duo (Ultimate only) | ❌ | ❌ |
|
|
1324
|
+
| **Secret Detection** | ✅ Free tier | Push Protection (paid) | ✅ Ultimate | ❌ | ❌ |
|
|
1325
|
+
| **License Scanning** | ✅ Standard+ | ❌ | ✅ Ultimate | ❌ | ❌ |
|
|
1326
|
+
| **Dockerfile Analysis** | ✅ Standard+ | ❌ | Container Scanning | ❌ | ❌ |
|
|
1327
|
+
| **DORA Metrics** | ✅ Standard+ | ❌ (3rd party) | ✅ Ultimate | ❌ | ❌ |
|
|
1328
|
+
| **HIPAA Compliance** | ✅ Advanced+ | Enterprise BAA | Ultimate BAA | Enterprise BAA | ❌ |
|
|
1329
|
+
| **Stacked PRs** | ✅ Standard+ | ❌ (Graphite) | ❌ | ❌ | ❌ |
|
|
1330
|
+
| **SSO/SAML** | Enterprise | Enterprise ($21/u) | Premium ($29/u) | Premium ($6/u) | Enterprise |
|
|
1331
|
+
| **IDE Plugin** | Prism CLI | VS Code, JetBrains | VS Code | VS Code | VS Code, JetBrains |
|
|
1332
|
+
| **Free Tier** | ✅ 3 repos | ✅ Unlimited public | ✅ 5 users | ✅ 5 users | ✅ Limited |
|
|
1333
|
+
| **Starting Price** | $12/mo | $4/u/mo | $29/u/mo | $3/u/mo | $49/u/mo |
|
|
1334
|
+
|
|
1335
|
+
</details>
|
|
1336
|
+
|
|
1337
|
+
> 🔧 **Configuration:** Set `SYNALUX_API_URL` and `SYNALUX_API_KEY` environment variables to connect to your Synalux instance. See [synalux.ai/docs/scm](https://synalux.ai/docs/scm) for setup.
|
|
1338
|
+
|
|
1339
|
+
---
|
|
1340
|
+
|
|
1341
|
+
## <a name="cli-reference"></a>💻 CLI Reference
|
|
1342
|
+
|
|
1343
|
+
Prism includes a CLI for environments where MCP tools aren't available (CI/CD pipelines, Bash scripts, non-MCP IDEs like Antigravity).
|
|
1344
|
+
|
|
1345
|
+
**Text mode** delegates to the real `session_load_context` handler — full feature parity with MCP clients, including morning briefings, reality drift detection, SDM intuitive recall, visual memory, role-scoped skills, behavioral warnings, and agent identity.
|
|
1346
|
+
|
|
1347
|
+
**JSON mode** emits a structured envelope for programmatic consumption (scripts, CI/CD, session loaders).
|
|
137
1348
|
|
|
138
1349
|
```bash
|
|
139
|
-
#
|
|
140
|
-
|
|
1350
|
+
# Load session context (full enrichments — same as MCP tool)
|
|
1351
|
+
prism load my-project # Human-readable, standard depth
|
|
1352
|
+
prism load my-project --level deep # Full context with all enrichments
|
|
1353
|
+
prism load my-project --level quick --json # Machine-readable JSON
|
|
1354
|
+
prism load my-project --role dev --json # Role-scoped loading
|
|
1355
|
+
|
|
1356
|
+
# Bidirectional sync (v9.4.1)
|
|
1357
|
+
prism sync push # Push local SQLite → Supabase
|
|
1358
|
+
prism sync push --json # Machine-readable output
|
|
1359
|
+
|
|
1360
|
+
# Verification harness
|
|
1361
|
+
prism verify status # Check verification state
|
|
1362
|
+
prism verify status --json # Machine-readable output
|
|
1363
|
+
prism verify generate # Bless current rubric as canonical
|
|
1364
|
+
```
|
|
1365
|
+
|
|
1366
|
+
> 💡 **When to use the CLI vs MCP tools:** If your environment supports MCP (Claude Desktop, Cursor, Windsurf, Cline), always use the MCP tools — they integrate seamlessly with the agent's tool-calling flow. Use the CLI when you need session context in scripts, CI/CD, or non-MCP IDEs.
|
|
1367
|
+
|
|
1368
|
+
> 📦 **Installation:** The CLI is available as `prism` when installed globally (`npm install -g prism-mcp-server`), or via `node dist/cli.js` for local dev builds.
|
|
1369
|
+
|
|
1370
|
+
---
|
|
1371
|
+
|
|
1372
|
+
## <a name="tool-reference"></a>🔧 Tool Reference
|
|
1373
|
+
|
|
1374
|
+
Prism ships 30+ tools, but **90% of your workflow uses just three:**
|
|
1375
|
+
|
|
1376
|
+
> **🎯 The Big Three**
|
|
1377
|
+
>
|
|
1378
|
+
> | Tool | When | What it does |
|
|
1379
|
+
> |------|------|--------------|
|
|
1380
|
+
> | `session_load_context` | ▶️ Start of session | Loads your agent’s brain from last time |
|
|
1381
|
+
> | `session_save_ledger` | ⏹️ End of session | Records what was accomplished |
|
|
1382
|
+
> | `knowledge_search` | 🔍 Anytime | Finds past decisions, context, and learnings |
|
|
1383
|
+
>
|
|
1384
|
+
> *Everything else is a power-up. Start with these three and you’re 90% there.*
|
|
1385
|
+
|
|
1386
|
+
<details>
|
|
1387
|
+
<summary><strong>Session Memory & Knowledge (12 tools)</strong></summary>
|
|
1388
|
+
|
|
1389
|
+
| Tool | Purpose |
|
|
1390
|
+
|------|---------|
|
|
1391
|
+
| `session_save_ledger` | Append immutable session log (summary, TODOs, decisions) |
|
|
1392
|
+
| `session_save_handoff` | Upsert latest project state with OCC version tracking |
|
|
1393
|
+
| `session_load_context` | Progressive context loading (quick / standard / deep) |
|
|
1394
|
+
| `knowledge_search` | Full-text keyword search across accumulated knowledge |
|
|
1395
|
+
| `knowledge_forget` | Prune outdated or incorrect memories (4 modes + dry_run) |
|
|
1396
|
+
| `knowledge_set_retention` | Set per-project TTL retention policy |
|
|
1397
|
+
| `session_search_memory` | Vector similarity search across all sessions |
|
|
1398
|
+
| `session_compact_ledger` | Auto-compact old entries via Gemini summarization |
|
|
1399
|
+
| `session_forget_memory` | GDPR-compliant deletion (soft/hard + Art. 17 reason) |
|
|
1400
|
+
| `session_export_memory` | Full export (JSON, Markdown, or Obsidian vault `.zip` with `[[Wikilinks]]`) |
|
|
1401
|
+
| `session_health_check` | Brain integrity scan + auto-repair (`fsck`) |
|
|
1402
|
+
| `deep_storage_purge` | Reclaim ~90% vector storage (v5.1) |
|
|
1403
|
+
|
|
1404
|
+
</details>
|
|
1405
|
+
|
|
1406
|
+
<details>
|
|
1407
|
+
<summary><strong>Behavioral Memory & Knowledge Graph (5 tools)</strong></summary>
|
|
1408
|
+
|
|
1409
|
+
| Tool | Purpose |
|
|
1410
|
+
|------|---------|
|
|
1411
|
+
| `session_save_experience` | Record corrections, successes, failures, learnings |
|
|
1412
|
+
| `knowledge_upvote` | Increase entry importance (+1) |
|
|
1413
|
+
| `knowledge_downvote` | Decrease entry importance (-1) |
|
|
1414
|
+
| `knowledge_sync_rules` | Sync graduated insights to `.cursorrules` / `.clauderules` |
|
|
1415
|
+
| `session_save_image` / `session_view_image` | Visual memory vault |
|
|
1416
|
+
|
|
1417
|
+
</details>
|
|
1418
|
+
|
|
1419
|
+
<details>
|
|
1420
|
+
<summary><strong>Time Travel & History (2 tools)</strong></summary>
|
|
1421
|
+
|
|
1422
|
+
| Tool | Purpose |
|
|
1423
|
+
|------|---------|
|
|
1424
|
+
| `memory_history` | Browse all historical versions of a project's handoff state |
|
|
1425
|
+
| `memory_checkout` | Revert to any previous version (non-destructive) |
|
|
1426
|
+
|
|
1427
|
+
</details>
|
|
1428
|
+
|
|
1429
|
+
<details>
|
|
1430
|
+
<summary><strong>Search & Analysis (7 tools)</strong></summary>
|
|
1431
|
+
|
|
1432
|
+
| Tool | Purpose |
|
|
1433
|
+
|------|---------|
|
|
1434
|
+
| `brave_web_search` | Real-time internet search |
|
|
1435
|
+
| `brave_local_search` | Location-based POI discovery |
|
|
1436
|
+
| `brave_web_search_code_mode` | JS extraction over web search results |
|
|
1437
|
+
| `brave_local_search_code_mode` | JS extraction over local search results |
|
|
1438
|
+
| `code_mode_transform` | Universal post-processing with 8 built-in templates |
|
|
1439
|
+
| `gemini_research_paper_analysis` | Academic paper analysis via Gemini |
|
|
1440
|
+
| `brave_answers` | AI-grounded answers from Brave |
|
|
1441
|
+
|
|
1442
|
+
</details>
|
|
1443
|
+
|
|
1444
|
+
<details>
|
|
1445
|
+
<summary><strong>Cognitive Architecture (1 tool)</strong></summary>
|
|
1446
|
+
|
|
1447
|
+
Requires `PRISM_HDC_ENABLED=true` (default).
|
|
1448
|
+
|
|
1449
|
+
| Tool | Purpose |
|
|
1450
|
+
|------|---------|
|
|
1451
|
+
| `session_cognitive_route` | HDC compositional state resolution with policy-gated routing |
|
|
1452
|
+
|
|
1453
|
+
</details>
|
|
1454
|
+
|
|
1455
|
+
<details>
|
|
1456
|
+
<summary><strong>Multi-Agent Hivemind (3 tools)</strong></summary>
|
|
1457
|
+
|
|
1458
|
+
Requires `PRISM_ENABLE_HIVEMIND=true`.
|
|
1459
|
+
|
|
1460
|
+
| Tool | Purpose |
|
|
1461
|
+
|------|---------|
|
|
1462
|
+
| `agent_register` | Announce yourself to the team |
|
|
1463
|
+
| `agent_heartbeat` | Pulse every ~5 min to stay visible |
|
|
1464
|
+
| `agent_list_team` | See all active teammates |
|
|
1465
|
+
|
|
1466
|
+
</details>
|
|
1467
|
+
|
|
1468
|
+
<details>
|
|
1469
|
+
<summary><strong>Task Routing (1 tool)</strong></summary>
|
|
1470
|
+
|
|
1471
|
+
Requires `PRISM_TASK_ROUTER_ENABLED=true` (or dashboard toggle).
|
|
1472
|
+
|
|
1473
|
+
| Tool | Purpose |
|
|
1474
|
+
|------|---------|
|
|
1475
|
+
| `session_task_route` | Scores task complexity and recommends host vs. local Claw delegation (`claw_run_task` when delegable; host fallback when executor/tooling is unavailable) |
|
|
1476
|
+
|
|
1477
|
+
</details>
|
|
1478
|
+
|
|
1479
|
+
<details>
|
|
1480
|
+
<summary><strong>Dark Factory Orchestration (3 tools)</strong></summary>
|
|
1481
|
+
|
|
1482
|
+
Requires `PRISM_DARK_FACTORY_ENABLED=true`.
|
|
1483
|
+
|
|
1484
|
+
| Tool | Purpose |
|
|
1485
|
+
|------|---------|
|
|
1486
|
+
| `session_start_pipeline` | Create and enqueue a background autonomous pipeline |
|
|
1487
|
+
| `session_check_pipeline_status` | Poll the current step, iteration, and status of a pipeline |
|
|
1488
|
+
| `session_abort_pipeline` | Emergency kill switch to halt a running background pipeline |
|
|
1489
|
+
|
|
1490
|
+
</details>
|
|
1491
|
+
|
|
1492
|
+
<details>
|
|
1493
|
+
<summary><strong>Verification Harness</strong></summary>
|
|
1494
|
+
|
|
1495
|
+
| Tool | Purpose |
|
|
1496
|
+
|------|---------|
|
|
1497
|
+
| `session_plan_decompose` | Decompose natural language goals into an execution plan that references verification requirements |
|
|
1498
|
+
| `session_plan_step_update` | Atomically update step status/result with verification context |
|
|
1499
|
+
| `session_plan_get_active` | Retrieve active plan state and current verification gating position |
|
|
1500
|
+
|
|
1501
|
+
</details>
|
|
1502
|
+
|
|
1503
|
+
---
|
|
1504
|
+
|
|
1505
|
+
## <a name="environment-variables"></a>Environment Variables
|
|
1506
|
+
|
|
1507
|
+
> **🚦 TL;DR — Just want the best experience fast?** Two options:
|
|
1508
|
+
> ```
|
|
1509
|
+
> # Option A: Fully offline (no API keys needed)
|
|
1510
|
+
> # Set embedding_provider=local in the Mind Palace dashboard — semantic search works out of the box.
|
|
1511
|
+
>
|
|
1512
|
+
> # Option B: Cloud-powered (best quality)
|
|
1513
|
+
> GOOGLE_API_KEY=... # Unlocks: Gemini embeddings, Morning Briefings, auto-compaction
|
|
1514
|
+
> BRAVE_API_KEY=... # Unlocks: Web Scholar research + Brave Answers
|
|
1515
|
+
> FIRECRAWL_API_KEY=... # Unlocks: Web Scholar deep scraping (or use TAVILY_API_KEY instead)
|
|
1516
|
+
> ```
|
|
1517
|
+
> **Zero keys = zero problem.** Core session memory, keyword search, semantic search (local embeddings), time travel, and the full dashboard work 100% offline. Cloud keys are optional power-ups.
|
|
1518
|
+
|
|
1519
|
+
<details>
|
|
1520
|
+
<summary><strong>Full variable reference</strong></summary>
|
|
1521
|
+
|
|
1522
|
+
| Variable | Required | Description |
|
|
1523
|
+
|----------|----------|-------------|
|
|
1524
|
+
| `BRAVE_API_KEY` | No | Brave Search Pro API key |
|
|
1525
|
+
| `FIRECRAWL_API_KEY` | No | Firecrawl API key — required for Web Scholar (unless using Tavily) |
|
|
1526
|
+
| `TAVILY_API_KEY` | No | Tavily Search API key — alternative to Brave+Firecrawl for Web Scholar |
|
|
1527
|
+
| `PRISM_STORAGE` | No | `"local"` (default) or `"supabase"` — restart required |
|
|
1528
|
+
| `PRISM_ENABLE_HIVEMIND` | No | `"true"` to enable multi-agent tools — restart required |
|
|
1529
|
+
| `PRISM_INSTANCE` | No | Instance name for multi-server PID isolation |
|
|
1530
|
+
| `GOOGLE_API_KEY` | No | Gemini — enables Briefings, compaction, and cloud embeddings (not needed with `embedding_provider=local`) |
|
|
1531
|
+
| `VOYAGE_API_KEY` | No | Voyage AI — optional premium embedding provider |
|
|
1532
|
+
| `OPENAI_API_KEY` | No | OpenAI — optional proxy model and embedding provider |
|
|
1533
|
+
| `BRAVE_ANSWERS_API_KEY` | No | Separate Brave Answers key |
|
|
1534
|
+
| `SUPABASE_URL` | If cloud | Supabase project URL |
|
|
1535
|
+
| `SUPABASE_KEY` | If cloud | Supabase anon/service key |
|
|
1536
|
+
| `PRISM_USER_ID` | No | Multi-tenant user isolation (default: `"default"`) |
|
|
1537
|
+
| `PRISM_AUTO_CAPTURE` | No | `"true"` to auto-snapshot dev server UI states (HTML/DOM) for visual memory |
|
|
1538
|
+
| `PRISM_CAPTURE_PORTS` | No | Comma-separated ports (default: `3000,3001,5173,8080`) |
|
|
1539
|
+
| `PRISM_DEBUG_LOGGING` | No | `"true"` for verbose logs |
|
|
1540
|
+
| `PRISM_DASHBOARD_PORT` | No | Dashboard port (default: `3000`) |
|
|
1541
|
+
| `PRISM_SCHEDULER_ENABLED` | No | `"false"` to disable background maintenance (default: enabled) |
|
|
1542
|
+
| `PRISM_SCHEDULER_INTERVAL_MS` | No | Maintenance interval in ms (default: `43200000` = 12h) |
|
|
1543
|
+
| `PRISM_SCHOLAR_ENABLED` | No | `"true"` to enable Web Scholar pipeline |
|
|
1544
|
+
| `PRISM_SCHOLAR_INTERVAL_MS` | No | Scholar interval in ms (default: `0` = manual only) |
|
|
1545
|
+
| `PRISM_SCHOLAR_TOPICS` | No | Comma-separated research topics (default: `"ai,agents"`) |
|
|
1546
|
+
| `PRISM_SCHOLAR_MAX_ARTICLES_PER_RUN` | No | Max articles per Scholar run (default: `3`) |
|
|
1547
|
+
| `PRISM_TASK_ROUTER_ENABLED` | No | `"true"` to enable task-router tool registration |
|
|
1548
|
+
| `PRISM_TASK_ROUTER_CONFIDENCE_THRESHOLD` | No | Min confidence required to delegate to Claw (default: `0.6`) |
|
|
1549
|
+
| `PRISM_TASK_ROUTER_MAX_CLAW_COMPLEXITY` | No | Max complexity score delegable to Claw (default: `4`) |
|
|
1550
|
+
| `PRISM_HDC_ENABLED` | No | `"true"` (default) to enable HDC cognitive routing pipeline |
|
|
1551
|
+
| `PRISM_HDC_EXPLAINABILITY_ENABLED` | No | `"true"` (default) to include convergence/distance/ambiguity in cognitive route responses |
|
|
1552
|
+
| `PRISM_ACTR_ENABLED` | No | `"true"` (default) to enable ACT-R activation re-ranking on semantic search |
|
|
1553
|
+
| `PRISM_ACTR_DECAY` | No | ACT-R decay parameter `d` (default: `0.5`). Higher values = faster recency drop-off |
|
|
1554
|
+
| `PRISM_ACTR_WEIGHT_SIMILARITY` | No | Composite score similarity weight (default: `0.7`) |
|
|
1555
|
+
| `PRISM_ACTR_WEIGHT_ACTIVATION` | No | Composite score ACT-R activation weight (default: `0.3`) |
|
|
1556
|
+
| `PRISM_ACTR_ACCESS_LOG_RETENTION_DAYS` | No | Days before access logs are pruned by background scheduler (default: `90`) |
|
|
1557
|
+
| `PRISM_DARK_FACTORY_ENABLED` | No | `"true"` to enable Dark Factory autonomous pipeline tools (`session_start_pipeline`, `session_check_pipeline_status`, `session_abort_pipeline`) |
|
|
1558
|
+
| `PRISM_JWKS_URI` | No | JWKS endpoint URL for vendor-neutral JWT auth (e.g., `https://your-tenant.auth0.com/.well-known/jwks.json`) |
|
|
1559
|
+
| `PRISM_JWT_AUDIENCE` | No | Expected JWT `aud` claim — prevents cross-service token confusion |
|
|
1560
|
+
| `PRISM_JWT_ISSUER` | No | Expected JWT `iss` claim — validates token origin |
|
|
1561
|
+
|
|
1562
|
+
</details>
|
|
1563
|
+
|
|
1564
|
+
### System Settings (Dashboard)
|
|
1565
|
+
Some configurations are stored dynamically in SQLite (`system_settings` table) and can be edited through the Dashboard UI at `http://localhost:3000`:
|
|
1566
|
+
- **`intent_health_stale_threshold_days`** (default: `30`): Number of days before a project is considered fully stale for Intent Health scoring.
|
|
1567
|
+
|
|
1568
|
+
---
|
|
1569
|
+
|
|
1570
|
+
## <a name="architecture"></a>Architecture
|
|
141
1571
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
1572
|
+
Prism is a **stdio-based MCP server** that manages persistent agent memory. Here's how the pieces fit together:
|
|
1573
|
+
|
|
1574
|
+
```
|
|
1575
|
+
┌──────────────────────────────────────────────────────────┐
|
|
1576
|
+
│ MCP Client (Claude Desktop / Cursor / Antigravity) │
|
|
1577
|
+
│ ↕ stdio / SSE (JSON-RPC) │
|
|
1578
|
+
├──────────────────────────────────────────────────────────┤
|
|
1579
|
+
│ Prism MCP Server │
|
|
1580
|
+
│ │
|
|
1581
|
+
│ ┌──────────────┐ ┌──────────────┐ ┌────────────────┐ │
|
|
1582
|
+
│ │ 30+ Tools │ │ Lifecycle │ │ Dashboard │ │
|
|
1583
|
+
│ │ (handlers) │ │ (PID lock, │ │ (HTTP :3000) │ │
|
|
1584
|
+
│ │ │ │ shutdown) │ │ │ │
|
|
1585
|
+
│ └──────┬───────┘ └──────────────┘ └────────────────┘ │
|
|
1586
|
+
│ ↕ │
|
|
1587
|
+
│ ┌────────────────────────────────────────────────────┐ │
|
|
1588
|
+
│ │ Cognitive Engine (v7.8) │ │
|
|
1589
|
+
│ │ • ACT-R Spreading Activation (multi-hop) │ │
|
|
1590
|
+
│ │ • Episodic → Semantic Consolidation (Hebbian) │ │
|
|
1591
|
+
│ │ • Uncertainty-Aware Rejection Gate │ │
|
|
1592
|
+
│ │ • Dynamic Fast Weight Decay (dual-rate) │ │
|
|
1593
|
+
│ │ • HDC Cognitive Routing (XOR binding) │ │
|
|
1594
|
+
│ └──────┬─────────────────────────────────────────────┘ │
|
|
1595
|
+
│ ↕ │
|
|
1596
|
+
│ ┌────────────────────────────────────────────────────┐ │
|
|
1597
|
+
│ │ Storage Engine │ │
|
|
1598
|
+
│ │ Local: SQLite + FTS5 + TurboQuant + semantic_knowledge │
|
|
1599
|
+
│ │ Cloud: Supabase + pgvector │ │
|
|
1600
|
+
│ └────────────────────────────────────────────────────┘ │
|
|
1601
|
+
│ ↕ │
|
|
1602
|
+
│ ┌────────────────────────────────────────────────────┐ │
|
|
1603
|
+
│ │ Background Workers │ │
|
|
1604
|
+
│ │ • Dark Factory (3-gate fail-closed pipelines) │ │
|
|
1605
|
+
│ │ • Scheduler (TTL, decay, compaction, purge) │ │
|
|
1606
|
+
│ │ • Web Scholar (Brave → Firecrawl → LLM → Ledger) │ │
|
|
1607
|
+
│ │ • Hivemind heartbeats & Telepathy broadcasts │ │
|
|
1608
|
+
│ │ • OpenTelemetry span export │ │
|
|
1609
|
+
│ └────────────────────────────────────────────────────┘ │
|
|
1610
|
+
└──────────────────────────────────────────────────────────┘
|
|
146
1611
|
```
|
|
147
1612
|
|
|
1613
|
+
### Startup Sequence
|
|
1614
|
+
|
|
1615
|
+
1. **Acquire PID lock** — prevents duplicate instances per `PRISM_INSTANCE`
|
|
1616
|
+
2. **Initialize config** — SQLite settings cache (`prism-config.db`)
|
|
1617
|
+
3. **Register 30+ MCP tools** — session, knowledge, search, behavioral, hivemind
|
|
1618
|
+
4. **Connect stdio transport** — MCP handshake with the client (~60ms total)
|
|
1619
|
+
5. **Async post-connect** — storage warmup, dashboard launch, scheduler start (non-blocking)
|
|
1620
|
+
|
|
1621
|
+
### Storage Layers
|
|
1622
|
+
|
|
1623
|
+
| Layer | Technology | Purpose |
|
|
1624
|
+
|-------|-----------|---------|
|
|
1625
|
+
| **Session Ledger** | SQLite (append-only) | Immutable audit trail of all agent work |
|
|
1626
|
+
| **Handoff State** | SQLite (upsert, versioned) | Live project context with OCC + CRDT merging |
|
|
1627
|
+
| **Semantic Knowledge** | SQLite (`semantic_knowledge`) | Hebbian-style distilled rules with confidence scoring |
|
|
1628
|
+
| **Memory Links** | SQLite (`memory_links`) | Causal graph edges (`caused_by`, `led_to`, `synthesized_from`) |
|
|
1629
|
+
| **Keyword Search** | FTS5 virtual tables | Zero-dependency full-text search |
|
|
1630
|
+
| **Semantic Search** | TurboQuant compressed vectors | 10× compressed 768-dim embeddings, three-tier retrieval |
|
|
1631
|
+
| **Cloud Sync** | Supabase + pgvector | Optional multi-device/team sync |
|
|
1632
|
+
|
|
1633
|
+
### Auto-Load Architecture
|
|
1634
|
+
|
|
1635
|
+
Each MCP client has its own mechanism for ensuring Prism context loads on session start. See the platform-specific [Setup Guides](#setup-guides) above for detailed instructions:
|
|
1636
|
+
|
|
1637
|
+
- **Claude Code** — Lifecycle hooks (`SessionStart` / `Stop`)
|
|
1638
|
+
- **Gemini / Antigravity** — Three-layer architecture (User Rules + AGENTS.md + Startup Skill)
|
|
1639
|
+
- **Task Router Integration (v7.2 guidance)** — For client startup/skills, use defensive delegation flow: route only coding tasks, call `session_task_route` only when available, delegate to `claw` only when executor exists and task is non-destructive, and fallback to host if router/executor is unavailable.
|
|
1640
|
+
- **Cursor / Windsurf / VS Code** — System prompt instructions
|
|
1641
|
+
|
|
1642
|
+
All platforms benefit from the **server-side fallback** (v5.2.1): if `session_load_context` hasn't been called within 10 seconds, Prism auto-pushes context via `sendLoggingMessage`.
|
|
1643
|
+
|
|
1644
|
+
---
|
|
1645
|
+
|
|
1646
|
+
## <a name="scientific-foundation"></a>🧬 Scientific Foundation
|
|
1647
|
+
|
|
1648
|
+
Prism has evolved from smart session logging into a **cognitive memory architecture** — grounded in real research, not marketing. Every retrieval decision is backed by peer-reviewed models from cognitive psychology, neuroscience, and distributed computing.
|
|
1649
|
+
|
|
1650
|
+
| Phase | Feature | Inspired By | Status |
|
|
1651
|
+
|-------|---------|-------------|--------|
|
|
1652
|
+
| **v5.0** | TurboQuant 10× Compression — 4-bit quantized 768-dim vectors in <500 bytes | Vector quantization (product/residual PQ) | ✅ Shipped |
|
|
1653
|
+
| **v5.0** | Three-Tier Search — native → TurboQuant → FTS5 keyword fallback | Cascaded retrieval architectures | ✅ Shipped |
|
|
1654
|
+
| **v5.2** | Smart Consolidation — extract principles, not just summaries | Neuroscience sleep consolidation | ✅ Shipped |
|
|
1655
|
+
| **v5.2** | Ebbinghaus Importance Decay — memories fade unless reinforced | Ebbinghaus forgetting curve | ✅ Shipped |
|
|
1656
|
+
| **v5.2** | Context-Weighted Retrieval — current work biases what surfaces | Contextual memory in cognitive science | ✅ Shipped |
|
|
1657
|
+
| **v5.4** | CRDT Handoff Merging — conflict-free multi-agent state via OR-Map engine | CRDTs (Shapiro et al., 2011) | ✅ Shipped |
|
|
1658
|
+
| **v5.4** | Autonomous Web Scholar — background research pipeline with LLM synthesis | Autonomous research agents | ✅ Shipped |
|
|
1659
|
+
| **v5.5** | SDM Decoder Foundation — pre-allocated typed-array hot loop, zero GC thrash | Kanerva's Sparse Distributed Memory (1988) | ✅ Shipped |
|
|
1660
|
+
| **v5.5** | Architectural Hardening — transactional migrations, graceful shutdown, thundering herd prevention | Production reliability engineering | ✅ Shipped |
|
|
1661
|
+
| **v6.1** | Intuitive Recall — proactive surface of relevant past decisions without explicit search; `session_intuitive_recall` tool | Predictive memory (cognitive science) | ✅ Shipped |
|
|
1662
|
+
| **v6.5** | HDC Cognitive Routing — compositional state-machine with XOR binding, Hamming resolution, and policy-gated routing | Hyperdimensional Computing (Kanerva, Gayler) | ✅ Shipped |
|
|
1663
|
+
| **v6.5** | Cognitive Observability — route distribution, confidence/distance tracking, ambiguity warnings | Production reliability engineering | ✅ Shipped |
|
|
1664
|
+
| **v6.1** | Prism-Port Vault Export — Obsidian/Logseq `.zip` with YAML frontmatter & `[[Wikilinks]]` | Data sovereignty, PKM interop | ✅ Shipped |
|
|
1665
|
+
| **v6.1** | Cognitive Load & Semantic Search — dynamic graph thinning, search highlights | Contextual working memory | ✅ Shipped |
|
|
1666
|
+
| **v6.2** | Synthesize & Prune — automated edge synthesis, graph pruning, SLO observability | Implicit associative memory | ✅ Shipped |
|
|
1667
|
+
| **v7.0** | ACT-R Base-Level Activation — `B_i = ln(Σ t_j^(-d))` recency×frequency re-ranking over similarity candidates | Anderson's ACT-R (Adaptive Control of Thought—Rational) | ✅ Shipped |
|
|
1668
|
+
| **v7.0** | Candidate-Scoped Spreading Activation — `S_i = Σ(W × strength)` bounded to search result set; prevents God-node dominance | Spreading activation networks (Collins & Loftus, 1975) | ✅ Shipped |
|
|
1669
|
+
| **v7.0** | Composite Retrieval Scoring — `0.7 × similarity + 0.3 × σ(activation)`; configurable via `PRISM_ACTR_WEIGHT_*` | Hybrid cognitive-neural retrieval models | ✅ Shipped |
|
|
1670
|
+
| **v7.0** | AccessLogBuffer — in-memory batch-write buffer with 5s flush; prevents SQLite `SQLITE_BUSY` under parallel agents | Production reliability engineering | ✅ Shipped |
|
|
1671
|
+
| **v7.3** | Dark Factory — 3-gate fail-closed EXECUTE pipeline (parse → type → scope) with structured JSON action contract | Industrial safety systems (defense-in-depth, fail-closed valves) | ✅ Shipped |
|
|
1672
|
+
| **v7.2** | Verification-first harness — spec-freeze contract, rubric hash lock, multi-layer assertions, CLI `verify` commands | Programmatic verification systems + adversarial validation loops | ✅ Shipped |
|
|
1673
|
+
| **v7.4** | Adversarial Evaluation — PLAN_CONTRACT + EVALUATE with isolated generator/evaluator roles, pre-committed rubrics, and evidence-bound findings | Anti-sycophancy research, adversarial ML evaluation frameworks | ✅ Shipped |
|
|
1674
|
+
| **v7.5** | Intent Health Dashboard — 3-signal scoring (staleness × TODO × decisions) with NaN guards and score ceiling | Production observability, proactive monitoring | ✅ Shipped |
|
|
1675
|
+
| **v7.7** | Cloud-Native SSE Transport — full network-accessible MCP server via Server-Sent Events | Distributed systems, cloud-native architecture | ✅ Shipped |
|
|
1676
|
+
| **v7.8** | Episodic→Semantic Consolidation — raw event logs distilled into `semantic_knowledge` rules with confidence scoring and instance tracking | Hebbian learning ("neurons that fire together wire together"), sleep consolidation (neuroscience) | ✅ Shipped |
|
|
1677
|
+
| **v7.8** | Multi-Hop Causal Reasoning — spreading activation traverses `caused_by`/`led_to` edges with damped fan effect (`1/ln(fan+e)`) and lateral inhibition | ACT-R spreading activation (Anderson), Collins & Loftus (1975) | ✅ Shipped |
|
|
1678
|
+
| **v7.8** | Uncertainty-Aware Rejection Gate — dual-signal (similarity floor + gap distance) safety layer prevents hallucination from low-confidence retrievals | Metacognition research, uncertainty quantification | ✅ Shipped |
|
|
1679
|
+
| **v7.8** | Dynamic Fast Weight Decay — `is_rollup` semantic nodes decay 50% slower (`ageModifier = 0.5`) than episodic entries, creating Long-Term Context anchors | ACT-R base-level activation with differential decay rates | ✅ Shipped |
|
|
1680
|
+
| **v9.0** | Affect-Tagged Memory — valence-scored retrieval where `abs(valence)` boosts ranking; UX warnings surface historically negative topics | Affect-modulated retrieval (neuroscience), somatic marker hypothesis | ✅ Shipped |
|
|
1681
|
+
| **v9.0** | Surprisal Gate — vector-based novelty pricing: high-surprisal saves cost 0.5× tokens, low-surprisal 2.0×; forces LLM data compression | Information-theoretic surprisal (Shannon), predictive coding | ✅ Shipped |
|
|
1682
|
+
| **v9.0** | Cognitive Budget — per-project token economy with passive UBI recovery (+100 tokens/hr); agents that over-save enter Cognitive Debt | Resource-bounded rationality (Simon, 1955) | ✅ Shipped |
|
|
1683
|
+
| **v9.1** | Task Router v2 — 6-signal weighted heuristic engine routing tasks between cloud host and local LLM based on file-type complexity, scope, and multi-step detection | Heuristic classification, cognitive load theory | ✅ Shipped |
|
|
1684
|
+
| **v9.4** | Shell Injection Fix — `execSync` → `execFileSync` + SHA format validation in git drift detection | Defense-in-depth, secure subprocess execution | ✅ Shipped |
|
|
1685
|
+
| **v9.4** | Command Injection Fix (lifecycle) — PID file injection via `execSync` template literal; remediated with `execFileSync` array args | Defense-in-depth, attack surface reduction | ✅ Shipped |
|
|
1686
|
+
| **v9.2** | Cross-Backend Reconciliation — automatic Supabase → SQLite sync with idempotent dedup and 5s timeout | Eventual consistency, crdt-style reconciliation | ✅ Shipped |
|
|
1687
|
+
| **v9.2** | Split-Brain Drift Detection — dual-backend version comparison with prominent divergence warnings at load time | Byzantine fault detection, split-brain resolution | ✅ Shipped |
|
|
1688
|
+
| **v9.2** | TurboQuant QJL Validation — zero R@5 delta between P50 and P95 residual vectors (d=128, N=2K); CV=0.038 at d=768 proves no long tail | QJL estimator (ICLR 2026), Householder orthogonal rotation | ✅ Shipped |
|
|
1689
|
+
| **v9.2** | Typed Security Errors — `PrototypePollutionError` with `offendingKey` for forensic logging; null-byte path injection guard in SafetyController | Defense-in-depth (NIST), C-string truncation attack mitigation | ✅ Shipped |
|
|
1690
|
+
| **v9.3** | ResidualNorm Tiebreaker — within-ε candidates ranked by compression fidelity (`PRISM_TURBOQUANT_TIEBREAKER_EPSILON`); +2pp R@1, +1pp R@5 at ε=0.005 | Quantization confidence scoring, compression-aware retrieval | ✅ Shipped |
|
|
1691
|
+
| **v10.0** | HIPAA-Hardened Local LLM — `prism-coder:7b` manages ledger compaction, task routing, and semantic search 100% on-device | Air-gapped cognitive pipelines, secure PHI redaction | ✅ Shipped |
|
|
1692
|
+
| **v11.5.1** | Zero-Search Retrieval — no index, no ANN, just ask the vector | Holographic Reduced Representations (HRR) | 🧪 [Field Testing (Synalux)](https://github.com/dcostenco/synalux-docs) |
|
|
1693
|
+
|
|
1694
|
+
---
|
|
1695
|
+
|
|
1696
|
+
### 🧪 Verified Zero-Search Implementation
|
|
1697
|
+
The core unbinding engine is verified via Synalux's cognitive testing suite:
|
|
1698
|
+
- **Core Math**: [Holographic Reduced Representations (hdc.ts)](./src/sdm/hdc.ts)
|
|
1699
|
+
- **Unit Tests**: [HDC Performance & Capacity Tests](./tests)
|
|
1700
|
+
- **Benchmarks**: [O(1) Retrieval Comparison Script](./tests/verification/cli-integration.test.ts)
|
|
1701
|
+
|
|
1702
|
+
> Informed by Anderson's ACT-R (Adaptive Control of Thought—Rational), Collins & Loftus spreading activation networks (1975), Kanerva's SDM (1988), Hebb's learning rule, and LeCun's "Why AI Systems Don't Learn" (Dupoux, LeCun, Malik).
|
|
1703
|
+
|
|
1704
|
+
---
|
|
1705
|
+
|
|
1706
|
+
## 💼 B2B Consulting & Enterprise Support
|
|
1707
|
+
|
|
1708
|
+
Prism MCP is open-source and free for individual developers. For teams and enterprises building autonomous AI workflows or integrating MCP-native memory at scale, we offer professional consulting and setup packages.
|
|
1709
|
+
|
|
1710
|
+
### 🥉 Team Pilot Package
|
|
1711
|
+
*Perfect for engineering teams adopting MCP tools and collaborative agents.*
|
|
1712
|
+
* **What's included:** Full team rollout, managed Supabase configuration (for multi-device sync), Universal Import of legacy chat history, and dedicated setup support.
|
|
1713
|
+
* **Model:** Fixed-price engagement.
|
|
1714
|
+
|
|
1715
|
+
### 🥈 Cognitive Architecture Tuning
|
|
1716
|
+
*For teams building advanced AI agents or autonomous pipelines.*
|
|
1717
|
+
* **What's included:** "Dark Factory" pipeline implementation tailored to your workflows, adversarial evaluator tuning, custom HDC cognitive route configuration, and local open-weight model integration (BYOM).
|
|
1718
|
+
* **Model:** Retainer or project-based.
|
|
1719
|
+
|
|
1720
|
+
### 🥇 Enterprise Integration
|
|
1721
|
+
*Full-scale deployment for high-compliance environments.*
|
|
1722
|
+
* **What's included:** Active Directory / custom JWKS auth integration, Air-gapped on-premise deployment, custom OTel Grafana dashboards for cognitive observability, and custom skills/tools development.
|
|
1723
|
+
* **Model:** Custom enterprise quote.
|
|
1724
|
+
|
|
1725
|
+
**Interested in accelerating your team's autonomous workflows?**
|
|
1726
|
+
[📧 Contact us for a consultation](mailto:inquiries@prism-mcp.com) — let's build your organization's cognitive memory engine.
|
|
1727
|
+
|
|
148
1728
|
---
|
|
149
1729
|
|
|
150
1730
|
## <a name="milestones-roadmap"></a>📦 Milestones & Roadmap
|
|
151
1731
|
|
|
1732
|
+
> **Current: v12.5** — Unified Billing & Agent Skill Ecosystem ([CHANGELOG](CHANGELOG.md))
|
|
1733
|
+
|
|
152
1734
|
| Release | Headline |
|
|
153
1735
|
|---------|----------|
|
|
154
|
-
| **v12.5** |
|
|
155
|
-
| **
|
|
156
|
-
| **
|
|
1736
|
+
| **v12.5** | 💳 **Unified Billing & Agent Skill Ecosystem** — Synalux-priced tiers ($19/$49/$99), 14-day trial, 54 skills, BSL-1.1 license. |
|
|
1737
|
+
| **v11.6.0** | 🏗️ **Agent Infrastructure Resilience** — Production-grade serialized queue, memory guardian, queue watchdog, status dashboard. 115/115 tests. |
|
|
1738
|
+
| **v11.5.1** | 🧠 **Structural GRPO Alignment** — Perfect 100% accuracy cross-validated on Synalux Elite platform. |
|
|
1739
|
+
| **v11.0.1** | 🧪 **Production Stability** — Field-tested Zero-Search logic merge, local logic finalization, HIPAA-hardened security refinement. |
|
|
1740
|
+
| **v11.0** | 🧠 **Zero-Search Retrieval** — Holographic Reduced Representations (HRR) + Deep Research Intelligence [🧪 Field Testing - Synalux](https://synalux.ai/docs) |
|
|
1741
|
+
| **v10.0** | 🛡️ **HIPAA-Hardened Local LLM** — `prism-coder:7b` powers compaction + task routing 100% on-device. |
|
|
1742
|
+
| **v9.14** | 🧬 Dynamic Hardware Routing & Semantic Tool RAG — MLX SFT pipeline, Nomic pruning, GRPO alignment |
|
|
1743
|
+
| **v9.13** | 🔬 Local Embeddings & Zero-API-Key Semantic Search — `nomic-embed-text-v1.5` on-device |
|
|
1744
|
+
| **v9.5** | 🛡️ Adversarial Behavioral Hardening — 24 forbidden openers, XML anti-tag system, sycophancy defense |
|
|
1745
|
+
| **v9.4** | 🔒 Security Sweep — command injection, path traversal, CORS, fail-closed rate limiter, bidirectional sync |
|
|
1746
|
+
| **v9.0** | 🧠 Autonomous Cognitive OS — Surprisal Gate, Cognitive Budget, Affect-Tagged Memory |
|
|
1747
|
+
| **v7.8** | 🧠 Cognitive Architecture — Hebbian consolidation, multi-hop reasoning, rejection gate |
|
|
1748
|
+
| **v7.0** | 🧬 ACT-R Activation Memory |
|
|
1749
|
+
|
|
1750
|
+
### Future Tracks
|
|
1751
|
+
- **v12.0: Distal Memory** — Semantic clustering of long-term history with Active-Prism background maintenance.
|
|
1752
|
+
- **v13.0: Team Handoff** — Encrypted peer-to-peer session syncing with multi-agent task routing and verifiable memory.
|
|
1753
|
+
|
|
1754
|
+
👉 **[Full ROADMAP.md →](ROADMAP.md)**
|
|
1755
|
+
|
|
1756
|
+
|
|
1757
|
+
## <a name="troubleshooting-faq"></a>❓ Troubleshooting FAQ
|
|
1758
|
+
|
|
1759
|
+
**Q: Why is the dashboard project selector stuck on "Loading projects..."?**
|
|
1760
|
+
A: Fixed in v7.3.3. The root cause was a multi-layer quote-escaping trap in the `abortPipeline` onclick handler that generated a `SyntaxError` in the browser, silently killing the entire dashboard IIFE. Update to v7.3.3+ (`npx -y prism-mcp-server`). If still stuck, check that Supabase env values are properly set (unresolved placeholders like `${SUPABASE_URL}` cause `/api/projects` to return empty). Prism auto-falls back to local SQLite when Supabase is misconfigured.
|
|
1761
|
+
|
|
1762
|
+
**Q: Why is semantic search quality weak or inconsistent?**
|
|
1763
|
+
A: Check embedding provider configuration and key availability. Missing embedding credentials reduce semantic recall quality and can shift behavior toward keyword-heavy matches.
|
|
1764
|
+
|
|
1765
|
+
**Q: How do I delete a bad memory entry?**
|
|
1766
|
+
A: Use `session_forget_memory` for targeted soft/hard deletion. For manual cleanup and merge workflows, use the dashboard graph editor.
|
|
1767
|
+
|
|
1768
|
+
**Q: How do I verify the install quickly?**
|
|
1769
|
+
A: Run `npm run build && npm test`, then open the Mind Palace dashboard (`localhost:3000`) and confirm projects load plus Graph Health renders.
|
|
1770
|
+
|
|
1771
|
+
|
|
1772
|
+
---
|
|
1773
|
+
|
|
1774
|
+
### 💡 Known Limitations & Quirks
|
|
157
1775
|
|
|
158
|
-
|
|
1776
|
+
- **Some advanced text features may still benefit from a cloud API key.** While `prism-coder:7b` handles core compaction and routing, high-level features like Morning Briefings and complex VLM captioning are optimized for cloud providers (`GOOGLE_API_KEY`, `OPENAI_API_KEY`, or `ANTHROPIC_API_KEY`). Semantic search and basic compaction work 100% offline with `embedding_provider=local`.
|
|
1777
|
+
- **Auto-load is model- and client-dependent.** Session auto-loading relies on both the LLM following system prompt instructions *and* the MCP client completing tool registration before the model's first turn. Prism provides platform-specific [Setup Guides](#setup-guides) and a server-side fallback (v5.2.1) that auto-pushes context after 10 seconds.
|
|
1778
|
+
- **MCP client race conditions.** Some MCP clients may not finish tool enumeration before the model generates its first response, causing transient `unknown_tool` errors. This is a client-side timing issue — Prism's server completes the MCP handshake in ~60ms. Workaround: the server-side auto-push fallback and the startup skill's retry logic.
|
|
1779
|
+
- **No real-time sync without Supabase.** Local SQLite mode is single-machine only. Multi-device or team sync requires a Supabase backend.
|
|
1780
|
+
- **Embedding quality varies by provider.** Gemini `text-embedding-004` and OpenAI `text-embedding-3-small` produce high-quality 768-dim vectors. Prism passes `dimensions: 768` via the Matryoshka API for OpenAI models (native output is 1536-dim; this truncation is lossless and outperforms ada-002 at full 1536 dims). Local embeddings (`nomic-embed-text-v1.5` via `@huggingface/transformers`) provide good quality with zero API cost. Ollama embeddings are usable but may reduce retrieval accuracy.
|
|
1781
|
+
- **Dashboard is HTTP-only.** The Mind Palace dashboard at `localhost:3000` does not support HTTPS. For remote access, use a reverse proxy (nginx/Caddy) or SSH tunnel. Basic auth is available via `PRISM_DASHBOARD_USER` / `PRISM_DASHBOARD_PASS`. JWKS JWT auth is available via `PRISM_JWKS_URI` for agent-native authentication (works with Auth0, AgentLair ([llms.txt](https://agentlair.com/llms.txt)), Keycloak, Cognito, or any standard JWKS endpoint).
|
|
1782
|
+
- **Long-lived clients can accumulate zombie processes.** MCP clients that run for extended periods (e.g., Claude CLI) may leave orphaned Prism server processes. The lifecycle manager detects true orphans (PPID=1) but allows coexistence for active parent processes. Use `PRISM_INSTANCE` to isolate instances across clients.
|
|
1783
|
+
- **Migration is one-way.** Universal Import ingests sessions *into* Prism but does not export back to Claude/Gemini/OpenAI formats. Use `session_export_memory` for portable JSON/Markdown export, or the `vault` format for Obsidian/Logseq-compatible `.zip` archives.
|
|
1784
|
+
- **Export ceiling at 10,000 ledger entries.** The `session_export_memory` tool and the dashboard export button cap vault/JSON exports at 10,000 entries per project as an OOM guard. Projects exceeding this limit should use per-project exports and time-based filtering to stay within the ceiling. This limit does not affect search or context loading.
|
|
1785
|
+
- **No Windows CI testing.** Prism is developed and tested on macOS/Linux. It should work on Windows via Node.js, but edge cases (file paths, PID locks) may surface.
|
|
159
1786
|
|
|
160
1787
|
---
|
|
161
1788
|
|
|
@@ -165,4 +1792,4 @@ BUSL-1.1
|
|
|
165
1792
|
|
|
166
1793
|
---
|
|
167
1794
|
|
|
168
|
-
<sub>**Keywords:** MCP server, Model Context Protocol, AI agent memory, cognitive architecture, local-first, SQLite MCP, Mind Palace, time travel, OpenTelemetry, GDPR, business, enterprise, hipaa</sub>
|
|
1795
|
+
<sub>**Keywords:** MCP server, Model Context Protocol, Claude Desktop memory, persistent session memory, AI agent memory, cognitive architecture, ACT-R spreading activation, Hebbian learning, episodic semantic consolidation, multi-hop reasoning, uncertainty rejection gate, local-first, SQLite MCP, Mind Palace, time travel, visual memory, VLM image captioning, OpenTelemetry, GDPR, agent telepathy, multi-agent sync, behavioral memory, cursorrules, Ollama MCP, Brave Search MCP, TurboQuant, progressive context loading, knowledge management, LangChain retriever, LangGraph agent, business, enterprise, hipaa</sub>
|