Back to Resources

AI Agent Memory: Why Our Systems Stopped Re-Solving the Same Problems

Why we store the working code instead of a description of it, and the benchmark that will prove it

Jim DeolaAugust 23, 2026
AI ImplementationAgent SkillsKnowledge Management
A tangled improvised line resolving into a row of identical evenly spaced blocks, representing an AI system replacing per-run improvisation with a stored, repeatable procedure.
On this page

Every business running AI automations pays a hidden tax. It never shows up as a line item, but it is in every invoice: your AI works out, from scratch, the same thing it worked out yesterday.

At Rhize we run AI systems daily. They process documents, generate client SEO reports, monitor our software stack, and summarize completed work. They perform well. But watching them closely, we noticed something almost comical. Every run, the AI re-derives the same plan, rewrites the same logic, and re-solves problems it already solved perfectly last week.

Imagine a talented line cook who invents a great dish on Monday, then shows up Tuesday with no memory of the recipe and invents it again. The food is usually good. But you are paying for invention every night, the dish varies a little each time, and occasionally an experiment misses. A restaurant runs on recipes for a reason.

We are fixing this by giving our systems what cognitive science calls procedural memory. This article covers what that means, why we are building it, and how we will know whether it works. It is the first post in a series, and the follow-up will publish our actual before-and-after numbers.

The three types of AI agent memory

People use "AI agent memory" to mean one of three different things, and the distinction matters.

  • Semantic memory is what the system knows: facts, preferences, context. "This client's brand voice is conversational." Most of the memory tools we have evaluated work here.
  • Episodic memory is what the system has experienced: conversation history, past sessions, logs. "Last Tuesday we discussed the pricing page."
  • Procedural memory is what the system knows how to do: the skills and procedures it has already worked out. "Here is the exact, tested sequence that produces the monthly report."

The third type has the least tooling built around it, and it is the one that decides whether an AI automation behaves like a seasoned employee or a brilliant new temp every single morning.

Procedural memory is muscle memory for software: the difference between knowing about riding a bike and knowing how to ride one.

The insight: store the working code, not a description of it

Here is where most AI agent memory architecture goes wrong. When an AI works out how to do something, say a sequence that pulls analytics data, builds a report, and posts it to Slack, most systems store a description of what happened. Next time, the AI reads the description and re-implements the work.

That is like keeping a restaurant review of the dish instead of the recipe.

The better pattern already exists in two places. AI agents built to play open-ended games keep a growing library of small, tested programs and reach for one when a familiar situation comes up. Anthropic has since shipped a version of the same idea, in which an agent saves working code as a reusable skill. Both do the thing that matters: when the AI writes code that works, keep the code. Verified, versioned, and retrievable, so that the next time a similar task appears, the system runs the proven procedure instead of improvising a new one.

The AI's job then shrinks to what it is actually best at: recognizing which recipe fits, filling in today's ingredients, and handling the unexpected. The routine part stops being interesting, which is the entire point.

How it works at Rhize

Our implementation is a loop with five steps.

  1. Freeze. When one of our automated routines completes successfully, the working code is captured, not a summary of it.
  2. Version and record provenance. The code is stored with its full paper trail: which routine produced it, what inputs it ran with, what it cost, and whether it passed verification checks.
  3. Index. Each stored skill gets a plain-language description that is searchable by meaning rather than by keyword.
  4. Retrieve and re-run. When a similar task arrives, the system finds the proven skill and executes it with the new inputs.
  5. Self-heal. If a stored skill fails, say because a third-party service changed, the AI falls back to solving fresh, and the fix becomes the next version. The library gets stronger exactly where the world changed.
Our vault-processing routine once needed to turn hundreds of PDFs into searchable summaries. The AI wrote a small program to handle the repetitive part. That program still exists. It ran again this week, unchanged, in seconds, for pennies. That is procedural memory working before we even formalized it. What we are building makes it the norm instead of the happy accident.

Why deterministic outcomes matter for client work

The word doing the work here is deterministic: the same input reliably producing the same process.

An improvising AI produces work that varies run to run. Usually the variation is harmless. Occasionally it is not: a slightly different report structure, a metric calculated another way, a step silently skipped. For internal experiments, tolerable. For client deliverables, no.

Frozen, versioned procedures change the contract.

Reliability. The process that ran this month is provably the process that ran last month.
Auditability. Every deliverable traces to a specific version of a specific procedure with a known track record.
Cost predictability. Running a stored program costs a fraction of having an AI reason through the task again, and it costs the same every time.
Compounding improvement. Fixes accumulate in versions instead of evaporating at the end of each session.

One honest caveat. Procedures that reach into the outside world, like rankings, analytics, and third-party platforms, cannot make the outputs deterministic, because the world moves. What becomes deterministic is the process, plus explicit verification checks that catch when the world moved underneath it.

