Prism Coder

Give your AI agent memory that lasts. Persistent sessions, knowledge graphs, and offline tool-routing — fully local and free.

npm MCP Registry License: Apache-2.0 Models on HuggingFace

Prism Coder is an MCP server that gives Claude, Cursor, and other AI tools long-term memory that survives across sessions. It ships with the open-weight prism-coder model fleet (2B–27B) for fast, offline tool-routing — no cloud required.

No account needed. No API keys. Runs on your machine.
A paid subscription adds cloud sync, higher model tiers, and team features through the Synalux portal.


What Prism gives you

  • Session memory that survives restarts — resume projects with handoff notes, recent work, open TODOs, and configurable quick, standard, or deep context.
  • Local-first inference — bounded work is routed through local Ollama models first, with automatic 2B/4B/9B/27B selection based on installed models, available RAM, context fit, and subscription entitlements.
  • One setup for every agentprism connect configures Claude Code, Claude Desktop, Cursor, Gemini CLI, and Codex while preserving unrelated settings.
  • Subscription-aware skills — entitled skills are synchronized before the host launches, with safe upgrades, downgrades, conflict preservation, and offline last-good recovery.
  • Hook-free startup — MCP metadata and native instructions request Prism's startup context without requiring lifecycle hooks or a Prism-owned launcher.
  • Safe escalation and observability — inference outcomes are explicit, reserved content remains fail-closed, and local/cloud usage is recorded for review.

Get started

npm install -g prism-mcp-server
prism connect

Use prism connect --dry-run to preview changes, prism connect --all to configure every detected host, or prism connect --refresh to reconcile Prism-managed entries after an upgrade. Restart the host after connecting.

Prism works locally without an account, API key, or cloud subscription. Add a Synalux subscription when you want cloud memory, paid-tier skills, or team features.


What's New in v20.2.2

One Local-First Workflow Across Every Agent

prism connect now installs one orchestration contract for Claude Code, Claude Desktop, Cursor, Gemini CLI, and Codex. Bounded delegated work goes to session_task_route and the local prism_infer worker first; routine work must not create background host agents. Local workers can receive the active project's dashboard-configured quick, standard, or deep memory and select a RAM-safe 2B/4B/9B/27B model at call time. The router forwards complexity but does not choose the model; prism_infer owns the final decision using memory and context fit, installed models, live RAM, entitlements, and explicit caller overrides.

Codex and Gemini native agent fan-out are disabled during connect. Codex keeps a two-thread, one-level Terra/low fallback profile if the developer explicitly re-enables native agents later. Claude Code keeps native agents as a last-resort path but pins their model to Sonnet. Cursor and Claude Desktop do not expose a supported global subagent-policy file, so they receive the identical workflow through Prism's MCP server instructions. prism_infer safety boundaries and the host's final verification responsibility are unchanged.

Subscription-Tier Skills Arrive Before the First Host Launch

prism connect now downloads the authoritative Synalux skill manifest and materializes entitled packages in the native ~/.agents/skills directory before the command exits. Codex therefore sees the current skillset on its first launch instead of requiring a second restart. Prism rechecks the same snapshot at MCP startup, session load, and every five minutes—without host lifecycle hooks.

On the first user turn, Prism's native skill, MCP metadata, and managed host instructions request one session_bootstrap({}) call. Prism then uses the dashboard's developer name, Auto-Load Projects, and quick, standard, or deep setting. The response stays focused on greeting and session state because tier skills are already present in the host's native skill directory.

Hook-free MCP can provide and prioritize that ready-to-display block, but the host model still owns the final assistant message and may summarize it. Prism does not claim a deterministic verbatim greeting on third-party chat surfaces; that would require a host lifecycle hook, launcher, extension, or Prism-owned panel. Context loading itself remains complete even when a host shortens the visible reply.

Free accounts receive the protected 12-skill foundation. Paid accounts receive the current subscribed routing set. Upgrades install newly entitled packages; downgrades remove only Prism-owned packages while preserving local skills and locally modified conflicts.

