v0.2.0 · Apache-2.0 · Python ≥ 3.10

Your agent forgets.
Your project shouldn't.

keep-memory is the engineering wiki for AI agents — a git-native memory of every decision and its rationale, shared between you and your agent.

GitHub →
Can we move the ledger to event sourcing?
We decided against this on Aug 14 — replay tooling and ops burden outweighed the benefit for a team of four. decision/keep-append-only-ledger · Active
Want me to pull up the alternatives we considered?

One project. Two realities.

The same week on the same payments service — with and without keep-memory. Scroll through the week.

Monday

New session, total amnesia

A fresh agent session starts on the payments service.

Without keep-memory

Let's pick up the payments work.
Sure — quick questions first. What database does this project use?
Any conventions I should follow? Has anyone tried event sourcing here?

14 sessions of context — gone.

With keep-memory

Let's pick up the payments work.
Picking up where session 14 left off — the Stripe webhook retry plan is at step 2 of 5. Context loaded: 12 decisions, 8 observations, 3 APIs. $ keep session start

The agent resumes mid-thought, not from zero.

Tuesday

The déjà-vu proposal

The agent proposes event sourcing for the ledger. The team rejected it in August.

Without keep-memory

How should we make the ledger more robust?
Let's migrate it to event sourcing — much cleaner architecture. Rejected in August · rationale lost

The team spends the afternoon re-litigating a settled question.

With keep-memory

How should we make the ledger more robust?
We already settled this on Aug 14: keep the append-only table. No eventing infra on a team of four — replay tooling exceeds the benefit at our size. decision/keep-append-only-ledger · Active Rejected: event sourcing (ops burden) · CQRS (premature) $ keep search "event sourcing"
Wednesday

Two truths, one lie

A doc says webhooks retry. Another says never retry. Both are “current”.

Without keep-memory

Is it safe for clients to retry webhooks?
Yes — they retry with exponential backoff, up to 5 attempts.
Actually — clients must never retry. The endpoints are idempotent.

Two answers. Both confident. No warning.

With keep-memory

Is it safe for clients to retry webhooks?
Careful — my memory holds two conflicting facts here. I've flagged the contradiction for your review; you make the call. observation/webhook-retry ↔ api/payments-v2 · Pending review $ keep validate · 1 contradiction candidate

Heuristics propose. A judge ranks. A human confirms.

Friday

Compounding, or starting over

Next week starts from zero — or from everything you've ever decided.

Without keep-memory

Session ended. Nothing was written down.

Monday starts from zero. Again.

With keep-memory

This week, your project learned:

decision/keep-append-only-ledger no event sourcing — Aug 14 rationale confirmed
observation/webhook-retry-behavior backoff, max 5 attempts in prod
contradiction/webhook-retry ↔ payments-v2 flagged for human review
decision/use-postgresql over DynamoDB — relational fits reporting
$ git log --oneline .keep-memory/ · 4 commits
Decision Observation API Decision

What makes the right-hand column possible

Typed concepts

Decisions, Observations, APIs, Tables, Metrics — each with a lifecycle: Active → Superseded → Abandoned.

Full-text search

An inverted index over every concept answers “didn't we already decide this?” in milliseconds.

Contradiction detection

Scope and tag overlap proposes candidates, a judge ranks them, a human confirms. Precision over recall.

Knowledge graph

Automatic link extraction, backlinks and traversal — understanding compounds instead of resetting.

Git-native audit trail

Every concept is a Markdown file; every change a commit. Diff, blame or revert any decision, ever.

MCP server

Read tools first, then gated writes that always land as Pending. Your agent's memory, over the Model Context Protocol.

Start remembering.

Three commands to your agent's first memory.

$ pip install keep-memory

$ keep init

$ keep decide "Use PostgreSQL" --tags database

Star on GitHub →