Deep dives • Series Part 2 of 3

Building a General AI Agent, Part 2: Memory That Does Work

Part 1 covered what the agent loads at startup. Part 2 covers what it remembers between sessions. You do not need a retrieval stack for this. You need a running log and a set of skills.

A running log

The agent appends to a dated, plain-text log as it works: decisions, corrections, what worked, and what broke. It is cheap to write, easy to read, and an agent with file and search tools finds what it needs in it without an index.

Turn repeat work into skills

When the same kind of task shows up in the log a few times, write it down as a skill: a short file with the steps, the rules, the tools to use, and how to check the result. A skill is memory that does work. Instead of digging up old conversations and hoping the agent infers the lesson, it loads the exact procedure.

Corrections go into the skill, not just the log, so the same mistake does not happen twice.

Load skills only when needed

Startup context holds a short index: each skill's name and one line on when to use it. The agent opens the full skill only when the task calls for it, so unrelated instructions stay out of the way.

Why not a retrieval stack?

Embeddings and hybrid search answer “what did we say about this?” Most agent work needs “how do we do this?”, and a skill answers that directly. A vector database is more infrastructure to run, and it returns close matches instead of the procedure. Start with the log and skills, and add search only if you hit a real limit.

The loop

  1. Load startup context and the skill index.
  2. Open the skill that matches the task, if there is one.
  3. Do the work.
  4. Append what happened to the running log.
  5. When a pattern repeats, write a new skill or update the one you used.

Bare-bones checklist

  • A dated running log the agent appends to.
  • A skill for every workflow you repeat.
  • A short skill index at startup; full skills loaded on demand.
  • Corrections written into skills, not just the log.
  • No retrieval stack until plain-text search stops being enough.

Rather have us do this step?

We build agents like this for your business, starting with a free 30-minute call.

Previous: Part 1Next: Part 3