<!-- Keep by TulipFarm: open-source memory for AI agents -->
# Keep

Keep is open-source memory and knowledge for AI agents. Keep gives Claude Code, Codex and Copilot CLI one shared memory per project. Every change is a revision. When a fact changes, the old one is marked superseded, not deleted.

Keep is a research preview. It works, but it is early.

Source: https://github.com/TulipFarm/keep

## How it works

- **What goes in.** Your notes, documents and conversations.
- **What Keep stores.** Memory files as revisions. Episodes that are never edited.
- **What Keep derives.** Facts, each linked to the exact text behind it.
- **What your agent gets.** Memory at session start. Cited search on demand.

## Where it runs

On your machine. Keep calls no hosted service.

- **On your laptop.** Memory stays in the server's process. Nothing else to install. `keep --user me serve &`
- **With your own Postgres.** Memory survives restarts. Use pgvector, or add Qdrant. `docker compose --profile postgres-vector up -d`
- **In Docker Compose.** Run Keep itself in Compose, with generated secrets. `deploy/compose.yaml`

## Memory files

Short Markdown files your agent reads at the start of every session.

- **Plain Markdown.** Saved byte for byte.
- **Safe edits.** A stale write fails with a conflict.
- **Undo is a new revision.** It never rewrites history.
- **Revisions kept.** Up to 100 per file, for 30 days.

[How Memory works](https://github.com/TulipFarm/keep/blob/main/docs/memory.md)

## Knowledge

A record of what happened, and the facts drawn from it.

- **Episodes are never edited.**
- **Sources.** Each fact links to the exact text behind it.
- **Two kinds of time.** Ask what was true on a date, or what Keep knew.
- **Disputes stay visible.** If order is unclear, Keep keeps both.

[How Knowledge works](https://github.com/TulipFarm/keep/blob/main/docs/knowledge.md)

## One memory, every agent

Agents on the same project share the same memory.

- **MCP over stdio** for coding agents.
- **HTTP** for scripts and dashboards.
- **Local.** Listens on 127.0.0.1 by default.
- **Scoped tokens** limit what each agent can reach.

[Copy-paste setup for each agent](https://github.com/TulipFarm/keep/blob/main/docs/server.md)

## Status

Keep is a research preview. We have not yet shown it beats simple baselines.

- **Runs today:** Memory, Knowledge and the server.
- **Alpha.** The server is an alpha.
- **No benchmark result** is published yet.
- **Not passed.** Our development runs have not passed the gate. We quote no numbers.

[Read the methodology](https://github.com/TulipFarm/keep/blob/main/docs/benchmarks/methodology.md)

## Open source, Apache-2.0

Read the code, run the benchmark, check our work.

- **Written in Rust.**
- **One public repository** holds Memory, Knowledge, the server and the benchmark.
- **Datasets keep their own licences.** You download them yourself.

[View the repository](https://github.com/TulipFarm/keep)

## Questions

### What is Keep?

Keep is an open-source memory and knowledge system for AI agents, written in Rust. It stores Memory files and a record of facts, and serves them to coding agents over MCP. It is a research preview.

### How is Keep different from RAG or a vector database?

Keep does use search, both keyword and vector. It also stores facts with their source and the time range when they were true. When a fact changes, the old version is closed, not overwritten, so you can ask what was true on a date.

### Which agents and models does Keep work with?

Claude Code, Codex and Copilot CLI have setup steps in the docs. Any MCP client that can start a stdio server works too. Keep sets no chat model for you. Your agent keeps its own.

### Can I run Keep myself?

Yes. Install it from source with `cargo install`, run `keep serve` on your machine, and keep memory in process or in your own Postgres. Docker Compose files are in the repo.

### Is Keep open source?

Yes. Keep is Apache-2.0 and the code is public on GitHub.

### How much does Keep cost?

Keep is open source and you run it yourself. The repo states no hosted service and no price.

### Is Keep ready for production?

No. Keep is a research preview and the server is an alpha. The benchmark that decides whether Keep is worth using is not finished. Use it where losing a note is acceptable.

### Does Keep send my data to a model provider?

No. The server never calls a hosted model API. It embeds Knowledge with a local model, downloaded once on first start. It talks only to the Postgres and Qdrant you configure.

### Does Keep ever delete anything?

Only when you ask. Edits, undos and changed facts become new revisions or fact versions. Old revisions are kept for up to 30 days, and the forget operation erases content for good.
