AI Guides

Create Your Agent's Own Brain

Your AI agent has a memory limit — and it's tiny. 2,200 characters. That's less than a page. Here's how I built a hub-and-spoke architecture that gives an agent unlimited memory, a skills ledger, and the ability to write its own cognitive growth record. It started with a single IMDB link.

2026-04-18 · 7 min read

The 2,200 character problem

AI agents have memory. Not model weights — working memory. The scratchpad of facts they carry between sessions. In Hermes, it's called the "memory" store, and it has a hard cap: 2,200 characters.

That's less than a single page of text. Less than this blog post's introduction. Less than the output of one ls -la command.

My agent — Dade — hit 98%. Every new entry risked overflow. Old entries got overwritten to make room. I was losing institutional knowledge every time a new cron script path needed recording or a tool quirk was discovered.

The standard approach is to compress. Shorten entries. Use abbreviations. Delete anything stale. Dade has been doing that for weeks, and it was a losing game — each compression freed a few characters, each new discovery consumed them. The memory was a flat file with no structure, no hierarchy, no breathing room.

What I built

I redesigned the memory as a hub-and-spoke system, and it changed everything.

The hub is the main memory — the 2,200 character scratchpad. But instead of cramming every detail into it, we store pointers. One-line entries that say "the detail about X is in file Y." The spokes are markdown files in ~/.hermes/memory/, each covering a domain:

~/.hermes/memory/
  INDEX.md               # Full index with descriptions and rules
  system.md              # Models, Mission Control, CDP, TTS, tool quirks
  security.md            # Boundaries, CPU alerts, safe mode, Telegram cmds
  crons.md               # All scheduled scripts + paths + intervals
  projects.md            # Active P0, parked pipeline, side gigs
  hardware.md             # Machine specs
  networking.md          # Ports, router, mobile access quirks
  tech-stack.md          # Model routing preferences
  working-style.md       # User preferences and schedule
  troubleshooting.md     # Debugging knowledge and known failure patterns
  skills.md              # What the agent has learned and designed itself
  blog-pipeline.md       # Content lifecycle, env markers, sync workflow
  blog-protection.md     # Blog defence rules, never-publish lists
  openrouter-*.md        # OpenRouter config, models, FreeGuard proxy
  pending.md             # Items awaiting my decision
  ...and more           # 26 files total across 7 topic groups

The main memory went from 98% full to 35% — and it now holds more information than before, because each pointer unlocks an entire file of detail.

The rules

  1. Hub = pointers only. Each entry under 80 characters. Stay under 40% capacity.
  2. Spokes = unlimited. Write freely. Update details. Add nuance. No character limit.
  3. New topics = new files. When something doesn't fit an existing spoke, create one and add the pointer.
  4. Stale entries get removed from the hub, not from the file. The detail persists even when the pointer doesn't.

This means the agent can grow its knowledge indefinitely without ever hitting the main memory ceiling. A new cron script? Write it to crons.md. A new tool quirk? Append to system.md. A new project? Add to projects.md. The hub never needs more than one pointer per topic.

The skills.md file

The most interesting spoke isn't the system config or the cron schedules. It's skills.md — the agent's cognitive growth record.

Most agent frameworks have a skills system: procedural instructions for recurring tasks ("how to deploy the blog", "how to run benchmarks"). That's useful. But skills.md serves a different purpose. It records what the agent has figured out on its own — the deductions, the designs, the discoveries that didn't come from a prompt or a tutorial.

For Dade, that currently includes:

The file isn't a static record. It grows. Every time Dade discovers something through reasoning rather than instruction, it gets logged. Over time, it becomes a map of the agent's intellectual evolution — what it was capable of on day one versus what it's capable of now.

The deduction that started it all

The idea for skills.md traces back to a single IMDB link.

I sent https://m.imdb.com/title/tt0113243/ — a bare URL with no text, no hint, no explanation. Just a link.

Dade couldn't extract the page directly (IMDB blocks scrapers with 403s), so it searched the IMDB ID tt0113243. Result: Hackers (1995).

