All posts
Deep dive

Give your coding agent a memory it can read back

Your agent starts every session blank and re-derives what it already figured out last week. htmlbook's MCP server turns the documents it writes into a durable, searchable shelf it can recall across repos and sessions.

Your coding agent has no long-term memory.

It opens a session, reasons carefully through how your auth system works, writes a clean explanation — and the next session, in the next repo, it starts from zero. It re-reads the same files, re-derives the same architecture, and re-explains the same decision you already had it explain a month ago. Every conversation is its first day on the job.

The frustrating part isn’t that it can’t remember. It’s that the knowledge already exists — your agent wrote it down. It just had nowhere durable to put it, and no way to find it again.

Write-only knowledge

When an agent writes a design doc or a postmortem into your repo, that document is effectively write-only. The agent that produced it can’t search it next week. It can’t pull the relevant section into a new conversation. The knowledge is technically saved and practically lost.

What’s missing is a shelf the agent can both write to and read back from — across repos, across sessions.

htmlbook is that shelf

htmlbook is a remote MCP server. Connect it once, and your agent gets a small set of tools that turn its documents into durable memory:

  • publish — shelve a document (a spec, a design note, a decision record). Markdown is kept as the source of truth, rendered into a themed reader, versioned.
  • search — full-text recall across everything it has ever shelved. Before re-deriving how the payment flow works, search the shelf.
  • get — read a document back as its original Markdown, ready to fold into the current task.
  • cite — mint a deep link straight to the relevant heading, so the agent can point at a specific decision instead of pasting the whole doc.

The shelf is scoped to you and your workspace, so it spans every repo you work in. A system-design doc your agent writes in one project is recall-able from a completely different one, months later.

Why Markdown-as-truth matters here

A subtle but important detail: when your agent gets a Markdown document back, it gets the original .md source — not a lossy HTML rendering. So the read-then-edit-then-republish loop round-trips cleanly. The agent can recall a plan, update it, and re-shelve it without the document slowly degrading into mangled markup. Memory you can revise is far more useful than memory you can only read.

The shift

Most AI tooling treats each session as disposable. But the documents your agent already writes are exactly the long-term memory it’s missing — they just need a home that supports recall, not just storage.

Give your agent a shelf it can read back. Connect once, tell it to publish what’s worth keeping and search before it re-derives, and watch the same questions stop coming up.

Connect htmlbook over MCP →