← Back to .tech
OPEN SOURCE / MCP

SharpWave

Long-term memory for AI agents as a standalone MCP server. A real forgetting curve, a memory graph, and consolidation during rest. Drop it into Claude Code, Cursor, or any MCP client.

npx -y sharpwave
Memory Graph FSRS Vector Search Multi-Agent

Long-term memory for AI agents. Standalone MCP server. Free, open source.

The problem with most agent memory

Your agent forgets everything the moment a session ends. The usual fix is to dump conversation history into a vector store and retrieve the the most similar chunks — which works until it doesn't:

Human memory doesn't work that way. It decays on a curve, strengthens what gets used, consolidates related things into concepts, and lets the rest fade. SharpWave models that.

How it works

The name comes from sharp-wave ripples — the hippocampal events that replay and consolidate memories during rest. That's the mechanism this is built around, not a metaphor bolted on afterward.

A real forgetting curve

Every memory carries FSRS-6 stability and retrievability. Unused memories decay on a power-law curve and drop out of recall. Reviewed ones strengthen. Importance and emotional weight scale how durable a memory starts out.

Consolidation, not just storage

A background pass replays recent episodes, promotes recurring patterns into durable semantic nodes, synthesises clusters into higher-level schemas, and downscales the noise — modelled on slow-wave and REM sleep.

A graph, not a bag

Memories connect through typed edges — caused_by, supports, contradicts, supersedes, instance_of and more. Retrieval spreads activation across those edges.

Memories can be replaced

brain_supersede closes out a stale memory and links the replacement, so the graph keeps its temporal integrity instead of accumulating contradictions.

Hybrid retrieval

Full-text search fused with vector similarity via reciprocal rank fusion, then spread across the graph. Vector search is optional — full-text and graph retrieval work with no embedding provider at all.

Multi-agent by design

One SharpWave process can back any number of agents at once. Each agent's memories live in their own database — isolated, never cross-contaminated — under a single config entry.

Install

SharpWave is a standard stdio MCP server. Point any MCP client at it:

{
  "mcpServers": {
    "sharpwave": {
      "command": "npx",
      "args": ["-y", "sharpwave"]
    }
  }
}

Or one-line:

claude mcp add sharpwave -- npx -y sharpwave
openclaw mcp add sharpwave --command npx --arg -y --arg sharpwave
openclaw mcp doctor sharpwave --probe

Memory lands in ~/.sharpwave/ as a SQLite database. Nothing leaves your machine unless you configure a remote embedding provider.

Tools

ToolWhat it does
brain_querySearch and recall memories using hybrid FTS + vector + spreading activation.
brain_writeStore a new memory node. Auto-queues for embedding and PRISM/NEXUS auto-linking.
brain_linkCreate a typed edge between two existing nodes.
brain_supersedeReplace an outdated node with updated content. Preserves graph temporal integrity.
brain_statsNode/edge/episode counts, neuromodulator state, consolidation status, embedding coverage.
brain_historySearch episode history (raw conversation turns) by keyword.
brain_expandGet full detail for a specific node: content, FSRS metrics, encoding context, source episodes.
brain_reviewApply an FSRS-6 spaced-repetition review to a node. Updates stability, retrievability, and SIGMA calibration.
brain_forgetPhysically delete a node. Refuses to delete nodes with active edges unless force=true.
brain_edgesGet all active incoming and outgoing edges for a node.
brain_resetWipe an agent's brain back to empty (a .db backup is taken first).

What people use SharpWave for

SharpWave vs OpenWave

Same engine. Two surfaces.

SharpWave is the standalone MCP server — point any MCP client at it and go. Works with Claude Code, Cursor, Claude Desktop, any MCP client.

OpenWave is the OpenClaw plugin version — same engine, but in-process: autonomic wake-up injects memory into every turn, the sleep system (slow-wave/REM consolidation, awake replay, LLM fact extraction) runs inside your agent's process, and all 16 brain_* tools are registered. Full persistence, no child process.

Learn more about OpenWave → ← Back to .tech