What Is Procedural Memory in AI Agents?
Procedural memory is the part of an AI agent's long-term memory that holds how to act rather than what is true: the rules, code, instructions and skills that determine its behavior. In the CoALA framework for language agents, it takes two forms, implicit knowledge in the language model's weights and explicit knowledge in the agent's code. In practice it also includes system prompts and reusable skill libraries. The term comes from cognitive science, where it names memory for skills and procedures, "knowing how" as distinct from "knowing that."
Updated
What is procedural memory?
Memory research gave the distinction experimental support. In a 1980 study in Science, Cohen and Squire found that amnesic patients acquired a mirror-reading skill at a rate equivalent to matched control subjects and retained it for at least three months. They concluded that amnesia "seems to spare information that is based on rules or procedures, as contrasted with information that is data-based or declarative": knowing how, rather than knowing that.
Cognitive Architectures for Language Agents (CoALA), by Sumers, Yao, Narasimhan and Griffiths, published in Transactions on Machine Learning Research in 2024, carried the taxonomy into LLM agents by way of cognitive architectures such as Soar. CoALA states: "Language agents contain two forms of procedural memory: implicit knowledge stored in the LLM weights, and explicit knowledge written in the agent's code." Unlike semantic or episodic memory, which can start empty, "procedural memory must be initialized by the designer with proper code to bootstrap the agent."
Practitioners have widened the definition. LangChain's memory documentation describes it as "a combination of model weights, agent code, and agent's prompt that collectively determine the agent's functionality." Anthropic's Agent Skills package "procedural knowledge" as "organized folders of instructions, scripts, and resources that agents can discover and load dynamically to perform better at specific tasks."
How procedural memory works
Procedural memory lives in three places, and each changes at a different speed:
| Form | Example | How it changes |
|---|---|---|
| Model weights | General ability to write SQL | Fine-tuning, which CoALA calls "a costly form of learning" |
| Agent code | Decision loop, tool wrappers, retrieval logic | A code deploy |
| Instructions and skills | System prompt, skill files, tool descriptions | An edit to a stored document, sometimes by the agent |
The third row is where agents learn while running. LangChain's docs note that agents rarely modify their weights or code, but "it is more common for agents to modify their own prompts," for example through reflection, or meta-prompting. An illustrative version:
# Illustrative: an agent revising its own stored instructions
current = store.get(("instructions",), "refund_agent") # reads version 7
reply = model.respond(current.value, conversation)
feedback = collect_feedback(conversation)
if feedback:
revised = model.rewrite(current.value, feedback) # proposes new rules
store.put(("instructions",), "refund_agent", revised) # writes version 8CoALA warns that writing to procedural memory "is significantly riskier than writing to episodic or semantic memory, as it can easily introduce bugs or allow an agent to subvert its designers' intentions." If agents can edit their instructions, version every change and review the ones that govern consequential actions.
Why procedural memory matters in real-time systems
For a single agent, procedural memory is private. In production it rarely is: a fleet of agent instances loads the same instructions, skill library and tool list. That makes procedural memory shared state, with the two problems any shared write has.
Propagation. An agent that loaded version 7 at the start of a long task keeps following it after version 8 ships. If version 8 tightens a refund rule or withdraws a tool, every agent in flight acts on the old procedure until it reloads. The time until the last agent picks up the change has a cost, and it is worth measuring.
Concurrent rewrites. If two reflection loops like the one above run at once, both read version 7 and both write. The second write silently replaces the first: a lost update. Writing only if the stored version is still the one that was read, or giving the instructions a single writer, prevents it. Recording which version each action ran under makes a bad outcome traceable to the rule behind it.
One more discipline: procedural memory should hold rules, not the facts the rules depend on. "Refunds above the limit need a supervisor" is procedure. The customer's refund total this month is current state, which the agent should read when it decides, not recall. The line between what an agent remembers and what is true now is covered in agent memory types and trade-offs.
FAQ
Related terms
Agentic memory lets an AI agent keep what it learns and recall it in later steps or sessions, across working, episodic, semantic and procedural memory.
Semantic memory is long-term memory for facts and concepts. In AI agents it is the store of facts an agent keeps about the world, its users and itself.
Episodic memory in AI agents is a time-ordered record of the agent's own past events, actions and outcomes, retrieved to reuse experience in later decisions.
A fleet control loop observes running AI agents, derives fleet state, adjusts policy, budget or routing, and has agents act on the change while still running.
Shared context means every service and agent in a decision system reads one internally coherent snapshot of state, instead of private copies that diverge.
A race condition occurs when a system's outcome depends on the timing of concurrent operations, letting interleaved reads and writes corrupt shared state.