What we're measuring (and publishing)

We don't ship architecture on vibes. Before rolling this out everywhere, we instrumented four production workflows with a two-arm benchmark: document processing, daily work summaries, software-stack monitoring, and the content pipeline that produced this article.

Arm A (baseline). The AI composes the work fresh each run, the way it does today.
Arm B (procedural memory). The deterministic share of the work runs from stored, versioned skills, and the AI handles only judgment and synthesis.

We are tracking wall-clock time per stage, how much AI composition each run needs, failure and manual-intervention rates, and the question that decides everything: whether stored procedures run correctly without edits. When the numbers are in, they will be the second article in this series, whichever way they point.

What this unlocks for clients

The quiet consequence of this architecture is that recurring work becomes a product instead of a performance.

Monthly SEO reporting, content production pipelines, analytics digests, review monitoring, data cleanups, anything your business does on a rhythm, can graduate from "an AI does its best each time" to "a versioned, verified procedure runs, and an AI supervises and improves it." That is the difference between hiring a gifted improviser and owning a playbook that gets sharper every month.

Recurring SEO work of the kind behind our South Jersey Glass & Door case study is exactly this sort of rhythm: the same procedure, run every month, where consistency is the product.

We are taking our own operations there first, and we think it is the standard AI automation should be held to generally.

This is part one of our procedural memory series. Part two publishes the benchmark results. You can follow along on our resources page or connect with us to be notified when the numbers land.

Appendix: how it actually works (for the technically curious)

Storage. A skill is a directory: a markdown spec (SKILL.md) plus the executable scripts it wraps, committed to a Git-backed registry. Nothing exotic, just version control doing what version control does.
Provenance. Each skill carries a sidecar contract: input schema, pinned dependency versions, environment assumptions passed as parameters rather than hardcoded paths, an exit-code and verification contract, and lineage recording what it forked from, what it supersedes, and which routine generated it. Secrets are keychain references, never values in code.
Indexing and retrieval. Skill descriptions are embedded and stored in Postgres with pgvector. Retrieval is a similarity search filtered by provenance signals: last-verified date, historical success rate, input-schema match. We deliberately chose not to use a graph database. "Which recipe fits this task" is a similarity query, not a graph traversal, and the skill-relationship graph we do want is a cheap generated view over the provenance table.
Execution surface. Stored skills are bash and CLI scripts, the most portable, storable, re-runnable layer available. That choice also sidesteps current platform limits on programmatic tool calling, which exclude MCP-connector tools but not CLI scripts.
Why linear workflows benefit most. Counterintuitively, the less exotic your workflow, the bigger the win. Token-efficiency techniques like code-mode tool calling mainly help complex, parallel tool orchestration. Retrieval-and-re-run inverts the economics: a stable, linear pipeline (fetch, process, write, notify) is exactly what freezes best into a deterministic script, because the LLM can leave the hot path entirely.
Verification and rot. "Verified" status decays with time, and a stale skill has to re-verify before it is trusted. Our existing stack-drift monitoring watches the registry the same way it watches our dependencies. Frozen code rots as APIs change, so rot detection is part of the system rather than an afterthought.

Frequently Asked Questions

What is procedural memory in AI agents?
Procedural memory is an AI system's stored knowledge of how to perform tasks: verified, reusable procedures, usually executable code, that the agent retrieves and re-runs rather than re-deriving the approach on every run. It complements semantic memory (facts) and episodic memory (history).
How is procedural memory different from RAG?
RAG (retrieval-augmented generation) retrieves information so a model can write a better answer. Procedural memory retrieves executable procedures so the system can skip re-writing and simply run proven work. RAG informs generation; procedural memory replaces re-generation with execution.
Does procedural memory make AI deterministic?
It makes the process deterministic: the same versioned procedure runs the same way every time. Outputs that depend on live external data still vary with the world, and verification checks exist to catch exactly those changes.
What business tasks benefit most from procedural memory?
Anything recurring and stable: scheduled reporting, document processing, data pipelines, content production, monitoring. High-frequency, linear workflows see the largest gains because the AI's per-run improvisation cost almost entirely disappears.

Want this working in your business — not just on paper?

Book a 30-min call and we'll map exactly where your business depends on you, and what to fix first. No pitch — you leave with a plan either way.

Book a 30-min call

Get insights like this in your inbox

Join our newsletter for actionable SEO, marketing, and growth strategies — no fluff, just results.

No spam. Unsubscribe anytime.

See exactly where your business
runs through you.

The next step is a 30-minute call.

Book a 30-minute call and we'll map where the business depends on you — and what it looks like once a system you own runs the routine. You leave with a plan, whether you hire us or not.

No pitch — you leave with a plan. We'll tell you exactly what we'd do, whether you hire us or not.