I've built a free, open-source local and remote memory system for agentw and CL

mthines1 pts1 comments

Give your coding agent a memory in one command — no signup, just a folder — LoreKit blog

All postsli]:my-2 [&_ol]:my-4 [&_ol]:list-decimal [&_ol]:pl-5 [&_ol>li]:my-2 [&_code]:rounded [&_code]:bg-[var(--color-bg-elevated)] [&_code]:px-1 [&_code]:py-0.5 [&_code]:font-mono [&_code]:text-[0.85em] [&_pre]:my-5 [&_pre]:overflow-x-auto [&_pre]:rounded-lg [&_pre]:border [&_pre]:border-[var(--color-border)] [&_pre]:bg-[var(--color-bg-elevated)] [&_pre]:p-4 [&_pre]:font-mono [&_pre]:text-xs [&_pre]:leading-relaxed [&_pre_code]:bg-transparent [&_pre_code]:p-0 [&_pre_code]:text-xs [&_blockquote]:my-5 [&_blockquote]:border-l-4 [&_blockquote]:border-[var(--color-accent)] [&_blockquote]:pl-4 [&_blockquote]:text-[var(--color-content-secondary)] [&_blockquote]:italic [&_table]:my-5 [&_table]:w-full [&_table]:border-collapse [&_table]:text-sm [&_th]:border [&_th]:border-[var(--color-border)] [&_th]:bg-[var(--color-bg-elevated)] [&_th]:px-3 [&_th]:py-2 [&_th]:text-left [&_td]:border [&_td]:border-[var(--color-border)] [&_td]:px-3 [&_td]:py-2 [&_td]:align-top [&_hr]:my-10 [&_hr]:border-[var(--color-border)] [&_figure]:my-7 [&_img]:mx-auto [&_img]:block [&_img]:h-auto [&_img]:max-w-full [&_img]:rounded-lg [&_img]:border [&_img]:border-[var(--color-border)] [&_figcaption]:mt-2.5 [&_figcaption]:text-center [&_figcaption]:text-sm [&_figcaption]:italic [&_figcaption]:text-[var(--color-content-secondary)]">Your agent solved this yesterday

Yesterday your agent worked out that the integration tests need a Postgres container up first. Today it hit ECONNREFUSED 5432, decided the connection pool was misconfigured, and spent nine minutes rewriting a file that was fine. Same wall, same climb, no record that the climb ever happened. Every session it wakes up with amnesia.

The usual pitch here is a platform you adopt. It isn't one. It's one command and a folder you own — plain files on your disk, no account, no network, nothing to sign up for.

And here's the part that makes it more than a starter toy: the same read path runs over a local directory or a hosted Postgres — scaling local→remote is purely additive, not a migration. Your files stay where they are, lorekit list keeps showing both stores side by side, and nothing is ever exported. You start with a folder. You never have to leave it behind.

Two minutes to memory

One command scaffolds the lorekit-memory, lorekit-setup and lorekit-groom skills, an MCP server entry, and the lifecycle hooks into your .claude/ (project) or ~/.claude/ (global):

npx @lorekit/cli install<br>It asks three things: project or global, a token, and which hooks to wire (all, read-only, or none). Leave the token blank, and take all for the hooks.

Two small files finish the job. First a .lorekit.json at your repo root — safe to commit, it holds no secrets — which pins the store to disk:

"mode": "local"<br>Then point the MCP server at your own machine instead of the hosted one. install merges a lorekit entry into your .mcp.json — leaving any other servers alone — and by default that entry points at the hosted endpoint. Replace that entry only with the CLI's local stdio server:

// .mcp.json → mcpServers — edit this entry, leave your others alone<br>"lorekit": { "command": "npx", "args": ["-y", "@lorekit/cli", "mcp"] }<br>That's the whole setup, and npx @lorekit/cli doctor will tell you the resolved mode and which file decided it.

Now trigger a failure. Your agent runs the tests, they blow up, and the PostToolUseFailure hook says one thing. Everything below is real output from a repo I set up while writing this — a genuine pnpm test against a database that wasn't running:

LoreKit: the last Bash call failed. If it's recurring or non-obvious, memory.write to repo::acme/checkout with the fix so the next run avoids it.<br>That's a nudge, not a write. The write is the model calling memory.write — LoreKit never records anything behind your back.

And what it records isn't a row in someone's database. It's a file:

cat ~/.lorekit/repo/acme/checkout/tests-need-local-postgres.md<br>scope: "repo::acme/checkout"<br>key: "tests-need-local-postgres"<br>created: "2026-08-15T17:00:18.477Z"<br>updated: "2026-08-15T17:00:18.477Z"<br>seen_count: 1<br>Integration tests need the local Postgres up first: docker compose up -d db. Without it every test fails with ECONNREFUSED 5432, which reads like a code bug and isn't.<br>(Trimmed — the real frontmatter carries a few more fields, tags and provenance among them.) cat it. grep it. Commit it, or rm it. It's yours.

Then start the next session, and the loop closes:

LoreKit: 1 memory loaded · repo::acme/checkout — considerations, not rules; read any in full with memory.read.<br>- (repo::acme/checkout) tests-need-local-postgres — Integration tests need the local Postgres up first: docker compose up -d db.…<br>And if that same failure fires again mid-task, the failure hook now leads with the lesson itself instead of the bare nudge — 1 related memory — you've hit something like this before.

That's it. That's the aha. Fail...

border lorekit color local _pre memory

Related Articles