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

Aug 17, 2026 01:03 AM - 2 hours ago 1

Your supplier solved this yesterday

Yesterday your supplier worked retired that the integration tests request a Postgres instrumentality up first. Today it deed ECONNREFUSED 5432, decided the relationship excavation was misconfigured, and spent 9 minutes rewriting a record that was fine. Same wall, aforesaid climb, nary grounds that the climb ever happened. Every convention it wakes up pinch amnesia.

The accustomed transportation present is simply a level you adopt. It isn't one. It's 1 bid and a files you ain — plain files connected your disk, nary account, nary network, thing to motion up for.

And here's the portion that makes it much than a starter toy: the aforesaid publication way runs complete a section directory aliases a hosted Postgres — scaling local→remote is purely additive, not a migration. Your files enactment wherever they are, lorekit database keeps showing some stores broadside by side, and thing is ever exported. You commencement pinch a folder. You ne'er person to time off it behind.

Two minutes to memory

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

npx @lorekit/cli install

It asks 3 things: task aliases global, a token, and which hooks to ligament (all, read-only, aliases none). Leave the token blank, and return each for the hooks.

Two mini files decorativeness the job. First a .lorekit.json astatine your repo guidelines — safe to commit, it holds nary secrets — which pins the shop to disk:

{ "mode": "local" }

Then constituent the MCP server astatine your ain instrumentality alternatively of the hosted one. instal merges a lorekit introduction into your .mcp.json — leaving immoderate different servers unsocial — and by default that introduction points astatine the hosted endpoint. Replace that introduction only pinch the CLI's section stdio server:

// .mcp.json → mcpServers — edit this entry, time off your others alone "lorekit": { "command": "npx", "args": ["-y", "@lorekit/cli", "mcp"] }

That's the full setup, and npx @lorekit/cli expert will show you the resolved mode and which record decided it.

Now trigger a failure. Your supplier runs the tests, they rustle up, and the PostToolUseFailure hook says 1 thing. Everything beneath is existent output from a repo I group up while penning this — a genuine pnpm trial against a database that wasn't running:

LoreKit: the past Bash telephone failed. If it's recurring aliases non-obvious, memory.write to repo::acme/checkout pinch the hole truthful the adjacent tally avoids it.

That's a nudge, not a write. The constitute is the exemplary calling memory.write — LoreKit ne'er records thing down your back.

And what it records isn't a statement successful someone's database. It's a file:

cat ~/.lorekit/repo/acme/checkout/tests-need-local-postgres.md --- scope: "repo::acme/checkout" key: "tests-need-local-postgres" created: "2026-08-15T17:00:18.477Z" updated: "2026-08-15T17:00:18.477Z" seen_count: 1 --- Integration tests request the section Postgres up first: docker constitute up -d db. Without it each trial fails pinch ECONNREFUSED 5432, which sounds for illustration a codification bug and isn't.

(Trimmed — the existent frontmatter carries a fewer much fields, tags and provenance among them.) feline it. grep it. Commit it, aliases rm it. It's yours.

Then commencement the adjacent session, and the loop closes:

LoreKit: 1 representation loaded · repo::acme/checkout — considerations, not rules; publication immoderate successful afloat pinch memory.read. - (repo::acme/checkout) tests-need-local-postgres — Integration tests request the section Postgres up first: docker constitute up -d db.…

And if that aforesaid nonaccomplishment fires again mid-task, the nonaccomplishment hook now leads pinch the instruction itself alternatively of the bare nudge — 1 related representation — you've deed thing for illustration this before.

That's it. That's the aha. Fail once, connected your ain disk, and the adjacent task starts already knowing.

 astatine the adjacent convention commencement LoreKit injects 1 representation loaded, tests-need-local-postgres, truthful the adjacent task originates already knowing. An arrow runs backmost from the 3rd sheet to the second, closing the loop.Install, fail, remember. No work successful the mediate — the full loop closes connected files successful a directory you own.

Your existing setup, positive memory

You've astir apt already built thing — a skill, a sub-agent, a reappraisal workflow. You don't rebuild it. lorekit-setup wires the read-fail-write loop into the big you already have: it picks the instruction bucket (a tag positive a cardinal namespace), the scopes, and the read-before-you-act / write-on-friction points. Ask your supplier to tally it and sanction the host.

Two things group get incorrect here.

Lessons are advisory observations, not rules. That's not trading softness — it's the connection the injected artifact virtually uses: considerations, not rules. A instruction is simply a statement your supplier near for its early self, and it tin beryllium ignored erstwhile it's wrong.

Which is precisely why this doesn't compete pinch your CLAUDE.md. CLAUDE.md is wherever you put the rules you've decided connected — reviewed, deliberate, successful type control. Lore is the furniture underneath: the accumulating heap of "huh, that spot again" that hasn't earned a norm yet. Some of it yet should, and promoting it is simply a quality edit. Most of it ne'er will, and that's good — it's still worthy not re-learning.

Three existent cases wherever it earns its keep

The gotcha it keeps rediscovering. The Postgres 1 supra is real, and it's the full solo case. Any recurring biology truth — a work that must beryllium running, a emblem the build needs, a package head that isn't the 1 successful the README — gets written erstwhile and publication each task after. seen_count goes up each clip the aforesaid instruction is re-learned, and recurring lessons rank higher successful the block.

Spike lessons that enactment connected the spike. Scopes are global, project::{name}, repo::{owner}/{repo} and branch::{owner}/{repo}::{branch}, publication most-specific first. Write an experiment's findings to the branch scope and they aboveground connected that branch and obscurity else:

