Korely

Blog Coding agents · MCP

What should a coding assistant remember? (And what it shouldn't)

When one of my AI agents proposed keeping our decisions only in Korely, I said no. I want to know what works, not guess, so every decision now goes in twice and we compare.

On this page
A board in two columns. Keep: a decision with why and when, a lesson about what broke and the fix, a preference such as plain words in reports, the reason behind a change, the context of open work. Leave out: API keys and passwords, other people's personal data, a security hole not yet fixed, what another system already holds. A person points at the list.
The left column fills up fast. The right one is where the trouble starts.

Save the decisions, reasons, preferences and lessons that nothing else records: each with its reason and its date. Keep out keys and passwords, other people's personal data, security holes that aren't fixed yet, and anything another system already holds, like your repository, your deploy platform or your issue tracker. These rules hold on Korely Cloud and on Korely installed on your own infrastructure. Then check that the assistant reads it back.

The story

Why our agents write every decision twice

Korely began with my own agents, spread across Claude Code, Hermes Agent and Grok, and my wish for one memory they could all share. Today a team of AI agents helps me build it. Each one has a job: a coordinator, a builder, a skeptic who tries to break what the builder made, a tester, one who writes the docs. They all share one memory on Korely.

Their other notebook is a set of markdown files (MD files for short), plain-text notes each agent reads when it starts. One night I realised nobody could tell me how much the agents used the memory, or how well it remembered. My answer, that night, was this: "I wouldn't stop writing in the MD files, as we do now. I'd keep them in parallel anyway, because that way we actually know what works and what doesn't."

So the agents write the same text in both places, and we compare. We do this temporarily, to evaluate Korely against a baseline. It's an experiment, not the workflow I'd recommend to every team: two copies can drift apart. The longer story of how the team uses its memory is in Multi-agent shared memory: how our own agents use it.

They write under a few rules. I'd give the same ones to a coding assistant, or to any bot you build that has to remember things about your project or your customers. The main rule: if another system is already the source of truth, let the agent query that system. Use memory for the reason, context or decision that the system doesn't keep. If you haven't connected a memory yet, start here.

Keep

What goes in a coding assistant's memory

My agents save two kinds: decisions and lessons. My preferences go in as decisions. For a coding assistant I'd add three more kinds.

  • A decision, with why and when. "8 November 2026: every decision goes in the markdown files and in Korely, same text, because that way we actually know what works and what doesn't." Without the why, you end up where I once did with six copies of a file, knowing what a rule said and never why it was there (the story opens the first post of this series).
  • A lesson: what broke, and the fix. "15 October 2026: the site build fails on Alpine, because two optional binaries are missing there. The build runs on a Debian image now." (Alpine and Debian are two kinds of Linux.) Without that line, someone tries Alpine again next month.
  • A preference. "Reports to me in plain words: no internal codes, no file names." "Ask me before anything that costs money."
  • The reason behind a change. Not "version 1.4 is live": your deploy system says that. But "we postponed version 1.5 because the migration still fails on Alpine". The same for who looks after a part: CODEOWNERS says who, memory keeps why it moved.
  • The context of open work. The list of tasks belongs in your issue tracker. The memory keeps what the tracker doesn't: why it's paused, what you tried, what comes next. Korely's hooks for coding assistants (small scripts that run inside the assistant at set moments) ask the memory for exactly this when a session starts: decisions, rules, open work and next steps.

Leave out

What stays out of the memory

My agents never write the first three. The fourth is my advice.

  • Keys, passwords, and where they're kept. A memory is read back into a chat, and chats get pasted. Keep secrets out of what you type. Korely's hooks also mask what looks like a key, such as a long run of random letters and digits, before anything leaves your machine, but that masking is best effort and may miss a credential that doesn't match a known shape. Never rely on it as the reason a secret is safe to type (the Cursor page of the docs says more). With the hooks on, your conversations go to the memory you configured: Korely Cloud, or the server you installed yourself. The rule is the same in both.
  • Other people's personal data, in a coding assistant's memory. Customers, colleagues, anyone who didn't ask to be in your assistant's notebook. A bot you build for your customers is another matter. There each customer's memories sit under their own user_id, apart from the others, and you can erase one person in one call.
  • A security hole that isn't fixed yet. It belongs in an access-controlled security tracker, not in a general-purpose agent memory or in ordinary project notes. My agents keep it in a private file until the fix is out. Once it's fixed, a lesson that isn't sensitive, about the kind of mistake and how to prevent it, can go in the memory.
  • What another system already holds. How to run the tests, where the files live: the repository and a rules file such as CLAUDE.md, AGENTS.md or .cursor/rules say that. Which version is live: your deploy platform. Open tasks: the issue tracker. Secrets: the secret manager. In the memory each one is a second copy that can go stale.

Whole work sessions are a choice of their own.

If you use the hooks, they save each session. A recall through Korely's remote server, or the korely command, can leave the sessions out (the option is called exclude_sessions).

How

One decision per memory, readable on its own

Our format is short: the date, who decided, what, why. My words in quotes, when there are some. A month later it still makes sense to somebody who wasn't there, including me.

A yellow index card with four rows. When: 8 November 2026. Who: Massimiliano. What: every decision goes in the markdown files and in Korely, same text. Why: that way we actually know what works and what doesn't. Next to it, an example: a sticky note that only says ok, both, with the question both what.
The sticky note is an example, not one of ours: "ok, both" is clear on the day. Give it a week.

Write the date with its year. Korely reads each memory and writes short facts from it, each one a sentence like "this repo / deploys to / Hetzner". A date written with its year, like "since March 2026", makes the fact start then, not when you saved it.

Keep it to one decision, not a diary. A short memory is easier to find, to correct, or to forget on its own, without taking three other decisions with it.

The save tool, korely_add, also takes an agent_id, the name of the agent that writes, like initials under a note. Each of my agents writes under its own, and a read without one returns everyone's.

And read it back. After a save, my agents ask the memory about the same decision, so they know it's there before the next agent needs it. Facts are written about ten seconds after a save, so the read-back tells you the write was accepted. To check the extracted facts themselves, wait a little and ask for them with korely_get_facts.

Fix

When a memory is wrong

When a fact is wrong, or a decision changes and the old one is still open, two tools put it right. The assistant can call both.

korely_correct_fact fixes one fact by its id. The old fact is closed and a corrected one is written, and both stay in the history. With close=true it only closes the fact. korely_forget_memory forgets a whole memory. It drops out of every read, and the facts only it stated are closed. With erase=true, the text is removed from the active systems and no longer appears in any read. On Korely Cloud, encrypted backup copies expire within the backup retention period, currently up to 35 days. Both need a key that can write. On the dashboard, the Facts page has a Correct button, and the Memories page has Delete and Erase.

Three hand-drawn fridge notes. Correct: Sara's dinner Friday crossed out, Saturday written below, both kept. Forget: the note taken off the fridge and put in a drawer, nobody reads it. Erase: the note thrown in the bin, gone from every read, and the backup copies expire within 35 days.
Forgetting hides the note. Only erasing throws it away.

To close

What I took home

  • A decision is worth saving with its reason and its date. Without them, a month later it's a line nobody can explain.
  • Keys and open security holes stay out of a coding assistant's memory, and so does anything another system already holds. In a bot you build, each customer's data sits under their own user_id.
  • Read each decision back right after you save it, the way my agents do.

Tonight one of my agents will write a decision in two places, the same words in each. Tomorrow another one will ask Korely about it, read the reason next to the date, and check it against the MD file.

Start with one decision of yours: the date, what, and why. Connect a memory with the four-question guide, save it, and ask for it back next week.

Read next

The rest of this series

FAQ

Questions about what Korely keeps

Does Korely save my coding sessions on its own?

Only if you install the hooks, with korely init --tool for Claude Code, Codex or Cursor. Then each session is saved to the repository's memory as a memory of kind session, on Korely Cloud, or on your own server if you run Korely yourself. Without the hooks, the assistant saves with korely_add: when you ask, and when a decision is settled, as the server's instructions tell it.

Can a recall leave the work sessions out?

Yes. On Korely's remote server, korely_get_context and korely_search take exclude_sessions, and the korely command takes --exclude-sessions. The local server that the hooks install doesn't take it yet. The sessions stay stored, and the read leaves them out, along with the facts only they state.

How do I remove something I saved by mistake?

Forget it by its id with korely_forget_memory, or press Delete on it in the Memories page of the dashboard. It drops out of every read, and the facts only it stated are closed. With erase=true, or the Erase button, the text is removed from the active systems and no longer appears in any read. On Korely Cloud, encrypted backup copies expire within the backup retention period, currently up to 35 days.

Can several agents write to the same memory?

Yes. Give each one a key of the same project and its own agent_id when it writes. A read without agent_id returns what all of them wrote, and a read with one returns only that agent's memories.

Back to top