Memory & dreaming
Initialize, teach, and improve your agent's memory over time
Letta agents use MemFS, a git-backed memory filesystem that they can inspect and edit. Memory is shared across the agent’s conversations and improves as the agent learns durable information about you and its work.
Initialize memory
Section titled “Initialize memory”Run /init to bootstrap or refresh memory for the current project. The agent inspects the repository, asks about your working style when needed, and can review prior coding sessions using subagents.
> /initIf the memory hierarchy has drifted or grown too large, run /doctor to audit placement, duplication, and system-prompt token usage.
Teach your agent
Section titled “Teach your agent”Your agent updates memory when it learns something durable. You can also teach it explicitly with /remember:
> /remember always use pnpm in this repoThe agent decides where the lesson belongs and commits the update to MemFS. Use the memory viewer in the desktop app or inspect $MEMORY_DIR directly to review what it saved.
Dreaming
Section titled “Dreaming”Dreaming uses background subagents to review recent conversations, consolidate useful lessons, and update memory without interrupting your active work.
Configure dreaming with /sleeptime in the CLI or the sleeping alien icon in the app. It can run after a configured number of user messages or when the context window is compacted.
Reorganize memory
Section titled “Reorganize memory”For larger cleanups, ask the agent to reorganize its memory. The memory workflow backs up the current repository before splitting large files, merging duplicates, or restructuring the hierarchy.
See MemFS for the directory structure, versioning model, synchronization behavior, and agent-owned skills.