Skip to Content
loop.fun
Versioning agent work

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 use latest (skills guide).
  • Managed Agents load skills from a mounted repository's .claude/skills, so the repo is the skill store.
  • ant apply manages 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.

ToolWhat it versionsAgent angleSelf-host
Dolt / DoltgresSQL 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 2026Yes, Apache-2.0
lakeFSZero-copy branches over object storageEach agent gets a data branch with tokens scoped to it; merges are policy-gatedCore yes (Apache-2.0); agent features are Enterprise
Neon / Databricks LakebaseCopy-on-write Postgres branches in under a secondBranch per agent attempt, snapshot as checkpoint. Databricks says more than 80% of Neon databases are created by agentsStorage engine Apache-2.0
OxenLarge datasets, git-likeEval sets and agent trajectories rather than codeYes, 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.

loop.fun

Patterns, hints and tools for designing the loops that keep agents working, and for widening the set of loops you can think of.

© 2026 loop.fun · CC BY 4.0

On this page