When upgrading an older Claude Code installation, prism connect removes only the exact Prism-owned startup, skill-sync, handoff, and drift hook actions from the legacy bootstrap. It also removes the recognized legacy Prism startup sections from ~/CLAUDE.md, preserves every other instruction, and installs a small ownership-marked native block that selects session_bootstrap({}) on the first turn. User hooks, custom instruction sections, and near matches remain untouched; native skills and server-side reminders preserve those Prism features without host lifecycle hooks. Because hosts expose no native session-end callback, handoff at shutdown is instruction-driven rather than a guaranteed lifecycle event.

After Claude Code's native user registration succeeds, the same default or --refresh command checks the nearest .mcp.json from the current directory through the home directory. It removes only the exact legacy prism-mcp entry { "command": "npx", "args": ["-y", "prism-mcp-server"] } that would otherwise shadow the user registration. Custom Prism entries and their additional fields, plus unrelated servers, are preserved; malformed files fail loud without changes. --dry-run reports the recognized migration without changing the file.


What's New in v20.2.1

Subscription-Aware Memory Storage

prism connect now carries an explicit PRISM_STORAGE=auto|local|synalux|supabase into every managed host registration and rejects invalid values before changing a config file. In auto, a portal-confirmed free tier uses local SQLite, while Standard, Advanced, and Enterprise use Synalux cloud memory. If entitlement resolution is unavailable, Prism fails closed instead of splitting history across backends. Storage remains independent of local-first model routing.


What's New in v20.2.0

One Command Connects Every Supported Host

Install Prism globally and run prism connect. It detects Claude Code, Claude Desktop on macOS, Windows, and Linux (beta), Cursor, Gemini CLI, and Codex, then safely registers the server from the installed package. Existing custom entries are untouched; --dry-run previews changes and --refresh updates only Prism-managed entries.


What's New in v20.1.0

Every Inference Outcome Is Now Observable

prism_infer gains a failure contract: pass escalation: "report" and every call returns a structured gate_outcomesuccess, degraded (gate-failed output served anyway, explicitly flagged), or refused (typed, with reason, instead of a thrown error). Degraded output can no longer serve silently.

Big Prompts Work Locally

Prompts over 4000 chars were blanket-refused when cloud was off. Now the full text gets a deterministic reserved-keyword scan plus a head+middle+tail excerpt classification — clean oversize prompts serve locally with a distinct UNCERTAIN_LENGTH audit marker. Clinical/reserved handling is unchanged (and its keyword floor got stronger).

No More Silent Truncation

Tier context limits now match the live Modelfiles (27b/9b are 4096-token models; 4b/2b are 32768 — the old table had it backwards). Tiers that can't hold your prompt are skipped with a visible ctx_insufficient reason; if nothing fits, you get the full prompt on cloud or a loud error — never an answer computed from a silently-clipped prompt.

Know Which Plan You're Actually Running Under

Entitlements carry a source field: portal (real), unconfigured (free by design), or fallback_free (portal unreachable — free limits ASSUMED). Pass strict_entitlements: true to fail loud instead of running degraded.


What's New in v20.0.8

verify_behavior Works Again

The verify_behavior tool crashed on every call (-32602 expected object, received string) — the handler returned a bare string instead of an MCP CallToolResult object. Fixed, with contract + fail-closed regression tests so the safety gate can never silently break again. If you're on 20.0.6/20.0.7, update.

From v20.0.7: Reserved-Content Safety, Skills Auth, Delegation Metrics

Reserved clinical content is now Claude-or-refuse (never served by a smaller model than the one that refused it), skill delivery gained a JWT auth fallback (paid-tier skills now reach machines using only PRISM_SYNALUX_API_KEY), and every prism_infer call is recorded in a persistent infer_metrics ledger. Full details in CHANGELOG.md.


What's New in v20.0.5

Local-First Delegation — 15 Categories, Measured Rate

