Memory types · Procedural
Procedural Memory in AI Agents
Procedural memory in AI agents stores skills, tool-use patterns and learned procedures — how to accomplish tasks — distinct from factual (semantic) or event (episodic) memory.
Procedural
“Run linter before commit”
Semantic
“Team uses pnpm”
Definition
What is procedural memory in AI agents?
Procedural memory is memory of how, not what — skills, workflows, tool sequences and learned action patterns.
Examples: “always run the linter before commit”, “escalate to tier-2 after two failed resets”, a stored multi-step tool plan that worked for deploying to staging. Also called skill memory or procedure cache. Cognitive science maps procedural = motor/skills memory; agents implement it as stored trajectories and tool policies.
Comparison
Procedural vs semantic vs episodic memory
| Type | Stores | Example |
|---|---|---|
| Procedural | How to do something | “Run tests → lint → commit” |
| Semantic | Stable facts | “Repo uses pnpm” |
| Episodic | Specific events | “Deploy failed Tuesday” |
Implementation
How agents store procedural memory
Four common patterns: few-shot examples in prompt, stored tool trajectories, RL policy checkpoints and agent skill libraries.
- Few-shot in prompt — worked examples of the procedure inline (simplest, token-heavy)
- Trajectory store — embed successful tool-call sequences; retrieve similar plans
- RL checkpoints — policy weights encode procedure (advanced, parametric)
- Skill libraries — named procedures the agent invokes as tools
Tools
Procedural memory and tool-based agents
Tool-using agents learn which tools to call in which order — storing successful plans as procedural memory.
The memory-as-a-tool pattern: the agent reads and writes procedure memories via explicit tool calls, separate from semantic fact retrieval. Engram and Mem0 can store trajectory summaries; LangMem stores procedure state in LangGraph checkpoints.
FAQ
Frequently asked questions
What is an example of procedural memory in AI?
"Always run linter before commit", "escalate to tier-2 after two failed resets", or a stored 5-step deploy workflow. Memory of how, not what.
Procedural vs semantic memory?
Procedural = skills and workflows (how). Semantic = stable facts (what). "Use pnpm" is semantic; "pnpm install → test → deploy" is procedural.
Do coding agents use procedural memory?
Yes — stored tool trajectories, lint-test-commit workflows and codebase interaction patterns. Combine with semantic codebase facts. See coding agents.
Can you store procedural memory in a vector DB?
Yes — embed successful tool-call trajectories and retrieve similar plans by semantic similarity. Tag with memory_type=procedural for filtering.
Fine-tuning vs procedural memory?
Fine-tuning bakes procedures into weights (parametric). Procedural memory keeps workflows external and updatable. See memory vs fine-tuning.
Procedural memory in LangGraph?
LangMem checkpointers store graph state and tool sequences natively. External Engram/Mem0 can store trajectory summaries as procedural memories.
Shared procedural memory in multi-agent systems?
Store team-wide procedures (escalation workflows, deploy runbooks) in a shared namespace; scope user-specific procedures by agent_id. See shared memory.
Procedural memory and memory-as-a-tool?
Agents invoke memory read/write as tools — procedural memories are plans the agent stores and recalls via those tools. See memory as a tool.