readingmemorypart 6

Procedural Memory: How Agents Remember How to Act

Agent Memory, Made Clear · Part 6 · 6 min read

Tell an agent “always run tests before pushing” and watch what happens next week. If it pushes untested code again, the correction landed in a diary. If it just runs the tests - unprompted, forever - the correction landed in procedural memory. This is the type that changes what the agent does, not what it can recall. It comes in two main forms.

Form 1: Standing instructions - rules the agent always carries

The simplest procedural memory is a persistent instruction set loaded into every session: a file of rules that travels with the agent.

The everyday example is the CLAUDE.md / AGENTS.md pattern from coding agents: a file in your repository - “use pnpm, never npm; run make test before committing; our API errors follow RFC 7807; don’t touch legacy/” - automatically included in the agent’s context every session. Nobody retrieves it; it is simply always there, shaping behavior. Teams routinely maintain these files like documentation, because that’s what they are: documentation the agent actually obeys.

Three properties make standing instructions the workhorse form:

Form 2: Skill libraries - whole procedures on the shelf

Rules fit in a line; procedures don’t. “How to set up a rate limiter in our stack” is fifty lines of steps and code. Skill libraries store such procedures as retrievable units: each skill = a name + a short description (“when to use me”) + the full procedure (steps, code, checklists). Descriptions are indexed for search; when a task matches, the skill body is pulled into context and followed.

The landmark demonstration is Voyager (2023): a Minecraft-playing agent that, whenever it solved something new, saved the working code as a named skill (“craftStonePickaxe”) in a library - then retrieved and composed old skills for harder goals. Skills built on skills; competence compounded. The same pattern now runs in production coding agents as skill/command files (e.g., a skills/ folder of markdown procedures - “how we do database migrations” - loaded on demand).

The design split to remember: standing instructions are always-on and tiny; skills are on-demand and rich. Rules you must never break go in form 1; recipes you sometimes need go in form 2. Confusing the two either bloats every call or lets critical rules get missed.

The loop that makes it memory: learning new behavior

A hand-written rules file is configuration. It becomes memory when the agent’s own experience writes it. The loop:

  1. Experience: the agent pushes untested code; the build breaks; Maya corrects it. (Or: the agent notices its own repeated pattern.)
  2. Distill: reflection (Blog 4) turns the episode into a candidate rule: “Before any push, run the test suite.”
  3. Install: the rule is appended to the standing instructions - or saved as a skill; ideally with provenance (“learned from incident, July 12”).
  4. Behave: every future session carries the rule. The mistake is now structurally hard to repeat.

This is the “self-editing prompt” idea: the agent’s instruction file is writable by the agent (MemGPT/Letta made this explicit - the agent has tools to edit its own persistent memory blocks, including its persona and rules; Blog 10 goes deep). It is also the mechanism behind product features where an assistant “learns your preferences”: your feedback is being distilled into standing instructions attached to you.

Two safety rails, because self-modifying behavior can go wrong:

Where the value shows up

Procedural memory is arguably the most underrated type commercially, because its effect compounds:

And one warning: procedural memories are the highest-risk writes in the whole system. A poisoned semantic fact misinforms one answer; a poisoned rule corrupts every future action (Blog 12 covers this attack surface). Write-time review matters most exactly here.

Quick recap

We now know all four memory types. Next, we descend into machinery: where memories physically live - files, vector databases, knowledge graphs - and how to choose.

← Part 5Part 7 →