The local-inference-first skill covers 15 hard-trigger categories (code gen, regex, format conversion, summarization, documentation, factual lookup, classification, shell commands, config gen, and more). Pasted code blocks now trigger delegation regardless of question phrasing. Measured delegation rate: 30-35% on engineering sessions, 40-60% on transform/content sessions. Rate depends on prompt mix, not the skill — the instruments now self-validate with nonDelegatedCount to prevent curated-set tautologies.

Think-Only Retry (v20.0.4)

Qwen 3.5 models (9B/27B) with thinking enabled could burn all tokens on <think> blocks and return empty content, causing a cascade to 4B. Now detects think-only responses and retries the same tier with thinking disabled — preserving model quality instead of falling to a smaller model.


What's New in v20.0.3

Layer 1 Cold-Model Resilience

The reserved-category classifier now retries once with a longer timeout on cold-model failure, then falls back to a deterministic keyword backstop before refusing. Over-length prompts (>4K chars) are classified as UNCERTAIN before reaching the classifier — prompt padding can no longer force the ERROR branch. This eliminates the cold-start refusal problem without weakening the safety gate.

Keyword Backstop for Reserved Content

When the LLM classifier fails (timeout, injection, resource pressure), a deterministic regex floor catches reserved vocabulary (restraint, seclusion, self-harm, suicide, overdose, crisis de-escalation, etc.) including inflected and verb forms. Blocks prompt-padding and classifier-injection attacks on the ERROR path.

Single-Source Safety Text

The safety statement in the MCP server instructions field now imports from boundaries.ts — one source of truth instead of two hand-maintained copies. Boundaries version bumped to v3 with an explicit delivery decision documented in code.

Reserved-Category Safety Gate — All Tiers (v20.0.2)

The Layer 1 semantic classifier now runs for every user, not just paid tiers. Reserved clinical content is refused on free tier when cloud is unavailable — fail-closed.

Ledger Dedup (v20.0.2)

session_save_ledger deduplicates identical entries within a 5-minute window.

Evidence Script (v20.0.2)

scripts/generate-evidence.sh regenerates all 5 evidence files with built-in assertions. Run bash scripts/generate-evidence.sh to verify the full pipeline.


What's New in v20.0.0

License: AGPL-3.0 → Apache-2.0

Prism MCP is now Apache-2.0. The thin-client architecture means all proprietary value (skill resolution, tier gating, billing, cloud inference) lives server-side — the open client carries no moat to protect. Apache-2.0 removes the enterprise adoption friction that AGPL caused.

Thin Client Architecture

Skill routing, budget management, and content resolution have moved server-side to the Synalux portal. The MCP client is now a thin API caller — simpler, smaller, and portable across any host (Claude Code, Gemini, Cursor, autonomous scripts). Offline fallback reads the last successful response from local SQLite.

Clean-Room Voyage AI Adapter

The Voyage AI embedding adapter was independently reimplemented from the Voyage API docs to ensure 100% project-owned copyright. Default model updated to voyage-3.5. See PROVENANCE.md for details.

Server-Side Drift Detection

Session drift detection (GATE 5) no longer requires Claude Code hooks. The timer runs server-side per conversation, piggybacked on every MCP tool response. Works for any host.

CLA Requirement

External contributions now require signing the Individual CLA. The CLA check is merge-blocking on the main branch.


Quickstart

The free tier needs no account, no API key, and no cloud. Install Prism, then register it with every supported MCP host already installed on your machine:

npm install --global prism-mcp-server
prism connect

prism connect detects Claude Code, Claude Desktop (macOS/Windows/Linux), Cursor, Gemini CLI, and Codex. Use prism connect --all to target all five, --host <name> for one host, or --dry-run to preview the files that would change. Existing prism and prism-mcp entries are never overwritten by default. --refresh updates only an entry previously created by Prism; custom entries remain untouched. For Claude Code, both the default command and --refresh also remove the exact legacy project-scoped npx -y prism-mcp-server entry from the effective ancestor .mcp.json after the native user registration succeeds. No custom or near-match project entry is changed. Close the target MCP hosts before a non-dry-run registration so they cannot edit their configuration at the same time.

The same connection installs the local-first orchestration contract:

