Skills, memory and state
A self-improving agent's real source is its skills, memory and instructions. How Agent Skills, Letta, Hermes and GitHub version them, plus Dolt, lakeFS, Neon.
For a self-improving loop, the project repository is only half the picture. The other half is what the agent has learned: its skills, its memory, its instructions and lessons. That is the part the loop rewrites most often, and historically the part with the least version control. If the agent rewrites a skill and the next fifty runs get worse, you want to know what changed, when, why, and how to put it back.
The good news from 2026: skills and memory are becoming plain files in git repos, which means everything on the previous pages applies to them too.
Skills as files
Agent Skills is the format most harnesses now share. A skill is a folder with a SKILL.md (YAML frontmatter plus instructions) and optional scripts and resources, loaded only when needed. Anthropic published the spec in December 2025 and donated it to the Agentic AI Foundation, a Linux Foundation body, in October 2026, alongside MCP (Anthropic). primary source Because a skill is just files, it diffs, reviews and reverts like code.
How the main harnesses version skills:
- Skills API (out of beta August 2026): every upload creates an immutable version (
skver_…), a full snapshot. Pin a version or uselatest(skills guide). - Managed Agents load skills from a mounted repository's
.claude/skills, so the repo is the skill store. ant applymanages agents, skills and memory stores as code, with a committed lock file.- Plugin marketplaces are git repositories. If a plugin doesn't declare a version, the commit SHA is its version (plugins).
Memory as a repository
- Letta context repositories
- Since February 2026, Letta agents keep memory as a git repository of Markdown files, auto-committed with a message on every change. Memory subagents and background reflection each work in their own git worktree and merge back through git. The clearest example of memory managed exactly like code.
- Claude Managed Agents memory
- Every write creates an immutable memory version attributed to the session that wrote it. You can audit, redact and restore versions, kept for 30 days. A research preview called Dreams reads memory plus past transcripts and writes a reorganized store.
- Claude Code auto memory
- A local MEMORY.md per project, outside git. CLAUDE.md is the layer you commit.
- GitHub Copilot Memory
- Stored by GitHub as repo-scoped facts, not in git. GA on paid plans since October 2026.
Sources: Letta, Managed Agents memory, Copilot Memory.
The trend is clear: reflection and consolidation (Letta's sleep-time agents, Claude Dreams, Copilot Dreaming) are the self-improvement step, and the vendors that take it seriously route the result through versions or PRs instead of overwriting memory in place.
Governing self-modification
A loop that edits its own skills needs the same discipline as a loop that edits production code. The patterns that work:
Keep skills, memory and instructions in git. In the project repo if they belong to the project, in their own repo if they belong to the agent. Auto-commit every agent write with a message that names the session.
Write to a branch, not to main. The agent proposes skill changes on a branch, exactly like code changes.
Gate the merge on evals. Replay a fixed set of past tasks with the old and new skill. Merge only if the score doesn't drop. This is a metric loop pointed at the agent itself.
Lock what must not drift. Safety rules, credentials handling and the judge's own instructions should be read-only to the agent (Hermes curator lock, a protected path, a push rule on .github/agents/).
Keep the session with the change. A skill edit with no record of the run that motivated it is impossible to review. Use the provenance tools here too.
Research backs the caution: work on skill misevolution shows self-written skills can drift and degrade (arXiv 2608.12851). secondary reporting
Versioned data and state
Loops also change data: tables they migrate, datasets they clean, eval sets they grow. Git can't hold those, but git-like tools for data can.
| Tool | What it versions | Agent angle | Self-host |
|---|---|---|---|
| Dolt / Doltgres | SQL databases with branch, diff, merge and log at row and cell level (MySQL- or Postgres-compatible) | Each agent writes on a branch; a human or CI reviews the diff before merging. MCP server available. Doltgres 1.0 shipped August 2026 | Yes, Apache-2.0 |
| lakeFS | Zero-copy branches over object storage | Each agent gets a data branch with tokens scoped to it; merges are policy-gated | Core yes (Apache-2.0); agent features are Enterprise |
| Neon / Databricks Lakebase | Copy-on-write Postgres branches in under a second | Branch per agent attempt, snapshot as checkpoint. Databricks says more than 80% of Neon databases are created by agents | Storage engine Apache-2.0 |
| Oxen | Large datasets, git-like | Eval sets and agent trajectories rather than code | Yes, Apache-2.0 |
For loops: if your goal touches a database, give each attempt its own database branch next to its git branch, and merge both or neither.
Forges at agent scale
GitHub's storage rebuild, Anthropic's Scion, OpenAI's Pando, agent forges from Entire and Cursor, and git-as-an-API services for repo-per-user platforms.
Landscape
Every tool in this section on one page, split into self-hosted and open source, generally available services, and previews. November 2026.