SDK, MCP server, and CLI for persistent agent memory. Local-first. Zero dependencies.
Squish is memory infrastructure for AI agents. Use the TypeScript SDK to build memory-powered apps, the MCP server to plug into any compatible agent, or the CLI for quick operations. Local-first with optional Cloud sync.
If Squish saves your agent's memory, give it a star -- it helps other builders find it.
npm install -g squish-memory && squish install --allThat is it. Squish installs the CLI, starts the MCP server, and configures hooks for every coding agent it finds on your machine. No API keys. No config files. No Docker.
The @squish/sdk is the recommended way to build memory-powered AI applications:
import { SquishClient } from '@squish/sdk';
const client = new SquishClient({ dataDir: './memory' });
await client.remember('key decision', { type: 'decision' });
const context = await client.getContext();SDK Documentation | API Reference
Squish works with any MCP-compatible agent. Choose yours for a tailored quick start:
npm install -g squish-memory && squish install --allSquish detects Claude Code and adds plugin hooks automatically. Your next session starts with full memory context. To verify:
squish context # See what your agent remembers
squish status --stats # Check memory healthAdd Squish to your Codex MCP config:
{
"mcpServers": {
"squish": {
"command": "squish-mcp",
"args": ["--http", "--port", "8767"]
}
}
}Codex now has persistent memory across sessions. Ask it "what did we decide about the database?" and it will recall your past decisions.
Add the same MCP server block to your editor's MCP settings. One memory server, shared across all your editors and CLI agents.
squish install --allOpenCode gets both MCP tools and auto-capture hooks. Decisions, constraints, and preferences are captured as you work.
{
"mcpServers": {
"squish": {
"command": "squish-mcp",
"args": ["--http", "--port", "8767"],
"env": {
"SQUISH_DB_PATH": "./squish-data"
}
}
}
}After install, Squish runs in the background. Here is what it does:
- Captures -- As you work, Squish watches for decisions, constraints, preferences, and context. It filters noise and stores what matters.
- Ingests -- Drop files into the inbox directory. Images, audio, video, and documents are automatically extracted, described, and stored as searchable memories.
- Stores -- Memories go into a local SQLite database with AES-256-GCM encryption. Nothing leaves your machine.
- Retrieves -- When your agent starts a new session, Squish injects only the relevant memories (50-200 tokens, not 2,000).
- Decays -- Old, low-value memories fade automatically. Your agent stays focused on what matters now.
squish remember "We chose PostgreSQL for the main datastore" --type decision
squish recall "database decisions"
squish sessions search "postgres migration"| Agent | Integration | Auto-Capture |
|---|---|---|
| Claude Code | MCP server + plugin | Yes |
| Codex CLI | MCP server | No |
| Cursor | MCP server | No |
| GitHub Copilot | MCP server | No |
| Gemini CLI | MCP server | No |
| OpenCode | MCP server + hooks | Yes |
| Cline | MCP server | No |
| Goose | MCP server | No |
| Windsurf | MCP server | No |
| Roo Code | MCP server | No |
| Claude Desktop | MCP server | No |
| Aider | MCP server | No |
One memory server. Shared across all of them.
The SDK (@squish/sdk) works with any TypeScript or JavaScript environment -- not just coding agents. Build memory into web apps, CLI tools, backend services, or custom agent frameworks.
Most memory tools need a second LLM for embeddings and retrieval. That means extra API costs, latency, and infrastructure you have to manage.
Squish uses local embeddings by default. Zero LLM dependency. 1-5ms latency. $0 runtime cost in local mode.
| Feature | Squish | CLAUDE.md | agentmemory | mem0 | Letta | Zep |
|---|---|---|---|---|---|---|
| SDK available | Yes (TypeScript) | No | No | No | No | No |
| Auto-capture | Yes (hooks) | Manual | Yes (12 hooks) | Manual API | No | No |
| Local embeddings | Yes (default) | N/A | Yes | No (cloud) | No | No |
| External DB required | No (SQLite) | No | Yes (iii-engine) | Yes (Qdrant) | Yes (Postgres) | Yes (Postgres) |
| MCP tools | 15 | 0 | 53 | 9 | 0 | 0 |
| Knowledge graph | Yes | No | Yes | No | Yes | Yes |
| Cross-agent sync | Yes (Cloud) | No | No | API-based | API-based | API-based |
| Price | Free local / $9/mo cloud | Free | Free | $249/mo Pro | Free (self-hosted) | Free (self-hosted) |
| Setup time | 30 seconds | 5 minutes | 15 minutes | 30 minutes | 30+ minutes | 30+ minutes |
| Data ownership | Full (local SQLite) | Git repo | External DB | Cloud vendor | External DB | External DB |
Squish is the only tool that combines all of these in a single package:
- SDK-first architecture --
@squish/sdkfor building memory-powered apps in any TypeScript/JavaScript environment - Local-first by default -- SQLite storage, TF-IDF embeddings, zero API keys needed
- MCP-native -- Works with every MCP-compatible agent out of the box
- Knowledge graph -- Reinforced relationships between memories, not just flat storage
- Decay system -- Old, low-value memories fade automatically so agents stay focused
- Hybrid search -- BM25 keyword + semantic similarity with RRF fusion
- Multimodal ingestion -- 27+ file types: images, audio, video, documents
- Zero external dependencies -- No Qdrant, no Postgres, no vector DB required in local mode
| Concept | What It Is |
|---|---|
| Recall | Durable memory -- decisions, preferences, constraints |
| Sessions | Evidence from past agent runs |
| Pinned | Stable facts that do not decay |
| Beliefs | Passive model of user/project |
| Strategies | Active operating rules |
| Media Memories | Ingested images, audio, video, and documents with extracted text |
| LLM Consolidation | Cross-connection finding via LLM-powered knowledge analysis |
| Decay | Stale weak traces fade automatically |
| Graph | Reinforced relationships from usage |
- Auto-captures decisions, constraints, and preferences as you work
- Restores relevant context when an agent restarts
- Handles contradictions and temporal facts with expiration
- Graph-boosted retrieval connects related memories across sessions
- Contradiction detection flags conflicting information
- Temporal reasoning tracks when facts were true vs. now
- Confidence scoring adjusts memory relevance over time
- Decay system automatically ages low-value memories
- Ingest images, audio, video, and documents into searchable memories
- Automatic text extraction via OCR, speech-to-text, and document parsing
- 27+ supported file types: JPEG, PNG, GIF, WebP, TIFF, HEIC, MP3, WAV, OGG, FLAC, M4A, MP4, WebM, AVI, MOV, MKV, PDF, DOCX, XLSX, PPTX, TXT, MD, CSV, JSON, XML, YAML, HTML, RTF
- File watcher for automatic inbox monitoring and ingestion
- LLM-generated descriptions for each ingested file
- Cross-connection finding via LLM consolidation across memory clusters
- Search previous Claude Code, Codex, and OpenCode sessions
- Find related sessions by project path or file overlap
- Inspect past decisions, errors, and commands as evidence
- Separate from long-term memory -- raw session history, not distilled facts
- CLI:
squish remember,recall,forget,link,context,stats(viastatus),clean,pin,sessions,doctor,cloud - MCP Server: 15 tools for any MCP client -- remember, recall, forget, link, context, stats, inspect, skill, loadout, extract, feedback, places, sessions, tier, dedup (a 16th,
squish_maintenance, appears whenSQUISH_ENABLE_MAINTENANCE_TOOLS=true) - Web UI: Local dashboard at
localhost:37777for visualizing memories - Cloud Dashboard: Paid analytics and management at squishplugin.dev
- SQLite (local, default) or Squish Cloud team workspaces
- Hybrid retrieval: keyword + semantic similarity with RRF fusion
- AES-256-GCM encryption for sensitive memories
- Places routing: organize memories by project, feature, or context
- Full-text search with BM25 ranking
- Vector search with TF-IDF embeddings (768-dimensional)
Squish is local-first by design: the default mode IS self-hosted. Everything runs on your machine, no account required.
- Storage: single encrypted SQLite file (AES-256-GCM for sensitive memories) at
SQUISH_DATA_DIR(default~/.squish) - Embeddings: local TF-IDF by default -- zero API keys, works fully offline. Optional providers (
openai,ollama,google) if you want them - LLM: optional and off by default (
SQUISH_LLM_ENABLED=false) -- every core feature works without one - Telemetry: none. Nothing leaves your machine in local mode
- License: MIT. Fork it, embed it, ship it
Point SQUISH_DATA_DIR at any volume or backup target and you are done. See Environment Flags for tuning knobs.
Every flag ships with a safe default; nothing here is required for local use. See .env.example for the full annotated list.
| Flag | Default | What it does |
|---|---|---|
SQUISH_DATA_DIR |
~/.squish |
Where the SQLite DB and assets live |
SQUISH_EMBEDDINGS_PROVIDER |
local |
local / openai / ollama / google / none / auto |
SQUISH_LOCAL_BUNDLED_MODEL |
bundled MiniLM | Set off to pin deterministic TF-IDF (CI, offline evals) |
SQUISH_VECTOR_SCAN |
recency |
Candidate selection: full scans every row (complete recall), recency sees the newest window |
SQUISH_SEARCH_BELIEFS |
true |
Include belief records in hybrid retrieval |
SQUISH_ABSTAIN_BELOW |
unset | Recall-confidence floor; below it recall returns a no_reliable_memory verdict instead of weak hits |
SQUISH_SCORING_V2 |
true |
Serve v2 composite ranking (SQUISH_SCORING_SHADOW=true logs v2 alongside without serving) |
| Precision stack | see docs/v2-scoring.md | SQUISH_RERANKER_ENABLED, SQUISH_QUERY_EXPANSION, SQUISH_TEMPORAL_VALIDITY, SQUISH_GRAPH_BOOST_LEGACY, SQUISH_MMR_ENABLED, SQUISH_CONTEXTUAL_RETRIEVAL, SQUISH_ENTITY_RETRIEVAL |
SQUISH_GEOMETRY_CONSOLIDATION |
true |
Geometry-aware consolidation guards (theta-prime split/consolidate decisions) |
SQUISH_DEDUP_AUTO |
off | When true, nightly dedup may execute high-threshold merges automatically (capped per run); otherwise proposals wait for review via squish_dedup |
SQUISH_ACL_ENFORCE |
false |
Enforce visibility rules on memory reads |
SQUISH_LLM_ENABLED |
false |
Enables optional LLM features incl. cross-connection consolidation |
| Feature flags | various | SQUISH_DECAY_ENGINE, SQUISH_CRON_ENABLED, SQUISH_MULTIMODAL_ENABLED |
Squish connects to your existing tools and ingests context automatically:
| Connector | What It Ingests |
|---|---|
| Google Drive | Documents, sheets, slides, and files |
| GitHub | Issues, PRs, discussions, code context, and repo metadata |
| Slack | Messages, threads, channel context, and decisions |
| Notion | Pages, databases, docs, and wikis |
Connectors are available on Cloud tiers. Install with:
squish connect google-drive
squish connect github
squish connect slack
squish connect notionPersistent memory across ChatGPT, Claude Desktop, Claude Code, and local agents. One account, synchronized everywhere.
Cloud features: OAuth 2.1 + PKCE login, cross-platform sync, team workspaces, admin dashboard, priority support.
| Tier | Price | Features |
|---|---|---|
| Local | Free forever | SQLite, 7 MCP tools, offline, knowledge graph, multimodal ingestion |
| Cloud Solo | $9/mo | Everything in Local + cloud sync, 1 connector, 10K requests/mo |
| Cloud Pro | $29/mo | Cross-tool sync, 3 connectors, 50K requests/mo, shared workspaces |
| Cloud Team | $99/mo | Unlimited seats, all connectors, 200K requests/mo, RBAC, audit logs |
Sign up at squishplugin.dev -- 30 seconds, no credit card needed.
Squish is tested against real-world memory retrieval tasks and synthetic benchmarks.
| Metric | Result | Notes |
|---|---|---|
| Core Tests | 9/9 passed (100%) | All memory operations |
| LoCoMo Memory | 65% | 100 REAL questions from locomo10.json |
| Throughput | 39 ops/sec | With local embeddings |
| Total Time | 230ms | For 9 core tests |
| Package Size | 674 KB | Lightweight footprint |
| Latency (embed) | 6.6ms | Local TF-IDF embeddings |
| Latency (search) | 6.1ms | Hybrid retrieval |
Full benchmark details: docs/BENCHMARK.md
| Document | Description |
|---|---|
| CLI Reference | All CLI commands and options |
| MCP Server | 15 MCP tools and configuration |
| Architecture | System design and data flow |
| Decay System | How memories age and lose relevance |
| Scoring | Importance and relevance scoring |
| Environment Config | Environment variables and settings |
| Plugin Architecture | Hook system and agent integration |
| Quick Start | Getting started guide |
| Agent Comparison | Squish vs other memory tools |
| Contributing | How to contribute |
| Release Notes | Changelog and version history |
Squish is memory infrastructure for AI agents. It provides a TypeScript SDK, an MCP server, and a CLI for persistent agent memory. Use the SDK to build memory-powered apps, plug the MCP server into any compatible agent, or use the CLI for quick operations. Local-first with optional Cloud sync. Think of it as a brain that persists between sessions -- your agents remember decisions, constraints, preferences, and context without you having to re-explain everything.
No. Squish works locally by default with zero API keys. It uses local embeddings (TF-IDF) and SQLite storage. You can optionally configure an external LLM for enhanced reasoning, but it is not required. An API key is only needed if you want to use the paid Squish Cloud for cross-device sync.
Squish is the only option that works locally with zero external dependencies AND provides a TypeScript SDK. mem0 requires Qdrant (a vector database) and cloud API calls. agentmemory requires iii-engine. Letta and Zep require Postgres. Squish uses SQLite and local embeddings by default. See the full comparison in the Why Squish section above.
Yes. Squish works with any MCP-compatible agent. One memory server is shared across Claude Code, Cursor, Codex, Copilot, Gemini CLI, and any other agent that supports MCP. Memories are available to all connected agents. You can also use the SDK directly in any TypeScript/JavaScript environment.
Yes. In local mode, all data stays on your machine in an encrypted SQLite database. Nothing is sent to any cloud service. AES-256-GCM encryption protects sensitive memories. Cloud sync is opt-in and additive: data moves over TLS, connector credentials are encrypted at rest with AES-256-GCM, and synced memories live in the cloud database under your account's access controls -- which is exactly why local remains the default and sync stays optional.
squish recall searches your long-term memory -- distilled facts, decisions, and preferences that Squish has captured and organized. squish sessions search searches raw past agent runs -- the actual messages, commands, and file changes from previous Claude Code, Codex, OpenCode, or Gemini CLI sessions. Recall gives you what the system decided to remember. Sessions give you the evidence.
Every recall result carries a recall assessment with a verdict: confident (top result is reliable), qualified (usable but treat with care), or no_reliable_memory (nothing trustworthy found -- say so rather than guessing). Feed verdicts back via squish_feedback: confirm, used, or contradict.
See docs/CONTRIBUTING.md for guidelines on how to contribute to Squish.
MIT -- see LICENSE for details.
If Squish helps your project, consider starring the repo. It helps other developers find memory tools for their AI agents.
Website · Cloud Dashboard · Documentation · GitHub · npm