Host Managed containment
Codex features.multi_agent=false; a 2-thread, depth-1 Terra/low fallback profile is retained for explicit re-enable
Gemini CLI experimental.enableAgents=false
Claude Code CLAUDE_CODE_SUBAGENT_MODEL=sonnet; managed instructions reserve it for last-resort fallback
Cursor Canonical policy delivered through MCP initialize instructions
Claude Desktop Canonical policy delivered through MCP initialize instructions

All five receive PRISM_AGENT_POLICY=local-first in their managed Prism MCP entry. Routine tasks use the RAM-aware local worker; native/background fan-out is not the default workflow. session_task_route supplies a complexity hint; prism_infer remains the single owner of model and thinking selection and can choose 27B when its viability gates support it.

Set PRISM_STORAGE before running prism connect to preserve an explicit storage choice in the generated host entries. This does not change local-model routing; Synalux cloud storage separately requires an active cloud-memory entitlement.

Codex registration preserves unrelated ~/.codex/config.toml content, appends only the marked Prism MCP block, and updates only the documented local-first feature/agent keys. CODEX_HOME is respected when set and must already exist, matching Codex's own contract. Restart Codex CLI, the IDE extension, or the ChatGPT desktop app after connecting.

Restart the connected host and your agent now has memory backed by a local SQLite database (~/.prism-mcp/data.db). See IDE setup for manual configuration and host-specific paths.

Optional — local model fleet for offline tool-routing. Pull whichever fits your hardware:

ollama pull dcostenco/prism-coder:2b    # 2.3 GB · mobile / lightweight (99.1% routing accuracy)
ollama pull dcostenco/prism-coder:4b    # 3.4 GB · verifier (100% accuracy)
ollama pull dcostenco/prism-coder:9b    # 5.8 GB · default router (100% accuracy, Qwen3.5)
ollama pull dcostenco/prism-coder:27b   # 16 GB  · complex tasks (100% accuracy)

Prism detects both the namespaced (dcostenco/prism-coder:9b) and bare (prism-coder:9b) Ollama tags automatically.


What it does

Your AI agent forgets everything between sessions. Prism fixes that — and adds verification, drift detection, and multi-agent coordination on top.

Mind Palace — persistent memory that survives across sessions

Every conversation feeds a persistent store. The next session loads the right context automatically — no re-explaining.

The dashboard shows your current project state, pending TODOs, intent health, and a neural knowledge graph — all built automatically from your agent sessions.

Knowledge Graph — semantic + keyword + graph search

Ask "what did I decide about the auth flow last month?" and get an answer with citations, combining vector similarity, full-text search, and graph traversal.

Session History — immutable audit trail

Every session is logged with files changed, decisions made, and TODOs. Search, filter, and replay any past session.

Inference Metrics — see where your tokens go

Every prism_infer call tracks which model handled it (local Ollama vs cloud) and how many tokens were consumed. When you save a session, Prism shows a summary:

📊 Inference Metrics (this session):
  Total calls: 12 — Local: 10 (83%) | Cloud: 2 (17%)
  Prompt tokens: 7,840 evaluated / 8,420 submitted est.
  Completion tokens: 3,150
  Cloud tokens saved (est.): 11,570 — token volume handled locally instead of cloud
  Avg latency: 1,240ms
  By model:
    prism-coder:27b: 6 calls, 7,200 tokens, avg 1,800ms
    prism-coder:9b: 4 calls, 2,870 tokens, avg 620ms
    synalux-27b: 2 calls, 1,500 tokens, avg 1,100ms

Cloud tokens saved is the honest routing metric — it accrues only when local Ollama handles a call that would otherwise have gone to Claude or the Synalux portal. A compact version appears inline after every 5th prism_infer call: 📊 local 10 (83%) · cloud 2 (17%) · ~11,570 tok · avg 1,240ms · 11,570 cloud tok saved.

Local calls use actual Ollama token counts (prompt_eval_count / eval_count from Ollama); cloud calls use char/4 estimates. Metrics are tracked locally — no portal dependency, no env vars, works offline. Per-call data is also forwarded to the Synalux portal as best-effort analytics (independent of the display).

