mindpalace
by luthfanwakan
README.md
# mindpalace
Memory with a sense of time, for Claude, ChatGPT and any other MCP client, on infrastructure that costs nothing beyond the assistant subscription you already pay for.
This repository holds two projects that share one idea: facts have dates, and a database that forgets when something was true is throwing away the most useful part. Use it as local memory for Claude Code or Codex on a SQLite file, as a personal assistant's memory in claude.ai or ChatGPT through a Cloudflare Worker, or from scripts through its CLI; the [mindpalace README](packages/mindpalace/README.md#two-ways-to-use-it) starts with the map.
- **oldendb** is a bitemporal graph database that runs on SQLite, Turso, Cloudflare D1, Durable Objects and Postgres. Every node, edge and property carries the period it was true and the period the database believed it. You can ask "who was the CTO in 2022?" and also "what did we think the answer was last month, before the correction?" It is published to npm as `oldendb`.
- **mindpalace** is a memory server built on it. It ingests documents and notes, keeps facts with the dates they held, and answers questions as of any point in time over MCP. It runs on the free tiers of Cloudflare Workers, Workers AI and D1 or Turso, or on any machine with Node, and the extraction that needs a large model runs through the assistant itself rather than an API key.
## Quick look
```ts
import { open } from "oldendb";
import { libsql } from "oldendb/libsql";
const db = await open(libsql({ url: "file:company.db" }));
await db.migrate();
const tx = db.transaction();
const andi = tx.node({ key: "person:andi", label: "person" });
const maju = tx.node({ key: "org:maju", label: "company" });
tx.link(andi, "cto_of", maju, { from: "2021-03-01" });
await tx.commit();
// Later we learn Budi took over in January 2024.
await db.transaction().unlink("person:andi", "cto_of", "org:maju", { from: "2024-01-01" }).commit();
await db.at({ valid: "2022-06-01" }).edges({ to: "org:maju", label: "cto_of" }); // Andi
await db.at({ valid: "2024-06-01" }).edges({ to: "org:maju", label: "cto_of" }); // nobody
await db.at({ valid: "2024-06-01", tx: 1 }).edges({ to: "org:maju", label: "cto_of" }); // Andi, as believed before tx 2
```
And from a conversation with mindpalace connected:
> **User:** Who ran engineering at PT Maju in 2022?
>
> **Assistant:** *(calls `search` with `as_of: "2022-06-01"`)* Andi Wijaya was CTO from March 2021 until January 2024, when Budi Santoso took over. Source: "Andi profile", ingested 2021-03-01.
## Layout
```
packages/oldendb the database library, published to npm as `oldendb`
packages/mindpalace the memory server: application, hosts, MCP tools, CLI
docs/design.md why it is built this way, and what it is not good at
ROADMAP.md where it is going, what 1.0 means, and what is not planned
AGENTS.md conventions for contributors and coding agents
.claude/skills/ bulk ingest and backup from Claude Code
```
## Getting started
```sh
npm install
npm run check # lint, typecheck and tests for both packages
AI_PROVIDER=offline npm run palace -- ingest packages/oldendb/README.md --date 2026-01-01
AI_PROVIDER=offline npm run palace -- search "what is transaction time"
```
`offline` is a deterministic stand-in for a model, enough to see the shape of things without any account. Real models, real deployment and connecting an assistant are in [packages/mindpalace/README.md](packages/mindpalace/README.md); the library on its own is in [packages/oldendb/README.md](packages/oldendb/README.md).
## Status
0.1. The Worker has been deployed and exercised end to end on Cloudflare D1, on Turso and with Workers AI, OAuth included, through a hand-written MCP client; no hosted assistant has connected yet. The whole application runs on Postgres under test. The schema is versioned and the tests are thorough, but expect the API to move before 1.0. See [CHANGELOG.md](CHANGELOG.md) for what is in this release and [ROADMAP.md](ROADMAP.md) for what 1.0 will take.
## License
MIT, Fariz Wakan.
This server cannot be deployed
Maintenance
ActivityNo data
ResponsivenessNo issues