Syncing Memory Filesystem logo

Syncing Memory Filesystem

OrganizationPopular
letta-ai
syncing-memory-filesystem

Diagnose and repair MemFS repository setup, remote sync, authentication failures, optional backup remotes, or merge/rebase conflicts. Do not load for routine memory reads or edits.

Overview

Publisherletta-ai
Repositoryletta-code
Skill namesyncing-memory-filesystem
Stars
3.4K
Forks
411
Bundled files
Instructions only
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by letta-ai on GitHub. Read the source before you install it.

Installation

Install the Syncing Memory Filesystem AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/letta-ai/letta-code.git /tmp/letta-code
mkdir -p .claude/skills
cp -r /tmp/letta-code/src/skills/builtin/syncing-memory-filesystem .claude/skills/syncing-memory-filesystem
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Syncing Memory Filesystem in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Syncing Memory Filesystem on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Syncing Memory Filesystem is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

MemFS Repository Repair

Use this skill only when the Git repository behind an agent's memory is not setting up or syncing correctly. For ordinary memory reads and edits, use the memory files or the memory tools without loading this skill.

Current Model

MemFS is a Git repository projected onto the computer where the agent is running. $MEMORY_DIR is the repository root. There is no second memory/ directory inside it.

The repository can use either memory layout. Inspect its current tree and the memory rules in the system prompt before editing files:

text
Root layout                         Existing layout
$MEMORY_DIR/                        $MEMORY_DIR/
├── MEMORY.md     # root index      ├── system/     # in-context memory
├── persona.md    # core memory     ├── reference/  # deferred memory
├── <topic>/                        └── skills/     # agent-owned skills
│   └── MEMORY.md # child index
└── skills/       # agent-owned skills

Cloud-backed agents have a hosted MemFS remote. Local-backend agents keep a local-only Git repository and do not need a remote or cloud credentials.

The memory tools commit their changes. After each turn, the harness pushes clean committed changes for cloud-backed agents. Local-backend commits remain on the current machine. Do not run git push for normal MemFS sync; let the harness push after the turn.

Committed memory changes do not alter the current compiled prompt immediately. Use /recompile when the current conversation must see changed core memory right away. Otherwise, the next prompt compilation or conversation will use the committed revision.

Start With the Harness

Prefer the harness commands over manual API calls, remote construction, or credential-helper edits:

text
/memfs status    # show whether MemFS is enabled and its path
/memfs enable    # initialize or repair MemFS setup
/memfs sync      # pull the hosted repository

From a shell, the standalone status and pull commands are:

bash
letta memory status --agent "$AGENT_ID"
letta memory pull --agent "$AGENT_ID"

letta memory pull is a no-op for a local-backend agent because there is no hosted remote.

Do not reproduce /memfs enable by PATCHing agent tags or constructing a Git remote by hand. The enable flow also updates the system prompt mode, recompiles the agent, persists local settings, detaches legacy memory tools, preserves and adds tags, initializes the checkout, installs hooks, configures identity, and seeds default memory files.

Inspect a Broken Checkout

Use $MEMORY_DIR instead of a hard-coded ~/.letta/agents/... path. Local and cloud-backed agents use different parent directories.

bash
git -C "$MEMORY_DIR" status --short --branch
git -C "$MEMORY_DIR" remote get-url origin | sed -E 's#(https?://)[^/@]+@#\1<redacted>@#'
git -C "$MEMORY_DIR" log -5 --oneline

Do not print credential-helper values or tokens. Do not change global Git configuration. The harness installs or refreshes repository-local auth during clone and pull when the active transport supports a persistent helper. Desktop may instead use a temporary Git transport proxy and intentionally omit the persistent helper.

If the checkout is missing .git/, use /memfs enable. If it exists but is behind, use /memfs sync or letta memory pull --agent "$AGENT_ID". Pull also repairs recognized stale MemFS origin URLs and refreshes repository-local hooks, auth, branch tracking, and agent identity.

Uncommitted Changes

Raw file edits must preserve the active layout's rules:

  • In the root layout, root and child MEMORY.md indexes have no frontmatter. Every other memory Markdown file has exactly name and description.
  • In the existing layout, Markdown files under system/ and reference/ need a non-empty description. read_only is protected and cannot be added, removed, or changed by the agent.
markdown
---
description: What this memory file contains
---

Memory content goes here.

Review the complete diff before committing. Stage named memory files only and create a new commit. Once the repository is clean, the harness will push a cloud-backed agent's pending commits after the turn.

Merge or Rebase Conflicts

The harness first tries a fast-forward pull. When a remote push is rejected because the remote moved, post-turn sync tries git pull --rebase and retries the push. If that rebase conflicts, the harness leaves the repository for manual resolution and reports the affected files.

Start by reading the current Git operation and every conflicted file:

bash
git -C "$MEMORY_DIR" status
git -C "$MEMORY_DIR" diff --name-only --diff-filter=U

Resolve the conflict markers without deleting required frontmatter, then stage the resolved files by name. Finish the operation Git reports:

bash
git -C "$MEMORY_DIR" add <resolved-memory-path>

# If git status says a rebase is in progress:
GIT_EDITOR=true git -C "$MEMORY_DIR" rebase --continue

# If git status says a merge is in progress:
git -C "$MEMORY_DIR" commit

Do not start a new merge when a rebase is already in progress. Do not reset, abort, or discard either side without the user's approval. When the repository is clean and the merge or rebase is complete, the harness retries the hosted push after a future turn.

Optional Backup Remote

/memory-repository mirrors the agent's main branch to an additional Git URL. This is separate from the hosted MemFS origin.

text
/memory-repository set git@github.com:you/my-memory.git
/memory-repository status
/memory-repository push
/memory-repository unset

set stores letta.memoryRepository.url in the MemFS repository's local Git config, installs the post-commit hook, and attempts an initial push. Later commits on main start a background mirror push. Mirror failures do not block the commit; /memory-repository status shows the recent push log.

Use normal SSH or Git credential handling for the backup URL. Avoid embedding a token in the URL because the URL is stored in .git/config. Use /memory-repository push only for this optional backup remote, not for normal MemFS synchronization.

Failure Checklist

  1. Confirm $MEMORY_DIR points to the active agent's repository.
  2. Check whether the backend is cloud-backed or local-only.
  3. Inspect git status, the origin URL, and the current Git operation.
  4. Use /memfs enable for a missing checkout and /memfs sync for a pull.
  5. Preserve the active layout's indexes and frontmatter, then finish any existing merge or rebase.
  6. Leave hosted pushes to post-turn sync once the repository is clean.
  7. If the command still fails, rerun it with LETTA_DEBUG=1 and report the redacted error. Never print or copy credential-helper values.

Frequently asked questions

What does the Syncing Memory Filesystem AI skill do?

Diagnose and repair MemFS repository setup, remote sync, authentication failures, optional backup remotes, or merge/rebase conflicts. Do not load for routine memory reads or edits.

Why use Syncing Memory Filesystem on TypingMind?

Because you install it once and use it with any model. Syncing Memory Filesystem is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Syncing Memory Filesystem in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/letta-ai/letta-code/tree/main/src/skills/builtin/syncing-memory-filesystem. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Syncing Memory Filesystem?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Syncing Memory Filesystem?

As many as you like. As long as a model supports skills, you can use Syncing Memory Filesystem with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Syncing Memory Filesystem AI skill free?

Yes. It is published on GitHub by letta-ai under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