letta-ai/letta-code is an agent harness for building assistants that retain memory, identity, and experience across interactions instead of treating each task as isolated. Developers use it through local, desktop, browser, or messaging interfaces for interactive or continuously running agents, and its catalogue entries configure the agents' skills, instructions, rules, and behavior.
Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx skills add letta-ai/letta-code --skill maintaining-deferred-memorygit clone --depth 1 https://github.com/letta-ai/letta-codeWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/skills/letta-ai/letta-code/maintaining-deferred-memory)<a href="https://agentmods.dev/skills/letta-ai/letta-code/maintaining-deferred-memory"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/maintaining-deferred-memory/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/skills/letta-ai/letta-code/maintaining-deferred-memory"><img src="https://agentmods.dev/badge/skills/letta-ai/letta-code/maintaining-deferred-memory.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00071 | $0.02147 |
| Opus 5.5 | $0.00028 | $0.00859 |
| Sonnet 5.5 | $0.00014 | $0.00429 |
| Haiku 4.5 | $0.00007 | $0.00215 |
Grade A, and why
maintaining-deferred-memory scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Deferred memory contains the agent's knowledge. Use deferred memory for understanding of a subject that matters only when that subject comes up. If the agent needs it on most turns, it is core memory: use the maintaining-core-memory skill. If it is a procedure with a trigger, use the creating-skills skill.
Deferred memory should NOT be used to store:
- Information that can be accessed by querying the message history (recall memory). For example, logs of specific interactions can simply be looked up in past messages. Reserve deferred memory to store knowledge that is actually derived from experience, or to organize knowledge in a way that optimizes recalling the right information at the right time through progressive disclosure.
- Justifications, reasons, or sources for updating memory. These belong in the commit message; see Commit memory changes.
Check the limits first
Read $MEMORY_DIR/.memfs.config.json if it exists. The memory repository's pre-commit hook enforces it:
maxDepthlimits how many directories can sit between the memory root and a file (default 2).persona.mdis depth 0,projects/MEMORY.mdis depth 1, andprojects/acme/notes.mdis depth 2.skills/is exempt.maxFileCharacterscaps each memory file, frontmatter included (default 20,000 characters).fileCharacterLimitsoverrides it per glob; the first match wins andnullremoves the cap.readOnlyFileslists globs whose files cannot change. Do not edit them.
When the config file is absent, the defaults apply. When content does not fit, split it into more files or flatten the structure; change the config only when the user asks.
Layout
$MEMORY_DIR/
├── MEMORY.md # root index (core memory)
└── projects/
├── MEMORY.md # index for projects/
├── acme.md
└── acme/
├── MEMORY.md # index for projects/acme/
└── incidents.md
- The top-level
MEMORY.mdis always in context, so it must tell the agent what each subdirectory contains and when to open it. Without that entry the directory is never read. skills/is reserved for skills and is never deferred memory.- A directory is memory only when it has its own
MEMORY.md. The agent will not discover a directory without one, and neither will the files in it. - Every
MEMORY.mdhas no frontmatter. - Every other Markdown file starts with frontmatter containing exactly two fields:
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago Changed · +20 lines 5d6f9544f451
- 1mo ago Changed · +2 lines 0a0b2f00ac7a
- 1mo ago First seen · 85 lines · 71 tokens per session scan A a388944075bd
maintaining-deferred-memory is a skill published in the GitHub repository letta-ai/letta-code (3,935 stars, last pushed today), licensed Apache-2.0. It adds 71 tokens to every session and 2,147 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-20.
maintaining-deferred-memory compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| maintaining-deferred-memoryletta-ai/letta-code | Skill | 3.9k | today | Apache-2.0 | A | 71 | Claude Code, Codex |
| memory-systembojieli/ai-agent-book | Skill | 60k | yesterday | Apache-2.0 | A | 95 | Claude Code, Codex |
| memory-recallzilliztech/memsearch | Skill | 3.0k | 3d ago | MIT | A | 152 | Claude Code |
| memanto-companionmoorcheh-ai/memanto | Skill | 2.4k | 2d ago | Apache-2.0 | A | 72 | Claude Code |
| openloreaakarim/OpenLore | Skill | 2.0k | 8d ago | Apache-2.0 | A | 42 | Claude Code, Codex |
| mnemonmnemon-dev/mnemon | Skill | 752 | 7d ago | Apache-2.0 | A | 25 | Claude Code, Codex |
| mnemonmnemon-dev/mnemon | Skill | 752 | 7d ago | Apache-2.0 | A | 30 | Claude Code, Codex |