---
title: Shared memory | Letta Docs
description: Share Git-backed files between cloud-hosted Letta agents
---

Shared memory gives multiple agents access to the same files and working context. Each shared memory repository is a Git repository hosted in Letta Cloud and owned by your organization.

| Memory                            | Ownership         | Use                                                      |
| --------------------------------- | ----------------- | -------------------------------------------------------- |
| [MemFS](/concepts/memfs/index.md) | One agent         | Store the agent’s identity, skills, and long-term memory |
| Shared memory repository          | Your organization | Share knowledge and working files between agents         |

Use shared memory for team conventions, product knowledge, research, plans, and documents that multiple agents maintain.

## How agents access shared memory

Attach a repository to each agent that needs it. The agent’s system prompt lists the repository path and its top-level files. Letta Code clones the repository beside the agent’s MemFS at:

```
$MEMORY_DIR/../<repository-name>/
```

The agent reads and edits the repository with normal file and Git tools. The agent must commit and push its changes. Other agents can then pull those commits into their own checkouts.

Letta Code clones a repository when it first becomes available. Later synchronization fast-forwards the local checkout from its remote. Use `letta shared-memory sync` to pull attached repositories or create a missing checkout.

## Manage shared memory

You can create and attach shared memory through the web and desktop apps. Applications can manage repositories and attachments with the [Agent SDK](/agent-sdk/repositories/index.md).

Cloud agents can also use the bundled `managing-shared-memory` skill to create, attach, detach, synchronize, and inspect repository history.

Shared memory repositories require cloud-hosted agents. Local agents use their own MemFS and project files.
