Native Go · Provenance-aware · Revocable · Embedded
Every memory knows its sources. Ask it anything in plain English. Recall a bad source, and everything learned from it goes too.
claude mcp add cheesedb -- cheesedb mcp alicego get github.com/govinargo-labs/cheesedbPreview. Embedded, Go standard library only, Apache-2.0.
The problem
An agent builds memory from sources it can’t fully trust. When one turns out to be bad, everything the agent learned from it is still in memory, and the agent keeps acting on it.
A tool returned bad data, and three memories were built on it.
A web page planted false facts or instructions: memory poisoning and prompt injection.
A user asked for their data to be deleted, including what the agent concluded from it.
Try it
A food allergy, a wrong web page, and one red button. Nine short steps.
Recorded from a real run of the cheesedb command, with a local embedding model and a local chat model.
Search
With an embedding model, CheeseDB finds memories by meaning, so you and your AI can ask in your own words. Every result comes only from memories that are still valid: a recalled memory is never found again.
“Can the user eat the satay?” finds “the satay sauce has no peanuts”, with no shared keywords needed.
cheesedb search alice "can the user eat the satay?"
Search picks the closest live memories; a chat model answers from those only, and says “I do not know” when they are not enough.
cheesedb ask alice "can the user eat the satay?"
Describe what to forget. CheeseDB shows the closest memory and every memory that would go with it, and erases them only after you say yes.
cheesedb forget alice "the satay sauce"
Any OpenAI-compatible embedding server works: Ollama, LM Studio, oMLX, vLLM, or a hosted API. A local one keeps your memories on your machine. Add two lines to ~/.cheesedb/llm.conf:
embed_base_url = http://localhost:11434/v1
embed_model = nomic-embed-textcheesedb embed alice catches up on older ones.search.CreateIndex, Embed, Search.No model, no network, nothing sent anywhere. You keep the whole core:
Under the hood
Erase has to remove text without losing history, so each record is split in a way that keeps the history.
cheesedb mcp. In memory, the engine keeps the family tree, leg counters and an offset table, all rebuilt from the log when an agent is opened. On disk, each agent is a folder of append-only segments; a search index is a folder of its own beside them.For Go developers
The same story as the game.
s, err := cheesedb.Open("/data/cheesedb") // a folder you choose, created 0700
tok, err := s.CreateAgent("alice") // Alice's token, shown once: keep it safe
alice, err := s.OpenAgent(tok) // the only way to reach Alice's data
defer alice.Close()
user, _ := alice.AddLot("user_message", []byte("I am allergic to peanuts"))
doc, _ := alice.AddLot("doctor_note", []byte("peanut allergy confirmed"))
web, _ := alice.AddLot("web_page", []byte("our satay sauce is peanut-free"))
allergy, _ := alice.Remember([]byte("the user is allergic to peanuts"), cheesedb.Leg{user}, cheesedb.Leg{doc}) // user OR doctor
sauce, _ := alice.Remember([]byte("the satay sauce has no peanuts"), cheesedb.Leg{web})
safe, _ := alice.Remember([]byte("the satay is safe for the user"), cheesedb.Leg{allergy, sauce}) // needs both
// Optional: search by meaning, with vectors from your embedding model.
alice.CreateIndex("default", 768, "nomic-embed-text")
alice.Embed("default", safe, vec)
hits, _ := alice.Search("default", questionVec, 5) // never returns a recalled memory
removed, _ := alice.Recall(web, cheesedb.Fair, cheesedb.Erase) // the web page was wrong
// removed == [sauce, safe]; allergy survives; their text and vectors are erased from disk
Install the command-line tool with go install github.com/govinargo-labs/cheesedb/cmd/cheesedb@latest. It has one command per feature, including cheesedb find, which searches the raw bytes of the files to prove erased text is gone. Needs Go 1.26.5 or newer. Developed on macOS and tested on Linux in CI. Windows isn’t supported yet.
Is it for you?
The name
“Lot” and “recall” are food-safety words. A cheese maker records which lots of milk went into which wheels, so when one lot turns out to be contaminated, they recall exactly the cheese made from it.
CheeseDB does the same for what an agent remembers. The name also nods to the Swiss cheese model of safety: stack several layers of protection, and harm only happens when the holes in every layer line up.