defragmenting-memory
Memory Defragmentation Skill
Requires Memory Filesystem (memfs)
This skill works by directly editing memory files on disk. It requires the memory filesystem feature to be enabled.
To check: Look for a
memory_filesystemblock in your system prompt. If it shows a tree structure starting with/memory/including asystem/directory, memfs is enabled.To enable: Ask the user to run
/memfs enable, then reload the CLI.
This skill helps you maintain clean, well-organized memory blocks by spawning a subagent to decompose and reorganize memory files in-place.
The focus is on decomposition—splitting large, multi-purpose blocks into focused, single-purpose components—rather than consolidation.
Memory files live at ~/.letta/agents/$LETTA_AGENT_ID/memory/ and are synced to API blocks automatically by memfs sync on CLI startup.
When to Use
- Memory blocks have redundant information
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.
71syncing-memory-filesystem
Manage git-backed memory repos. Load this skill when working with git-backed agent memory, setting up remote memory repos, resolving sync conflicts, or managing memory via git workflows.
68finding-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.
60