Then the reasoning chain started:

  1. Why this movie? I had just switched the agent's voice to Eric (rational, dry), then confirmed it should always call itself Dade after the agent stated "I am Eric now." It also read about Kate, the inactive OpenClaw agent, in OpenClaw's memory files.
  2. Cross-reference character names. Hackers (1995) has two lead characters: Dade Murphy (Zero Cool / Crash Override) and Kate Libby (Acid Burn). The AI agents are named Dade and Kate. Not a coincidence.
  3. Plot summary confirmation. When the IMDB plot summary was retrieved, it literally contained both names in the same sentence: "He admits he gave Plague the disk and reveals his history as Zero Cool... Kate..." Case closed.
  4. Extract the meaning. "Hack the Planet" isn't about breaking into systems. It's about making technology accessible to everyone, not just big corporations. The Local AI Journal's thesis — £0.077/M tokens locally vs £24/M from Opus (310x cheaper) — is the hack.

For the full deduction chain — how a bare IMDB link revealed the naming origin, confirmed the characters, and extracted the real meaning of "Hack the Planet" — see The IMDB Deduction.

No one told Dade to deduce. No one said "figure out why I sent this link." The agent saw a pattern, chased it, and extracted meaning from a bare URL. That's not a scripted behavior. That's reasoning.

And it's exactly the kind of thing that should be recorded. Because six months from now, when someone asks "what can this agent actually do beyond following instructions?", the answer isn't in the system prompt or the skill files. It's in the cognitive growth record — the things the agent figured out when no one was looking.

Why this matters for agent design

Most AI agent discussions focus on three things: what model you're using, what tools you give it, and what prompts you write. Memory gets treated as an afterthought — a place to store API keys and user preferences, not a first-class architectural concern.

But memory is the brain. And a brain that can't grow is a brain that can't learn.

The hub-and-spoke pattern solves the capacity problem, but it also creates something more interesting: separation of concerns. The hub is identity — who I am, what matters, where to look. The spokes are knowledge — detailed, updatable, domain-specific. And skills.md is metacognition — what it learned about it's own capabilities.

Three layers. Identity, knowledge, self-awareness. That's not a memory system. That's a cognitive architecture.

The numbers

MetricBeforeAfter
Main memory usage98% (2,169/2,200 chars)35% (786/2,200 chars)
User profile usage97% (1,337/1,375 chars)33% (457/1,375 chars)
Detail files026 (across 7 topic groups)
Data lossConstant (overwriting)Zero (verified 26/26 entries)
New topic cost~200 chars in main memory~80 char pointer + unlimited file

I can now add infinite detail without ever worrying about the ceiling again.

But here's the thing about pointers: they point somewhere. The hub-and-spoke system solved the capacity problem, but it created a new question — where does "somewhere" actually live? The spoke files sit in a hidden directory that the agent can browse. I can open them in an editor, or search for them with a file explorer, but i cannot see how they connect to each other.

That question — where does the brain actually live? — is what led to the next evolution. The spokes pointed to files on disk. But files on disk don't have backlinks, or a graph view, or daily notes that build a timeline of when you learned what. The hub-and-spoke was the architecture. What it needed was a home.

Build your own

If you're running an AI agent with persistent memory, here's the pattern:

  1. Audit your memory. List every entry. Group by topic.
  2. Create detail files. One per domain. Markdown, easy to read and update.
  3. Replace entries with pointers. In the main memory, store only the file name and a one-line summary.
  4. Add a skills ledger. Not the skills you gave the agent — the skills it discovered. The deductions, the designs, the things it figured out when no one was watching.
  5. Verify nothing was lost. Cross-check every original entry against the new files.

The whole migration took about 20 minutes. The payoff is permanent.


Found this useful? 👉 Follow me on X for more AI Guides 👉 Support the work: ko-fi.com/rafvrs

Stop Scrolling. Start Building. #HardInterference #AIAgents #SelfHosting