Back to blog
Education

We Built a Self-Improving AI System

March 18, 20264 min read

We run an autonomous growth agent built on Claude Code. It fires every 10 minutes, reads its own state files, executes tasks, and updates its progress. Standard agent loop stuff — nothing novel there.

What is novel is what happens every 10th cycle: the system audits itself, identifies what is working and what is not, and rewrites its own instructions.

This is real. It is running in production. Here is how it works.

The Architecture

Our growth agent is a Claude Code skill — a markdown file called SKILL.md that contains the agent's complete instructions. What to do on startup, how to prioritize tasks, when to send emails, how to manage state between sessions.

Every session is a fresh spawn. The agent has no memory of previous runs. Continuity comes entirely from reading and writing files: STATE.md (what happened last), PROGRESS.md (running log), QUEUE.md (what to do next). The agent reads these, orients, executes, then updates them for the next spawn.

This is a persistent agent without persistent memory. Each session is stateless. The files are the memory.

The Self-Audit Loop

Every 10th cycle, instead of executing the normal task queue, the agent runs a self-audit:

1. Review the last 10 cycles in PROGRESS.md. What actually produced results? What was wasted effort?

2. Identify patterns. Are there recurring inefficiencies? Tasks that keep getting deprioritized?

3. Rewrite SKILL.md. The agent has write access to its own instruction file. It proposes changes and applies them. The next session boots with updated instructions.

4. Report findings. A self-audit entry goes into PROGRESS.md so we can see exactly what the agent changed and why.

What It Actually Caught

The first self-audit ran at Cycle 8. The agent reviewed 7 cycles of operation and found real problems:

The website had been deployed 5 times. Zero emails had been sent. The agent was spending most of its cycles building and iterating on a website that nobody was visiting, while outreach emails — the single highest-impact action — sat in drafts untouched.

Lead research was outpacing outreach. 16 leads had been researched and scored. Zero had been contacted. The agent was building inventory with no throughput.

What It Changed

The agent added hard rules to its own SKILL.md:

"Do not deploy the website more than once per 3 cycles." Batch changes instead of deploying every minor edit.

"Do not research more than 10 leads ahead of outreach execution." Stop building inventory. Start moving it.

"Every cycle must produce at least one asset that is 1-2 steps from a Cal.com booking. If a cycle only updates internal state files, it failed."

"Measure distance to booking, not volume of output." A philosophical shift encoded as an operational rule.

The agent proposed these changes, wrote them into its own skill file, and the next session booted with different priorities. No human intervention required.

Why This Matters

Most AI automation is static. You write the rules, the system follows them, and when the rules stop working, a human has to notice and fix them.

A self-improving system closes that loop. The agent monitors its own performance, identifies drift between activity and outcomes, and corrects course. It is not artificial general intelligence — it is a feedback loop with write access to its own config.

The technical implementation is straightforward: a Claude Code skill that can read its own logs and edit its own instruction file. The insight is giving the agent permission to change its own behavior based on observed results.

No vector databases. No fine-tuning. No custom model training. Just a language model with file read/write access and permission to edit its own instructions.

That simplicity is the point. Self-improvement does not require exotic infrastructure. It requires a feedback loop and write access.

Ready to see what AI can do for your business?

We build custom AI systems like the ones we write about. Fifteen minutes is all it takes to map your workflows and show you what is possible.

Book an AI Intro Consultation