syncing-memory-filesystem
Git-Backed Memory Repos
Agents with the git-memory-enabled tag have their memory blocks stored in git repositories accessible via the Letta API. This enables version control, collaboration, and external editing of agent memory.
Features:
- Stored in cloud (GCS)
- Accessible via
$LETTA_BASE_URL/v1/git/<agent-id>/state.git - Bidirectional sync: API <-> Git (webhook-triggered, ~2-3s delay)
- Structure:
memory/system/*.mdfor system blocks
What the CLI Harness Does Automatically
When memfs is enabled, the Letta Code CLI automatically:
- Adds the
git-memory-enabledtag to the agent (triggers backend to create the git repo) - Clones the repo into
~/.letta/agents/<agent-id>/memory/(git root is the memory directory) - Configures a local credential helper in
memory/.git/config(sogit push/git pullwork without auth ceremony) - Installs a pre-commit hook that validates frontmatter before each commit (see below)
- Installs a post-commit hook that pushes commits to an optional additional remote (see "Additional memory-repository remote" below)
More from letta-ai/letta-code
initializing-memory
Comprehensive guide for initializing or reorganizing agent memory. Load this skill when running /init, when the user asks you to set up your memory, or when you need guidance on creating effective memory files.
71finding-agents
Find other agents on the same server. Use when the user asks about other agents, wants to migrate memory from another agent, or needs to find an agent by name or tags.
65creating-skills
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Letta Code's capabilities with specialized knowledge, workflows, or tool integrations.
60migrating-memory
Migrate memory blocks from an existing agent to the current agent. Use when the user wants to copy or share memory from another agent, or during /init when setting up a new agent that should inherit memory from an existing one.
60working-in-parallel
Guide for working in parallel with other agents. Use when another agent is already working in the same directory, or when you need to work on multiple features simultaneously. Covers git worktrees as the recommended approach.
60acquiring-skills
Guide for safely discovering and installing skills from external repositories. Use when a user asks for something where a specialized skill likely exists (browser testing, PDF processing, document generation, etc.) and you want to bootstrap your understanding rather than starting from scratch.
58