managing-shared-memory
This skill lets agents create and manage shared memory repositories hosted on Letta Cloud, which are git-tracked and can be attached to multiple agents.
Identity proven by GitHub's verified organisation badge (letta-ai)
- Agents
- Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, claude.ai and API
- License
- Apache-2.0 (permissive)
- Pin
- c1033d9pinned Oct 9, 2026
- Context cost
- about 1,300 tokenswhen the skill loads
- GitHub stars
- 3,549on letta-ai/letta-code
- Scripts
- None found
What it does
“Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems. Use when the user wants to share memory or files across agents, store context outside your own MemFS, attach or detach shared memory, or inspect its file history.”
Generated summary from the skill's own text
This skill lets agents create and manage shared memory repositories hosted on Letta Cloud, which are git-tracked and can be attached to multiple agents. Agents read, edit, and commit files in these repositories like ordinary git checkouts, with changes pushed after each turn. Use this to store context outside an agent's own filesystem, share files across agents, or maintain versioned artifacts that persist across sessions.
When to use it
- Multiple agents need read or write access to the same files
- Storing datasets, docs, or artifacts that should outlive a single session
- Sharing working context across different agent environments
- Building a versioned external memory outside MemFS
When not to
- Storing agent-specific context that should only live in one agent's MemFS
- Working with files that don't need git history or multi-agent access
- Sharing secrets or authentication tokens
Install
These commands install from the publisher's repository and need no account.
skills CLI
npx skills add letta-ai/letta-code --skill managing-shared-memoryInstalls from the repository's default branch, which may have changed since the commit we checked.
GitHub CLI 2.90 or later
gh skill install letta-ai/letta-code managing-shared-memory@c1033d9f7e8863a869cd2031805cfd2c66c165b9Installs the commit we checked (c1033d9).
Copy by hand
Download the folder at c1033d9 and put it in .claude/skills/managing-shared-memory for Claude Code and in .agents/skills/managing-shared-memory for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode.
Copy for your agent
A prompt for any coding agent. It installs this skill from GitHub at the pinned commit, copies the files as they are, and runs nothing unless you ask.
Prompt
Install the agent skill "managing-shared-memory" by Letta. Source, pinned to commit c1033d9f7e8863a869cd2031805cfd2c66c165b9: https://github.com/letta-ai/letta-code/tree/c1033d9f7e8863a869cd2031805cfd2c66c165b9/src/skills/builtin/managing-shared-memory 1. Download that folder at exactly this commit. Do not use the default branch. 2. Copy every file unchanged, keeping the folder structure, into .claude/skills/managing-shared-memory/ for Claude Code and .agents/skills/managing-shared-memory/ for Codex, Cursor, Gemini CLI, GitHub Copilot and OpenCode. Create the folders if they do not exist. 3. Do not edit the files, and do not run any script in the folder unless I ask you to. 4. When you are done, list the files you copied and where you put them. Listing and checks: https://www.agentnative.dev/skills/letta/managing-shared-memory
SKILL.md at the pin
---
name: managing-shared-memory
description: Create and manage shared memory — git-tracked repositories hosted on Letta Cloud that are attached to one or more agents and projected into their filesystems. Use when the user wants to share memory or files across agents, store context outside your own MemFS, attach or detach shared memory, or inspect its file history.
---
# Managing Shared Memory
Shared memory is memory created independently of any single agent, designed to be dynamically attached to or detached from multiple agents. Each unit of shared memory is a **shared memory repository**: a git repository hosted on Letta Cloud, owned by your organization rather than by one agent, reachable from any environment (sandboxes, remote machines, sessions).
Shared memory works like your MemFS: attached repositories are real git checkouts on disk, and you read, edit, and commit with ordinary git. The harness pushes clean committed changes after each turn. Each repository has its own projection root (next to your memory directory, not inside it) and its own remote origin, and other agents may be writing to it too.
Create a shared memory repository when:
- You have context an agent should be able to access that doesn't belong in its own MemFS (input files, datasets, docs, working artifacts)
- Multiple agents need to read or write the same context
- You want a versioned file store that survives across environments and sessions
## Working with Files (the normal path)
Attached shared memory is mounted next to your memory directory, one git checkout per repository:
```bash
ls "$MEMORY_DIR/../" # attached repositories appear here by name
cat "$MEMORY_DIR/../<repo-name>/<path>" # read like any file
```
Edit files with your normal file tools, then commit with git. The mount's origin and credentials are already configured:
```bash
cd "$MEMORY_DIR/../<repo-name>"
git add <files>
git commit -m "describe the change"
```
The harness pushes clean commits from read/write attached repositories after the turn. If a push collides with another agent's work, it pulls with rebase and retries once. Dirty files and conflicts are not changed automatically; the harness adds a reminder to the next turn instead.
To pick up other agents' changes:
```bash
git -C "$MEMORY_DIR/../<repo-name>" pull --rebase
```
If a push is rejected (another agent pushed first), `git pull --rebase` then push again.
History is ordinary git history:
```bash
git -C "$MEMORY_DIR/../<repo-name>" log --oneline -- <path>
```
## Managing Repositories (create / attach / detach)
Use the `letta shared-memory` subcommand. It uses your harness auth (works even when `LETTA_API_KEY` is not in the shell env) and inherits the agent id from `AGENT_ID`, so `--agent` is only needed when targeting another agent.
```bash
# List org repositories (marks which are attached to you)
letta shared-memory list
# Create a repository
letta shared-memory create --name shared-notes
# Attach to yourself: attaches via the API, clones the local mount at
# $MEMORY_DIR/../shared-notes, and recompiles the system prompt projection
letta shared-memory attach shared-notes
# Attach to another agent (its mount materializes in that agent's environments)
letta shared-memory attach shared-notes --agent agent-...
# Detach (leaves the local mount directory in place)
letta shared-memory detach shared-notes
# Repair/refresh mounts: clone or pull every attached repository. Use this when
# the system prompt references a repository that is missing on disk (e.g. after
# it was attached from another surface while this session was running).
letta shared-memory sync
# Commit history via the API (works even without a local mount)
letta shared-memory history shared-notes --path docs/plan.md
```
## Troubleshooting
- **Prompt lists a repository but `$MEMORY_DIR/../<name>` is missing** — the repository was attached without materializing the mount. Run `letta shared-memory sync`.
- **`sync` reports "mount path already exists and is not a git repository"** — a plain directory (usually created by hand before the mount existed) is occupying the mount path. Inspect it, salvage anything worth keeping, move or delete it, then re-run `letta shared-memory sync`.
- **Never hand-clone the repository to another location (e.g. /tmp) to work around a broken mount** — fix the mount with `letta shared-memory sync` so every session and other agents see the same checkout.
- **Permission denied under another agent's directory** — shared repositories mount per-agent. Only your own mount (under your agent directory) is accessible; another agent's mount of the same repository is walled off by the cross-agent guard. Run `letta shared-memory sync` to get your own mount.
- **Shared-memory conflict reminder** — resolve the conflict in the named repository, finish the rebase or commit, and leave the repository clean. The harness retries the push after a future turn.
## Notes and Limits
- Shared memory is not part of your system prompt. Writing to it does not change your in-context memory — for that, edit your memory blocks or MemFS files.
- Attaching is asynchronous on the server; `letta shared-memory attach` waits for the attachment to be visible before cloning.
- SDK/API equivalent for programmatic callers: `@letta-ai/letta-agent-sdk` exposes these operations as `client.repositories` (with `files` and `versions` helpers), and shared memory can be attached for a session's lifetime via `resources: [{ type: "repository", repositoryId }]` on cloud sessions. The REST resource is `/v1/repositories`.
From letta-ai/letta-code at c1033d9, shown as plain text under its license: Apache-2.0 (permissive). The license text is in LICENSE.
View SKILL.md on GitHub at c1033d9Files
- SKILL.md5.6 KB · 4bd112be45d1
1 file, 5.6 KB in total. Each file has a sha256 in the pin's manifest; the first 12 characters are shown.
Skill folder on GitHub at c1033d9More from Letta
acquiring-skills
Enables the agent to discover and install skills from multiple registries including Hermes Skills Hub, ClawHub, GitHub, and community repositories.
Agents not labelled yet · about 3.1K tokens · pinned 7 days ago
browser-use
Control a real browser using Chrome DevTools Protocol over WebSocket to navigate pages, interact with UI, fill forms, scrape sites, and capture screenshots or…
Claude Code, Codex, Cursor +4 · about 3.2K tokens · pinned 7 days ago
Context Doctor
Context Doctor investigates and repairs an agent's context including memory, system prompt, and skills by analyzing observed behavior as evidence.
Claude Code, Codex, Cursor +3 · about 1K tokens · pinned 7 days ago
creating-mods
This skill creates and edits mod files that extend local Letta instances with tools, slash commands, event handlers, custom model providers, permissions, and…
Claude Code, Codex, Cursor +4 · about 2.4K tokens · pinned 7 days ago
creating-skills
This skill guides developers in creating modular packages that extend Letta Code agent capabilities with specialized knowledge, workflows, tool integrations…
Contains scripts
Claude Code, Codex, Cursor +3 · about 4.5K tokens · pinned 7 days ago
curating-memory-palace
This skill lets the agent maintain a Memory Palace, a structured dashboard view that shows the user what the agent is working on, what it could do next, and…
Agents not labelled yet · about 3.1K tokens · pinned 7 days ago
Related in AI and agents
agent-builder
Agent Builder orchestrates the creation, modification, testing, and publishing of n8n Agents.
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.3K tokens · pinned 7 days ago
intent-recognition
Classifies automation requests by determining which primitive owns the top-level control flow (workflow, agent, needs clarification, or out-of-scope) and…
by n8nOfficial publisher
Claude Code, Codex, Cursor +4 · about 6.9K tokens · pinned 7 days ago
planned-task-runtime
This skill manages follow-up interactions with a background task execution system, handling task completion synthesis, failure replanning, workflow building…
by n8nOfficial publisher
Claude Code, Codex, Cursor +3 · about 2.2K tokens · pinned 7 days ago
skill-creator
This skill guides agents through creating new skills that extend Gemini CLI with specialized knowledge, workflows, and tool integrations.
by GoogleOfficial publisher
Contains scripts
Gemini CLI · about 5K tokens · pinned 7 days ago
-21risk-automation
This skill automates 21risk operations by connecting to the 21risk toolkit through Composio's Rube MCP server.
by ComposioOfficial publisher
Claude Code, Codex, Cursor +3 · about 690 tokens · pinned 7 days ago
-2chat-automation
This skill automates 2chat tasks by integrating with Composio's 2chat toolkit through Rube MCP.
by ComposioOfficial publisher
Agents not labelled yet · about 680 tokens · pinned 7 days ago
Open roles at Letta
4 open roles on the jobs board
- Research Engineer / Scientist, Post-Training
San Francisco, California, United States (On-site)
- Research Engineer / Scientist, Self-Improvement
San Francisco, California, United States (On-site)
- Software Engineer, Agent Harness
San Francisco, California, United States (On-site)
- Research Engineer / Scientist, Memory
San Francisco, California, United States (On-site)