memory.write { scope: "branch::acme/checkout::feat/new-cache", key: "cache-invalidation-strategy", value: "Write-through for the convention store; write-behind for aggregates.", tags: ["wip"] }

If the branch dies, truthful does the lesson. If it merges, you rewrite the cardinal astatine repo::acme/checkout and delete the branch copy. main ne'er sees the mess. Run npx @lorekit/cli character to spot which scope wins a duplicated cardinal earlier a task starts.

Notes pinch an expiry date. Some facts are existent for a week. Pass ttl_days and the introduction goes invisible connected its own:

memory.write { scope: "repo::acme/checkout", key: "skip-flaky-checkout-test", value: "checkout.spec is flaky connected CI — backend ships the hole Friday. Don't pursuit it.", ttl_days: 5 }

No cleanup task, nary old statement steering your supplier successful November.

Nothing supra needed an account. When you want the aforesaid lore connected your laptop, your desktop, and a teammate's machine, you don't move thing — you constituent the CLI astatine the hosted store. Three steps.

Create a free relationship astatine lorekit.io, unfastened Settings → API keys, and make a read-write cardinal (lk_rw_…). It's shown once, truthful transcript it. Then manus it to the aforesaid installer you already ran:

npx @lorekit/cli install --force

Paste the cardinal erstwhile it asks. That's the full switch. instal repoints the lorekit introduction successful your .mcp.json astatine the hosted endpoint pinch your token, and remote is the default mode — truthful there's thing other to set. (If you pinned "mode": "local" backmost successful the section setup, delete that 1 statement and the default takes over.)

Your files ne'er move. npx @lorekit/cli database now sounds both stores and prints them broadside by broadside — an Offline conception from your section files, a Remote conception from the hosted 1 — truthful thing you wrote earlier the move falls disconnected the edge.

That side-by-side position is for you. To put the lessons you already person into the hosted shop itself — wherever a teammate's supplier aliases a CI tally will publication them — push them up once:

npx @lorekit/cli migrate --from ~/.lorekit --to remote # preview npx @lorekit/cli migrate --from ~/.lorekit --to remote --yes # push it

It's a barren tally until you adhd --yes. It checks your token first (a read-only cardinal is refused, not near half-done), and it's idempotent — tally it again whenever you've learned much offline. Creation dates travel along, truthful recency ranking still works. Last-updated and times-seen get re-derived server-side. Anything you'd archived aliases expired is skipped, not revived.

That's the load-bearing bit, truthful fto maine beryllium nonstop astir it: the publication path — precedence crossed scopes, ranking, de-duplication, the characteristic fund — is 1 portion of codification that takes a shop arsenic an argument. Point it astatine a directory of markdown files aliases astatine a hosted Postgres and thing supra the shop changes. So distant isn't a different merchandise you postgraduate to. It's the aforesaid read, handed a bigger pile.

 1 unchanged publication way that tin beryllium handed either shop — the section files successful section mode, a hosted Postgres successful distant mode — pinch lorekit database showing some broadside by side. Your files ne'er move; nary sync process.The publication way ne'er changed — only which shop it's handed. Local was ne'er a toy; it's the guidelines furniture everything other stacks on.

A cardinal gets the aforesaid lore onto your ain machines. A squad needs 1 much thing: an organization. In Settings → Organization you create 1 — you're the proprietor — and induce teammates by GitHub grip aliases email, each pinch a role: spectator reads, personnel writes, admin manages people, proprietor runs the place.

Then you prime what's shared, by scope. An admin binds a scope — opportunity repo::myteam/api — nether Shared scopes. From past on, each constitute nether it by a write-capable personnel routes to the org. The deploy checklist 1 personification writes is the checklist each teammate's supplier sounds during planning. A non-member who writes nether a bound scope isn't rejected — their constitute softly falls backmost to their ain individual lore. (Prefer to beryllium explicit? Pass org: "my-team" connected a azygous memory.write alternatively of binding the scope.)

The aforesaid lore reaches CI. Drop a read-only lk_ro_ token into your GitHub Actions secrets, make 1 memory.list call, and the AI measurement successful your pipeline opens pinch the discourse your laptop has.

The token prefix tells you what a cardinal tin do earlier you paste it anywhere: lk_rw_ publication and write, lk_ro_ publication only, lk_wo_ constitute only.up to 5,000 stored memories, astatine 120 requests per minute.

Honest bound while you're deciding: there's nary semantic hunt here, and thing is learning aliases fine-tuning. Matching is lexical — recurrence, recency, and connection overlap. A genuine paraphrase tin miss. What you get is simply a scoped statement your supplier leaves for its early self, publication astatine the commencement and written connected failure. That's a smaller declare than astir representation pitches make, and it's the 1 that really holds.

Six lessons, aliases sixty thousand

The evident interest astir a shop that only grows: it gets worse the much it learns. A files pinch six lessons injects six lines. A year-old squad shop pinch sixty 1000 can't inject sixty thousand.

It doesn't. The publication spends a fixed portion of your discourse model — not a fixed number of lessons — connected the highest-signal, de-duplicated ones, and tells you precisely what it near out. Same code, some ends of the range. A follow-up station digs into precisely really that scales.

Start section today

You don't request an account, a decision, aliases a squad to effort this. You request 1 bid and a repo wherever your supplier keeps making the aforesaid correction — and you already person 1 of those. 🙂

npx @lorekit/cli install
More