Introducing Context Repositories: Git-based Memory for Coding Agents
By: Letta Source: Letta Blog Type: article (product announcement) Published: February 12, 2026
Summary
Letta introduces Context Repositories, a rebuild of how memory works in Letta Code based on programmatic context management and git-based versioning. Agents clone their memory repository to the local filesystem, giving them full terminal and coding capabilities to manage context — including progressive disclosure, rewriting context in token-space, and spawning subagents for concurrent memory operations. Git backing means every change to memory is automatically versioned, and multiple subagents can manage divergence through standard git operations.
Key Concepts
Virtual Memory as Local Filesystems
Files are simple, universal primitives that both humans and agents understand. Following the Unix philosophy, agents can chain standard tools for complex queries over memory, use bash for batch operations, or write scripts to process memory programmatically. The agent’s memory stays in sync regardless of where the client is running.
Progressive Memory Disclosure
The file hierarchy and filenames act as navigational signals — the filetree structure is always in the system prompt. Each memory file includes frontmatter with a description of its contents (matching Anthropic’s SKILL.md pattern). A system/ directory designates files always fully loaded into the system prompt. Agents can reorganize their own hierarchy, update frontmatter, and move files in/out of system/ to control what’s pinned to context as they learn.
Git-Versioned Memory
Every memory write produces a git commit with an informative message — giving agents and humans a full audit trail of how the agent’s knowledge evolved. Standard git operations (diff, log, blame) work on agent memory.
Concurrent Multi-Agent Memory (Memory Swarms)
Each subagent gets an isolated git worktree. Multiple subagents can process and write to memory concurrently, then merge through standard git conflict resolution. The /init tool fans out processing across concurrent subagents, each reflecting on a slice of conversation history in its own worktree, then merges results back to “main” memory.
Built-in Memory Skills
- Memory initialization: Bootstraps new agents by exploring codebase and reviewing Claude Code/Codex history using concurrent subagents in git worktrees
- Memory reflection (sleep-time): Background process that periodically reviews recent conversation history and persists important information; works in a worktree to avoid conflicts
- Memory defragmentation: Launches a subagent to reorganize files — splitting large files, merging duplicates, restructuring into a clean hierarchy of 15–25 focused files
Notes
- Direct parallel to home-brain architecture: what home-brain does for humans, Letta Context Repositories does for agents
- The
system/directory maps to CLAUDE.md’s @import pattern (always-loaded context) - Progressive disclosure via frontmatter descriptions = home-brain’s domain README + conventions pattern
- Git-versioned memory makes the audit trail explicit — aligns with domain changelog concept
- Memory defragmentation is equivalent to periodic domain restructuring / context pruning
- References Anthropic’s “Effective Context Engineering for AI Agents” and SKILL.md file pattern
References Cited in Article
- Anthropic: “Effective Context Engineering for AI Agents” (progressive disclosure patterns)
- Anthropic: SKILL.md file pattern (YAML frontmatter for navigational signals)
- Anthropic: Multi-agent research system
- Cursor: Self-driving codebases / multi-agent architecture
- MemGPT (arxiv 2310.08560) — original memory tools approach
- Letta’s prior work: sleep-time compute, continual learning in token space, Letta Filesystem, memory omni-tool