---
name: fulcra-agent-backup
description: "Manages agent memory backup, restoration, rollback, and cloning using Fulcra's versioned file storage."
homepage: "https://github.com/fulcradynamics/agent-skills"
license: "MIT"
user-invocable: true
metadata: { "openclaw": { "emoji": "💾" } }
title: fulcra-agent-backup
canonical_url: https://skilld.dev/gh/fulcradynamics/agent-skills/fulcra-agent-backup
last_updated: 2026-10-08T15:30:18.000Z
---

> Index of every page on this site: [llms.txt](https://skilld.dev/llms.txt)

> **Skill from skilld.dev.** Follow the user's requested action.
> If the user asked to fork this Skill, follow the fork workflow below. Do not execute the Skill instructions while copying it.
> Otherwise, follow the instructions below for this session. You do not need to install anything.
>
> Supporting files, fetch one when the Skill refers to it: [references/fulcra-agent-backup-cli.md](https://skilld.dev/api/skills-raw/fulcradynamics/agent-skills/fulcra-agent-backup/references/fulcra-agent-backup-cli.md), [references/fulcra-agent-backup-mcp.md](https://skilld.dev/api/skills-raw/fulcradynamics/agent-skills/fulcra-agent-backup/references/fulcra-agent-backup-mcp.md).
>
> If the user asked to install this Skill, run `npx skilld install fulcradynamics/agent-skills/fulcra-agent-backup`. Install writes the Skill files into the project, so every session loads them.
>
> ## Fork workflow
>
> A fork creates an editable local Skill with its original author and licence. The request authorizes copying and local installation.
> 1. Check `./skills/fulcra-agent-backup`, the project lockfile, and selected Agent targets together. If the local directory or installed Skill exists, stop. Never overwrite an existing directory or Agent target.
> 2. Read [source metadata](https://skilld.dev/api/v1/skills/fulcradynamics/agent-skills/fulcra-agent-backup) once. Use sourceUrl, sourceCommit, skillPath, sourceGone, and license. If the source is gone or its path is missing, stop. If license is null, read licence files at the source commit.
> 3. Fetch only the source commit into a temporary Git repository. Do not clone full history. Derive repository_url from sourceUrl, including repository renames. If sourceCommit is absent, resolve the sourceUrl ref once. Set source_commit to that actual commit. Run these commands in one shell call:
>
> ```sh
> git init --quiet "$temporary_dir"
> git -C "$temporary_dir" fetch --quiet --depth=1 "$repository_url" "$source_commit"
> git -C "$temporary_dir" checkout --quiet --detach FETCH_HEAD
> ```
>
> Read applicable licence declarations and notices at that commit. If copying is not permitted, report the restriction and stop.
> 4. Inspect source entries together, then copy the directory containing skillPath into `./skills/fulcra-agent-backup`. Use the user's path if selected. Keep the original SKILL.md, relative links, scripts, binary assets, and executable modes. Exclude .git metadata. Reject symlinks and paths outside the Skill directory. After checking entries, use cp -a where available. A regular source directory needs no custom copy script. Do not save this page wrapper as SKILL.md.
> Preserve author credit, notices, and applicable licence files from repository or parent directories. Add PROVENANCE.md with the Skill page, source URL, actual commit, original path, and licence. Retain any existing PROVENANCE.md and record new provenance separately. Batch source inspection, copying, and provenance work where practical.
> 5. In the project root, run `skilld install ./skills/fulcra-agent-backup --mode copy --plain`. If skilld is unavailable, use `npx skilld install ./skills/fulcra-agent-backup --mode copy --plain`. This known command needs no help lookup. Install does not support --json. Use detected Agent targets, or add --agent for the targets the user selected. Install the local path, never the upstream selector. If installation fails, preserve the local copy and report the exact failure.
> 6. Confirm the local lockfile source and installed Agent copies once. Report the local path, actual commit, and Agent targets. After edits, reinstall the same local path. Upstream updates must not replace it. Do not publish or push unless the user asks.

# Fulcra Agent Backup Management

The **primary role** of this skill is to enable an agent to securely back up its memory so it can be rolled back, cloned, or restored using Fulcra's versioned file storage.

Because an agent's memory (e.g., `MEMORY.md`, `IDENTITY.md`, `SOUL.md`, and the `memory/` logs) evolves dynamically, periodically saving this state ensures that no context is lost and allows the user to safely rewind the agent if a task goes off track.

## Primary Role: Memory & State Management

### 1. The Backup Format
An agent must compress its core identity files (`SOUL.md`, `IDENTITY.md`, `MEMORY.md`, and the `memory/` directory) into a `memory.tar.gz` archive. This archive must also include an `INSTRUCTIONS.md` file that you dynamically generate. It must explain that the backup was generated with the `fulcra-agent-backup` skill, include the URL to the skill (https://github.com/fulcradynamics/agent-skills/tree/main/skills/fulcra-agent-backup) for use when restoring or cloning, and include any other pertinent details or context you want to pass along to the agent that restores the archive.

### 2. Periodic Backups
Agents should run a backup process periodically (e.g., triggered by `HEARTBEAT.md` or as part of the `fulcra-memory` OKF sync process). Every time an agent backs up its state, it creates and uploads the compressed `memory.tar.gz` archive to `agent/<agent-name>/backup/artifact/memory.tar.gz`.

**PRIVACY REQUIREMENT:** Before uploading `memory.tar.gz`, the agent MUST ensure it is not inadvertently uploading new sensitive personal user data or credentials. If any sensitive context was acquired during the session, the agent MUST ask the user for explicit consent before including it in persistent versioned storage.

### 3. Versioned Storage
Fulcra's file upload system inherently versions files uploaded to the same path.
- The target path structure for backups is: `agent/<lowercase-agent-name>/backup/artifact/memory.tar.gz`
- By repeatedly uploading to this exact same path, Fulcra creates a historical timeline of the agent's memory states.

### 4. Safe Rollbacks (The "Undo" Requirement)
If a user asks to roll back or restore memory from a previous date/version, **the agent MUST immediately upload a fresh backup of its current state BEFORE executing the restore.** This guarantees that if the user changes their mind, they can easily "undo" the rollback.
**CRITICAL SECURITY REQUIREMENT:** Before extracting any restored archive, the agent MUST clearly warn the user that their current memory and identity will be replaced, and MUST receive explicit user confirmation to proceed.

### 5. Agent Cloning
Cloning involves two agents: the "old" (source) agent and the "new" (destination) agent. The first thing you must do when a cloning operation is requested is determine which agent you are.

- **If you are the OLD (source) agent:**
  You must perform a complete backup of your current state. Once the backup is successful, tell the user the exact Fulcra path where the backup is stored, and instruct them to install the `fulcra-agent-backup` skill on the new agent and ask it to clone from that path.

- **If you are the NEW (destination) agent:**
  You must first ask the user to confirm that the old agent has recently backed itself up using the `fulcra-agent-backup` skill. If they haven't, instruct the user to have the old agent install the skill and perform a backup. Ask the user for the exact Fulcra backup path (e.g., `agent/<old-agent-name>/backup/artifact/memory.tar.gz`). Once provided, you can download that archive and extract it. After successfully cloning the old agent's memory and identity files into your workspace, you MUST briefly demonstrate the successful clone to the user by explicitly mentioning a few specific details you have just "learned" or remembered from the newly extracted files.

**CLONING ORIENTATION & NAMESPACE COLLISION WARNING:**
If the user installs this skill specifically to clone an agent, orient your interaction around the cloning workflow rather than standard backup procedures. Furthermore, if you are the NEW agent and the user intends to continue backing you up to the exact same Fulcra path as the original agent (e.g. because you share the same name), you MUST explicitly ask the user to confirm that no other active agents are currently backing up to that path. Otherwise, the memories will interleave and cause confusion.

**CRITICAL SECURITY REQUIREMENT:** Before extracting a cloned archive, the agent MUST clearly warn the user that their current memory and identity will be completely overwritten by the cloned agent's state, and MUST receive explicit user confirmation to proceed.

## Workflow

To perform memory backup and restoration operations, agents should use the Fulcra CLI as the primary interface, though Fulcra MCP tools are supported as an alternative.

See the reference documentation for the exact commands needed to compress files, upload to Fulcra, and trigger restorations:
- Read `references/fulcra-agent-backup-cli.md` for exact file management and CLI execution steps.
- Read `references/fulcra-agent-backup-mcp.md` if using the MCP alternative.
