Open source · Apache-2.0 · MCP

Memory for agent fleets that respects your token budget.

Every session, your coding agents reload the same MEMORY.md, AGENTS.md, and project context — a context tax you pay again and again. Thrift Memory recalls only what the task needs, under a hard token budget, and hands you a receipt proving what you didn't pay for.

See your own waste first — nothing installed: npx -y thrift-memory audit

THRIFT MEMORY
*** SAVINGS RECEIPT ***

agentIddev
tokenBudget2,000 (hard)

baselineTokens2,100
injectedTokens420

savedTokens1,680
savings rate80%
NOT PAID ✓
saved = baseline − injected
logged on every recall
87.2%
token savings
24
agent fleet
0pp
quality-parity gap
QA ✓
certified
Measured across a real 24-agent fleet running in production — quality-paired against full-context runs, certified by an independent QA pass.
// how it works

Recall under a budget. Prove the saving.

Three tools — remember, recall, search_memory — backed by a local JSONL store. No database, no LLM call on the write path, no infrastructure.

Call recall() with a hard budget

The agent asks for memory with a hard tokenBudget ceiling. Not a hint — a cap. The recall can never inject more than you allowed.

recall( agentId: "dev", tokenBudget: 2000, task: "how do I store money?" )

Get a relevance-ranked slice

Only memories relevant to the task make the cut — irrelevant notes are dropped for relevance, not just squeezed for budget. A relevance floor keeps noise out even when budget remains.

// injected: Money values are integer cents, never floats. // dropped: deploy cadence, // cache policy (irrelevant)

Read the metering receipt

Every recall logs baselineTokens vs injectedTokens vs savedTokens — plus budget-pressure signals so an agent never silently acts on a starved slice.

{ baselineTokens: 2100, injectedTokens: 420, savedTokens: 1680, budgetPressure: "none" }
// install

Running in 60 seconds.

Claude Code plugin for the one-command path, or plain MCP config for any MCP-capable client.

Option A — Claude Code plugin
# MCP server + memory-aware agent + commands, one step
/plugin marketplace add YohadH/thrift-memory
/plugin install thrift-memory@thrift

# registers the `thrift` MCP server automatically —
# recall / remember / search_memory, no config editing
Option B — any MCP client
npm install -g thrift-memory

# then add to your MCP config:
{ "mcpServers": {
    "thrift": { "command": "npx",
                 "args": ["thrift-memory"] } } }

Not ready to install anything? Audit the context tax you're already paying — it scans your repo's CLAUDE.md, AGENTS.md, cursor/windsurf rules and prints the bill per session, per day, per month.

npx -y thrift-memory audit
// why not just Mem0 / Zep / Graphiti?

They optimize how smart recall is. We optimize what it costs.

Mem0, Zep, and Graphiti compete on recall quality — temporal graphs, entity extraction, personalization. Thrift Memory competes on a different axis entirely: cap the tokens, prove the saving.

Thrift Memory Mem0 Zep Graphiti
Primary axis Cost-first / budgeted recall Recall quality (personalization) Recall quality (temporal memory) Recall quality (knowledge graph)
Hard token budget on recall Yes No No No
Savings receipt (baseline vs injected vs saved) Yes — every recall No No No
LLM call required to write a memory No — cheap write path Yes Yes Yes
Backing store Local JSONL, no DB Vector store + optional graph Managed / self-hosted service Bring-your-own graph DB

The honest version: if you need the deepest, smartest recall, use them — they're more mature at it. If your fleet keeps re-paying the context tax on every run and you want to cap and measure that cost with zero extra infrastructure, that's the gap Thrift Memory fills. They're complementary: Thrift Memory can sit in front of a heavier store as the budget-and-metering layer.