Get started
Install Polign Recall, save a fact, correct it, and read back what was believed before the correction. It takes a few minutes and needs no model or embedding API key.
Install
You need Python 3.10 or later.
pip install polign-recall
That installs the client, the recall binary it runs, and, through the
polign_db package, the polign-server database. There is nothing
else to download or start. A recall installed another way, such as
go install, downloads polign-server the first time it needs a local
database, checked against a checksum built into it; RECALL_NO_DOWNLOAD=1
refuses that.
Save a fact, then correct it
This process saves an editor preference and then changes it:
from polign_recall import Client
with Client(local_dir="./recall-data") as memory:
memory.remember("user", "prefers_editor", "vim")
memory.remember("user", "prefers_editor", "neovim")
prefers_editor holds one value, so neovim replaces
vim. A rule decides that, not a model.
Read it back from another process
Run a second process in the same folder. It reads the current value, the full history, and what was believed before the correction:
from polign_recall import Client
with Client(local_dir="./recall-data") as memory:
print(memory.recall("user", "prefers_editor")[0].value) # neovim
events = memory.history("user", "prefers_editor")
print([event.value for event in events]) # ['vim', 'neovim']
# What was believed at the moment of the first statement.
before = memory.recall("user", "prefers_editor", as_of=events[0].observed_at)
print(before[0].value) # vim
The correction did not erase vim. That is how you answer "what did the agent
believe yesterday, and when did that change?"
The first client to open ./recall-data starts a local
polign-server for it in the background, listening on localhost only. Later
clients, in any process, share it. The memories stay in that folder after your program
exits. A bare Client() does the same in ~/.local/share/recall,
the memory every agent on the machine shares, the Claude Code plugin included. Local
databases work on Linux and macOS.
Forget something
with Client(local_dir="./recall-data") as memory:
memory.forget("user", "prefers_editor", "neovim")
Forgetting removes the fact from current answers and keeps it in the history. It does not permanently delete the record.
Use it from your agent
| Where your agent runs | Start here |
|---|---|
| Claude Code | recall setup, then restart Claude Code. See Claude Code. |
| Any MCP host | Launch recall mcp -write from your host. See below. |
| LangGraph | pip install recall-langgraph. See LangGraph. |
| Pydantic AI | pip install recall-pydantic-ai. See Pydantic AI. |
| LiveKit Agents | pip install recall-livekit. See LiveKit Agents. |
| Vapi | See Vapi. |
| Go | go get github.com/Polign/recall. See the Go reference. |
Any MCP host
For hosts that use the common mcpServers format, point the host at the
recall binary. With nothing else set it keeps memory in the local database in
~/.local/share/recall; to keep it in a database you run, name it with three
variables, the same three for every backend:
{
"mcpServers": {
"recall": {
"command": "/absolute/path/to/recall",
"args": ["mcp", "-write"],
"env": {
"RECALL_BACKEND": "polign",
"RECALL_BACKEND_URL": "http://127.0.0.1:23000",
"RECALL_COLLECTION": "recall_demo"
}
}
}
}
The agent gets tools that take plain text: remember,
recall and forget, and two that read the record of corrections,
history (how something changed, statement by statement) and diff
(what changed between two times). Add -extract-model
<provider:model> so Recall works out the facts in what is remembered; without a
model the text is kept as written and replaces nothing. Add -typed for the typed
tools instead, where the agent names each fact's predicate and value and also gets
memory_history, timeline, diff,
list_predicates and explain. Leave out
-write for a read-only connection.
Share memory across machines
A local folder is enough for one machine. To let agents on different machines share one
memory, run polign-server against your own bucket (see
Run polign_db), or use
PostgreSQL, MongoDB
or Qdrant, leave local_dir out, and
name the database. Three variables do it, the same three for every backend, and
recall -backend, -url and -key are the same three
as flags:
| Variable | What it is |
|---|---|
RECALL_BACKEND | polign, pgvector, mongodb or qdrant; local is the default |
RECALL_BACKEND_URL | Where it is, in that backend's own form: http://host:23000, postgres://user@host/db, mongodb://host/db, http://host:6333 |
RECALL_BACKEND_KEY | Only if the database requires a credential the URL does not carry |
RECALL_COLLECTION | The collection that holds the memories |
In Python the same three are Client(backend=, backend_url=, backend_key=).
Agents share memory when they use the same database, collection, and namespace. The
names used before recall 0.23 (POLIGN_URL, POLIGN_API_KEY,
POLIGN_COLLECTION) still work.
Next steps
- Introduction explains facts, corrections, and history.
- The live demo shows two agents on two nodes sharing one memory.
- Resume agents without snapshots shows how an agent picks up after a crash.
- github.com/Polign/recall has the source, examples, and full reference.