@dojolabs/satori
Runtime-independent local memory engine for coding agents. Satori treats the agent's own Session history as the source of truth: every Note cites the Events it came from, agents can only propose Candidates, and an offline Dreaming pass confirms, merges or supersedes them by going back to the original Events — it never trusts a proposal it cannot verify.
You are probably looking for the Pi extension: install that with pi install npm:pi-satori (pi-satori on npm). This package is the engine underneath, for other runtimes and integrations.
How it works
- Notes are confirmed memories. Each one cites Evidence: addresses of the original Session Events it came from.
- Candidates are proposals. Agents propose, they never write memory directly.
- Dreaming runs offline over new Events and pending Candidates. A proposal is confirmed only when at least one cited Event really supports it; otherwise it is deleted with a logged reason. Contradicted Notes are superseded, not rewritten — old Notes keep their original title and body.
- Data lives in plain Markdown files under
~/.satori (override with SATORI_HOME). Edit them freely; delete a file to make Satori forget.
- Known secret formats are redacted before text reaches the Dreaming model and again before anything is written to disk. Notes record where a secret lives, never its value.
Use from code
The entry point is TypeScript source, so consume it from a TS-aware runtime (tsx, vitest, bun, node with a loader). Requires Node 24+.
import { Satori } from "@dojolabs/satori";
const satori = await Satori.open({
root: "~/.satori", // where Notes and state live
piSessionsDir: "~/.pi/agent/sessions", // Session history to read
llm: { /* LlmClient for Dreaming */ },
});
await satori.search("auth middleware");
await satori.read({ query: "..." });
await satori.propose({ claim: "...", evidence: [] });
await satori.dream(); // verify pending Candidates against history
License
MIT. Source and design notes: https://github.com/iefnaf/satori