Session Drift Detection

Long agent sessions can wander from their original goal. session_detect_drift compares current work against the stated goal and returns on_track / minor_drift / major_drift so the agent can self-correct.

Behavioral Verification — catch bad edits before they happen

AI agents apply patterns from checklists without understanding the real-world impact. The verify_behavior tool challenges the agent with a scenario it must answer before editing — forcing it to think through what the end user will experience.

Agent: "I'll revert this kitchen display change"
Prism: "⚠️ Scenario: A cook sees a 3-item ticket. One item is voided.
        What should the cook see after the void?"
Agent: "The ticket stays visible with the remaining 2 items."
Prism: "Correct — your revert would hide the ticket entirely."

17 built-in domains (billing, auth, ordering, clinical, HR, and more). Custom domains per workspace on Enterprise. No hooks needed — works in any MCP client.

Time Travel

Roll back to any previous session state. Compare diffs between versions. Restore a known-good state with one click.

Cognitive Routing

Three memory types, automatically sorted: episodic (what happened — session logs, decisions), semantic (what's true — facts, architecture), and procedural (how to do X — workflows, patterns). When you search, the router picks the right store instead of dumping everything.

Multi-Agent Hivemind

Coordinate multiple AI agents working on the same project. Each agent has its own session, but they share memory through the knowledge graph. The Hivemind Radar shows real-time agent status, tasks, and activity.

Neural Search

Search across all memories with highlighted results, knowledge graph editing, and memory density metrics.


Local-first and privacy

The free tier runs entirely on your machine. Paid tiers add cloud sync through the Synalux portal, which is what enables cross-device memory and team sharing.

Local tier (free) Cloud tier (paid)
Memory storage Local SQLite Synalux portal (Supabase-backed)
Inference Local Ollama models Local models + cloud fallback
API keys required None Synalux subscription key
Web search / scrape Not included Via Synalux portal (provider keys server-side)
What leaves your machine Nothing Memory text + file paths + search queries, sent to the portal over TLS (PHI-redacted before transit)
Works offline Local features yes; sync/cloud no

Handling sensitive data. All cloud writes pass through automatic redaction (SSNs, dates of birth, medical record numbers, phone numbers, emails, and clinical identifiers are stripped before transit). For regulated workloads, run the local tier for full air-gap, or use Enterprise which includes a HIPAA Business Associate Agreement.


Models

The prism-coder fleet uses Qwen3.5 for MCP tool-routing AND general inference. The 9B and 27B are fine-tuned with LoRA (r=128, all 64 layers including DeltaNet); the 2B and 4B use stock Qwen3.5-4B at different quantization levels. The 27B scored 100% on BFCL function-calling and 100% on an internal 15-problem coding eval at $0 inference cost.

prism_infer supports three modes: route (tool routing, fast, nothink), chat (conversation with thinking), and code (code generation with thinking). In chat/code modes, the model uses <think> blocks for chain-of-thought reasoning, which are stripped before the response is served. If the local model fails a quality gate (empty, think-only, or truncated), paid tiers automatically escalate to Claude via the Synalux portal.

Model Ollama tag Size BFCL Accuracy Role Tier
Qwen3.5-4B Q3_K_M prism-coder:2b 2.3 GB 99.1% × 3 seeds iPhone / mobile first gate Free
Qwen3.5-4B Q4_K_M prism-coder:4b 3.4 GB 100% × 3 seeds Verifier Free
Qwen3.5-9B (LoRA) prism-coder:9b 5.8 GB 100% × 3 seeds Default router Standard+
Qwen3.5-27B (LoRA) prism-coder:27b 16 GB 100% × 3 seeds Quality tier (DeltaNet, 28.5 tok/s) Advanced+

Weights: huggingface.co/dcostenco (public GGUF). Latency depends on model size and hardware — see Benchmarks to measure it on your own machine rather than trusting a printed number.

Cascade

query → prism-coder:9b (local router, default)
      → prism-coder:4b (grounding verifier)
      → prism-coder:2b (iPhone / mobile, auto-selected by RAM)
      → prism-coder:27b (complex tasks, on demand)
      → cloud fallback (paid tiers, for max quality)

Multi-Layer Verification

Every tool-grounded answer on paid tiers passes through deterministic L3 routing rules and an NLI grounding verifier before reaching the user. Free-tier users get the deterministic gates (L1, L3-Tool, L3-Tier0) without the model-based NLI check.

Layer What Model Cost
L1 Crisis/medical safety gate None (regex) 0 ms
L3-Tool Tool name remap + false-positive rejection None (deterministic) 0 ms
L3-Tier0 Integer grounding (set membership) None (deterministic) 0 ms
L3-Tier2 NLI verifier (claim → ENTAILED/NEUTRAL/CONTRADICTED) prism-coder:2b ~200 ms
L4 Hallucination judge (opt-out for clinical) prism-coder:4b ~500 ms

Fail-closed on the verified path: when the grounding verifier runs (Standard tier and up), timeout, ambiguity, or missing evidence yields a refusal, not pass-through. Free-tier users get the deterministic L1/L3-Tool gates but not the NLI verifier.


Benchmarks

Reproduce every number yourself. All evals are open-source and self-contained:

git clone https://github.com/dcostenco/prism-coder && cd prism-coder
pip install anthropic requests
python3 tests/benchmarks/prism-routing-100/benchmark.py --models 2b 4b 9b 27b

Routing eval (115 cases, 12 categories, 3-seed mean). Routing accuracy includes the deterministic L3 correction layer — the same rules that run in production. On this narrow tool-routing task all fleet models achieve near-perfect accuracy. Be honest with yourself about what that means: the eval is near-saturated for this taxonomy — it measures whether the right one of a small set of MCP tools is selected, not general capability. The useful takeaway is offline routing reliability at zero cost, not that a 2.3 GB model rivals a frontier model in general.

Model Routing accuracy Notes
prism-coder:2b (Q3_K_M) 99.1% × 3 seeds 1 failure: regex→knowledge_search
prism-coder:4b / 9b / 27b 100% × 3 seeds Perfect on all 115 cases
Claude (frontier, same eval) ~98% Stronger everywhere outside this narrow task

Memory uplift (LoCoMo-Plus, self-published). A separate long-context dialogue benchmark (dcostenco/Locomo-Plus) measures how much structured memory helps a base model retain multi-day context. Results show large gains when a model is paired with Prism memory versus running raw. Note this benchmark is authored, run, and LLM-judged by this project — treat it as a reproducible demonstration, not an independent third-party result, and run it yourself with the commands in that repo.

Code Generation Quality (27B vs Claude Opus)

Three progressively harder Python tasks run through prism_infer(mode:"code", think:true) on the local 27B and compared with Claude Opus. Both produce correct, production-quality code. The 27B is slightly more verbose (docstrings, examples); Opus is slightly tighter (__slots__, early-exit DFS). On routine coding the 27B at $0 replaces cloud calls entirely.

Task Local 27B Claude Opus Verdict
Fibonacci with memoization @lru_cache, ValueError on negative, docstring Nested _fib to keep cache private Both correct, equivalent
LRU Cache (OrderedDict, O(1)) Any keys, isinstance capacity check, __repr__ Hashable key type (more precise), same ops Both correct, Opus marginally tighter
Trie with autocomplete .lower() normalization, collect+sort+slice __slots__ on TrieNode, early-exit DFS at limit Both correct, Opus slightly more optimized
class TrieNode:
    def __init__(self):
        self.children: dict[str, 'TrieNode'] = {}
        self.is_end_of_word: bool = False

class Trie:
    def __init__(self):
        self.root: TrieNode = TrieNode()

    def insert(self, word: str) -> None:
        node = self.root
        for char in word.lower():
            if char not in node.children:
                node.children[char] = TrieNode()
            node = node.children[char]
        node.is_end_of_word = True

    def search(self, word: str) -> bool:
        node = self._get_node(word.lower())
        return node is not None and node.is_end_of_word

    def starts_with(self, prefix: str) -> bool:
        return self._get_node(prefix.lower()) is not None

    def autocomplete(self, prefix: str, limit: int = 5) -> list[str]:
        node = self._get_node(prefix.lower())
        if node is None:
            return []
        results: list[str] = []
        self._collect_words(node, prefix.lower(), results)
        results.sort()
        return results[:limit]

    def _get_node(self, key: str) -> 'TrieNode | None':
        node = self.root
        for char in key:
            if char not in node.children:
                return None
            node = node.children[char]
        return node

    def _collect_words(self, node: TrieNode, prefix: str, results: list[str]) -> None:
        if node.is_end_of_word:
            results.append(prefix)
        for char, child in sorted(node.children.items()):
            self._collect_words(child, prefix + char, results)
Metric Local 27B Cloud (Opus)
Latency (Trie task) ~30s ~8s
Cost $0 ~$0.05
Think mode Enabled (stripped before serving) N/A
Quality gate Passed (no escalation needed) N/A

Cloud Escalation in Practice (cloud_fallback: true)

The same three tasks with cloud_fallback: true — the quality gate decides whether local output is good enough or needs cloud escalation.

Task used_cloud Quality Gate Latency What happened
Fibonacci (simple) no Passed 11s 27B served directly, $0
LRU Cache (medium) no Passed 21s 27B served directly, $0
Trie (hard) yes loop_detected 55s 27B looped → gate caught it → escalated to cloud 27B

The quality gate detected repeated sentences (≥3 of the same sentence in ≥6 total) in the 27B's Trie output and escalated automatically. The cloud fallback returned clean code. On a second run of the same prompt, the 27B produced clean output without escalation — the loop is stochastic, not systematic.

Takeaway: for ~80–90% of coding tasks, the 27B handles everything locally at $0. The quality gate + cloud escalation exists as a safety net for the remaining cases where the local model loops, truncates, or produces empty output. Paid tiers get automatic escalation; free tier gets the local result with a warning.


Why Prism Coder

vs AI coding assistants

Product capabilities and plans change frequently. The comparison below is intentionally limited to publicly documented differences; it is not a claim that another product lacks an unlisted feature.

Legend: ✅ documented, ◐ conditional or plan-dependent, — not compared, ? verify with the provider.

Capability Prism Coder GitHub Copilot Cursor Amazon Q Developer
Local/open-weight inference
Offline workflow ? ?
Cross-session memory ◐ (docs)
MCP integration ✅ (docs) ✅ (pricing)
Local-first model routing
Session drift and grounding checks
Setup surface ✅ five hosts ✅ CLI/IDE ✅ editor/agents ✅ IDE/CLI (overview)
Pricing model ✅ Synalux tiers ◐ (pricing) ✅ free + $19 Pro (pricing)

Prism-specific compliance, contractual, and pricing terms are documented in the Synalux service agreement. Do not infer a competitor's HIPAA, BAA, or data handling status from this table.

vs local AI / memory tools

Feature Prism Coder Ollama LM Studio Mem0 Zep
Local inference cascade ✅ runtime ✅ app
Cloud fallback ✅ optional ◐ provider-dependent
Persistent memory ◐ project context
Knowledge/tool integration ✅ MCP + ingestion ◐ APIs ◐ integrations ✅ SDK/API ✅ SDK/API
MCP server ✅ native ◐ client integration ◐ client integration ◐ client integration

Pricing

Prism's current published tiers are listed below. Competitor pricing is usage- and plan-dependent, so consult the provider directly: GitHub Copilot, Cursor, and Amazon Q Developer.


Plans

All on-device models are free to run locally via Ollama on every tier. A subscription gates cloud features, higher model ceilings, and increased limits. Local model ceilings are advisory — on-device models run on your Ollama regardless of plan; the ceiling gates cloud inference and prism_infer routing.

Free Standard $19/mo Advanced $49/mo Enterprise $99/mo
Seats 1 1 up to 5 up to 25
Local model ceiling up to 4b up to 9b up to 27b up to 27b
Cloud inference -- ✅ (priority)
Cloud Coder (Web IDE) -- ✅ (priority)
Cloud search --
Max output tokens 512 1,024 2,048 4,096
Cloud fallback -- Claude Opus 4.7 Claude Opus 4.7 Priority + Opus 4.7
Grounding verifier (fact-check AI output) --
Memory sync (cloud) --
Knowledge / session memory limited unlimited unlimited unlimited
Analytics dashboard --
HIPAA BAA -- -- --

14-day free trial on paid plans. 25+ seats: contact sales


How agents use it

Prism exposes 40+ MCP tools. The core memory loop:

Tool What it does
session_bootstrap Hook-free first-turn greeting and dashboard-configured context
session_load_context Explicit project reload or older-server startup fallback
session_save_ledger Append an immutable session log entry
session_save_handoff Save live state for the next session
knowledge_search Semantic + keyword search over all memories
query_memory_natural Natural-language Q&A over the memory store
session_detect_drift Detect when a session has drifted from its goal
verify_behavior Pre-edit scenario challenge — catch bad changes before they happen
knowledge_ingest Teach Prism a codebase or document
prism_infer Local-first inference (route/chat/code modes, thinking, cloud escalation)
inference_metrics Session delegation or persisted MCP + VS Code panel local/cloud stats

prism_infer — local-first inference with cloud escalation

prism_infer({
    prompt: "Write a binary search in Python",
    mode: "code",        // "route" | "chat" | "code"
    think: true,          // enable <think> reasoning (default: true for chat/code)
    model_ceiling: "27b", // use the quality tier
})
// → 27B generates code locally ($0), with thinking for quality
// → If quality gate fails + paid tier → auto-escalate to Claude
Mode Think Model Use case
route Off (fast) 9B default MCP tool routing
chat On 27B preferred Conversation, reasoning
code On 27B preferred Code generation, debugging

Full TypeScript signatures live in src/tools/; architecture in docs/ARCHITECTURE.md.

inference_metrics — see your local-model usage on demand

Call inference_metrics anytime mid-session to see how many prism_infer calls ran locally vs cloud. Use period: "all" to atomically import the Synalux VS Code panel spool and include its local-serve rate in the persisted totals:

📊 Inference Metrics — local-model delegation (this session):
  Total calls: 5 — Local: 5 (100%) | Cloud: 0 (0%)
  Tokens: 1,240 in + 380 out = 1,620 total
  Avg latency: 420ms
  By model:
    prism-coder:27b: 3 calls, 1,100 tokens, avg 520ms
    prism-coder:9b: 2 calls, 520 tokens, avg 270ms

The same block also appears automatically in session_save_ledger and session_save_handoff responses at session end.

Note: The default session view tracks this MCP process's prism_infer delegation. The all-time view combines persisted MCP calls with Synalux VS Code panel inference. Neither view includes your host model's (Claude's) own token spend; use Claude Code's /cost command for that.

Local-model delegation (default)

Prism routes qualifying bounded work—bulk classification, field extraction, mechanical formatting, test generation, and similar tasks—to local Ollama models before any host-native subagent. The agent checks gate_outcome, verifies the result, and continues in the current host thread when the local worker is unavailable, refused, or degraded.

Pass project memory when the subtask depends on prior work:

{
  "prompt": "Generate the bounded regression-test cases.",
  "project": "prism-mcp",
  "context_depth": "standard",
  "conversation_id": "<from session_bootstrap>",
  "mode": "code",
  "cloud_fallback": false,
  "escalation": "report"
}

Omit context_depth to use the dashboard setting. Turn off the dashboard Task Router toggle or set PRISM_TASK_ROUTER_ENABLED=false for an explicit opt-out.

Guardrails:

  • Local by default — an explicit operator opt-out is preserved
  • Never delegates: code/text that ships to the user, security/safety logic, planning/reasoning, anything where a silent quality drop isn't obvious
  • Always verifies: checks quality_gate_failed and used_cloud before trusting local output

The LLM context window is treated as ephemeral scratch space; durable state lives in the persistent store (SQLite locally, the portal in the cloud). E