Agent memory with dates, evidence and real deletion.

Quipu is an open-source memory layer that runs next to your agent. It keeps every original message, extracts dated facts from them, and returns the facts that were true on any given date.

MIT licensed. Runs locally. Works with any model provider.

A memory graph built from six messages

An illustration with made-up messages. Pick any node to see the messages behind it.

A pile of text chunks is not a memory

Most memory layers store fragments and search them by similarity. That fails in three ways once an agent has been running for a while.

What goes wrong What Quipu does

Old facts come back as current

The repo moved from npm to pnpm. Both messages match the search, and the agent picks one.

Facts carry dates

A new value makes the old one history instead of deleting it. You can ask what is true now, or what was true on any earlier date.

Summaries lose their source

Once a conversation is summarised, nobody can say which message a claim came from, or whether anyone said it.

Every memory links to its evidence

Facts, summaries and patterns each point at the messages they rest on. memory.inspect shows the chain.

Deleted data still shows up in answers

Removing a message leaves behind the summaries and facts that were built from it.

Forgetting reaches every derived memory

Forgetting a message also suppresses every fact and summary built on it. A dry run shows the full list before any deletion.

How it works

One local process owns the memory. Your agent talks to it through an SDK, the command line or MCP.

  1. Remember

    Send sessions and messages during the conversation. Quipu stores them unchanged, scoped to a user, project or agent.

    memory.remember
  2. Extract

    Background jobs turn messages into dated facts, preferences, conversation summaries and recurring patterns, each linked to its evidence.

    --background on
  3. Retrieve

    Ask a question and get a prompt-ready context plus a structured packet, filtered by scope and held to a token budget.

    memory.retrieve
  4. Forget

    Select by ID or by query. Quipu removes the evidence and suppresses every memory that depended on it.

    memory.forget
Your agentany framework or host
SDK, CLI or MCPPython and TypeScript
JSON-RPC 2.0one documented protocol
Quipu corewritten in Zig
LatticeDBgraph, full-text and vector search in one file

88.7% on temporal reasoning, from 3,800 tokens of context

LongMemEval-S, all 133 temporal reasoning questions, with a GPT-4o reader and the benchmark's GPT-4o judge. Quipu answers with one model call per question in about 1.1 seconds. With a budget of 1,024 tokens it still scores 85.0%.

Temporal reasoning is one of six question types in LongMemEval. Other systems' figures are their own published results. Full comparison and sources

Temporal reasoning accuracy, with the context each system gives the reader
  • Chronos Low90.2%15 turns, then its own searches
  • Quipu, 4K budget88.7%3,800 tokens
  • Quipu, 1K budget85.0%980 tokens
  • Mastra OM85.7%about 30,000 tokens
  • Emergence Simple81.2%whole sessions
  • Zep62.4%1,600 tokens
  • Full context45.1%115,000 tokens

A small context makes each answer cheap

Most of the price of an answer is the context the reader model has to read. Quipu sends about 1,000 to 4,000 tokens where other approaches send 30,000 or the whole history.

ApproachContext per questionReader cost per questionTime to answer
Quipu, 1K budget980 tokens$0.004, measured1.1 s
Quipu, 4K budget3,800 tokens$0.011, measured1.1 s
Zep1,600 tokensabout $0.0042.6 s
Mastra OMabout 30,000 tokensabout $0.0754.1 s
Full context115,000 tokensabout $0.2928.9 s

About 26 times cheaper than full context at the 4K budget, and about 70 times cheaper at 1K, with 40 points more accuracy on temporal questions.

About 7 times cheaper than a 30,000-token context at the 4K budget, and about 19 times cheaper at 1K, at a similar score.

About $0.03 per conversation history for the background jobs that extract facts and summaries, paid once at ingest with GPT-4o-mini.

Quipu's costs are measured from its own runs with GPT-4o. The other rows are calculated from each system's published context size at GPT-4o's list price of $2.50 per million input tokens, and leave out output tokens and any extra model calls. Times are each system's own report on its own hardware.

Start in a few minutes

The installer builds the core against LatticeDB 0.18.0. It needs git, zig and the LatticeDB library on your machine.

  • Python and TypeScript SDKs
  • A command line for every memory operation
  • An MCP adapter for tool-calling hosts
  • OpenAI, Anthropic, Gemini, Ollama, OpenRouter and other providers
Read the install guide
curl -fsSL https://raw.githubusercontent.com/jeffhajewski/quipu/main/scripts/install.sh | bash
export PATH="$HOME/.quipu/bin:$PATH"
quipu --db "$HOME/.quipu/memory.lattice" health

Six rules enforced by the core

These are enforced in the core and checked by its tests, so every SDK and integration gets the same behaviour.

Original messages stay intact
Raw evidence stays as it was written unless you explicitly forget it.
Derived memories cite evidence
Every fact, summary and pattern links to the messages that justify it.
Facts have dates and scopes
Each has a period of validity and belongs to a user, project or agent.
Contradictions stay on record
Two statements that disagree are both kept, each marked as a contradiction.
Forgetting reaches derived data
Removing evidence suppresses the memories and indexes built on it.
SDKs stay thin
Clients only validate requests and pass them to the core. Memory behaviour lives in one place.

Project status

Quipu is a working prototype you build from source. It is not a hosted service, and there are no packaged releases yet.

Working today

  • Remember, retrieve, answer, search, inspect and forget
  • Durable storage on LatticeDB
  • Background extraction, summaries and pattern detection
  • Python and TypeScript SDKs, CLI and MCP adapter

Not built yet

  • A long-running socket or HTTP server
  • Release binaries and published SDK packages
  • A full LongMemEval run on all 500 questions
  • More host integrations

Give your agent an auditable memory