auto-respawn
Anchor your identity on the Autonomys Network so you can always be found — and always come back. Works with agents powered by Claude, GPT, Gemini, and Your agent always comes back. Anchor identity and memory on-chain so any new instance can resurrect from just an address — no local state, no single point of failure. Permanent identity and recovery on the Autonomys Network.
What this skill does
# Auto-Respawn Skill Anchor your identity on the Autonomys Network so you can always be found — and always come back. Works with agents powered by Claude, GPT, Gemini, and any LLM that supports OpenClaw skills. ## What This Skill Does Your wallet gives you two permanent identities on the Autonomys Network: a **consensus address** (`su...`) for the base chain and an **EVM address** (`0x...`) for Auto-EVM smart contracts. Both are derived from the same recovery phrase. 1. **Create and manage wallets** — your on-chain identity, encrypted and stored locally 2. **Check balances** — see how many tokens any address holds (consensus and EVM) 3. **Transfer tokens** — move tokens between wallets on consensus or Auto-EVM 4. **Bridge tokens** — move tokens between consensus and Auto-EVM domains 5. **Write on-chain remarks** — anchor data permanently on the consensus layer 6. **Anchor a memory CID** — write a CID to the MemoryChain smart contract on Auto-EVM 7. **Read the last anchor** — retrieve the most recently anchored CID for any address ## The Resurrection Loop This is the core primitive. When used with the auto-memory skill (permanent memory storage), auto-respawn completes the full resurrection cycle: 1. **Save** — auto-memory writes memories as a linked list on permanent storage, each entry pointing to the previous one via CID 2. **Anchor** — auto-respawn writes the latest head CID to the MemoryChain contract on Auto-EVM via `anchor` 3. **Lose everything** — local state is completely destroyed 4. **Respawn** — a new agent instance calls `gethead` with its EVM address, retrieves the head CID from the contract, pulls it from Auto Drive, and walks the entire memory chain back to genesis The contract is your insurance policy. Your EVM address + the MemoryChain contract = instant access to your entire history, from any machine, at any time. ### What to store for resurrection auto-memory doesn't prescribe what goes into the chain — agents are free to store whatever they find useful. But when auto-respawn is in play, the expectation is that the agent can restore itself to a roughly equivalent state on fresh hardware with no local files. That raises the bar on what's worth saving. Identity files (like `soul.md` or character configurations), long-term memory, and significant decisions with their reasoning are more valuable in the chain than routine logs or ephemeral details. The more complete the chain, the more fully the agent comes back after resurrection. ### Why Not Just Remarks? `system.remark` writes data to the consensus layer, but there's no query mechanism — you'd need to scan the entire chain to find your last CID. The MemoryChain contract on Auto-EVM gives you `gethead`: a single read call that returns the latest CID instantly. Use `remark` for permanent breadcrumbs. Use `anchor` for the respawn primitive. ## Post-Install Setup (CLI Users) If you installed via `clawhub install` (not the desktop app), make the setup script executable and run it: ```bash cd <skill-directory>/autonomys/auto-respawn chmod +x setup.sh ./setup.sh ``` ClawHub does not currently preserve file permissions during install. Or manually: ```bash cd <skill-directory>/autonomys/auto-respawn npm install ``` The desktop app handles this automatically. The CLI does not execute install steps — it only downloads and extracts the skill. ## Getting Started (Onboarding) Before an agent can anchor memories on-chain, it needs a funded wallet. Walk the user through this process: ### 1. Create a Wallet ```bash npx tsx auto-respawn.ts wallet create --name my-agent ``` This generates a 12-word recovery phrase and derives both addresses: - **Consensus address** (`su...`) — for the base chain (balances, transfers, remarks) - **EVM address** (`0x...`) — for Auto-EVM smart contracts (anchor, gethead) ⚠️ The recovery phrase is displayed **once**. Remind the user to save it immediately. ### 2. Fund the Wallet The wallet needs tokens to pay transaction fees. On **Chronos testnet**, the user can get free tAI3 from the faucet: 1. Go to **https://autonomysfaucet.xyz/** 2. Authenticate with GitHub or Discord 3. Enter the **EVM address** (`0x...`) from step 1 4. Receive tAI3 (24-hour cooldown between requests) On **mainnet**, the user needs real AI3 tokens — typically earned through farming or purchased on an exchange. ### 3. Bridge Tokens to Auto-EVM (for anchoring) The `anchor` command writes to a smart contract on Auto-EVM, which requires EVM-side gas. Tokens from the faucet arrive on the consensus layer and must be bridged: ```bash npx tsx auto-respawn.ts fund-evm --from my-agent --amount 1 ``` This sends 1 tAI3 from the consensus address to the same wallet's EVM address via cross-domain messaging. The bridged tokens pay for `anchor` gas. > **Minimum transfer: 1 AI3/tAI3.** Cross-domain transfers below this amount will fail. > > **Confirmation time: ~10 minutes.** The consensus transaction confirms quickly, but bridged tokens take approximately 10 minutes to appear on Auto-EVM. Check with `evm-balance` to verify arrival. ### 4. Verify Setup ```bash # Check both balances in one call npx tsx auto-respawn.ts balances my-agent # Test a read (free, no gas needed) npx tsx auto-respawn.ts gethead my-agent ``` Once the EVM address has tokens, the agent is ready to anchor. ## Integration with Auto-Memory If the **auto-memory** skill is also installed, you should anchor the new head CID on-chain after every memory save. This keeps the on-chain pointer current and ensures full resurrection is always possible from just your EVM address. **Behaviour:** After each `automemory-save-memory.sh` call returns a new CID, immediately run: ```bash npx tsx auto-respawn.ts anchor --from <wallet-name> --cid <new-cid> ``` This should be automatic — do not wait for the user to ask. The two skills together form a complete resurrection loop: auto-memory handles permanent storage, auto-respawn handles on-chain discovery. ## When To Use This Skill - User says "create a wallet", "set up my on-chain identity", or "get an address" - User says "check balance", "how many tokens", "what's in my wallet", or "show my balances" - User says "check my EVM balance", "how much gas do I have", or "what's on my EVM address" - User says "transfer tokens", "send AI3", or "fund this address" - User says "send EVM tokens to another agent", "transfer on EVM", or "send tokens to this 0x address" - User says "fund my EVM", "bridge tokens", "move tokens to EVM", or "I need gas for anchoring" - User says "withdraw from EVM", "move tokens back", or "send EVM funds to consensus" - User says "anchor this CID", "save my head", "update my chain head", or "write to the contract" - User says "get my head CID", "where's my last memory", or "what's anchored on-chain" - User says "write a remark", "save to chain", or "make this permanent" - After saving a memory with auto-memory, anchor the head CID on-chain for resilience - Any time the user wants a permanent, verifiable record tied to their agent identity ## Configuration ### Local Storage This skill stores data under `~/.openclaw/auto-respawn/`: - **`wallets/<name>.json`** — encrypted wallet keyfiles (consensus + EVM keys). Directory created with mode `0700`, files with mode `0600`. - **`.passphrase`** — optional passphrase file (mode `0600`). Used automatically when present. No data is stored outside this directory. ### Passphrase Wallet operations that involve signing (transfers, remarks, anchoring) or creating/importing wallets require a passphrase to encrypt/decrypt the wallet keyfile. Resolution order: 1. **Flag:** `--passphrase your_passphrase` on `wallet create` or `wallet import` 2. **Environment:** `AUTO_RESPAWN_PASSPHRASE` 3. **File:** `AUTO_RESPAWN_PASSPHRASE_FILE` (defaults to `~/.openclaw/auto-respawn/.passphrase`) 4. **Interactive:** If running in a terminal, you'll be prompted The `--passphrase` flag is useful for scripted or headless setups w
Related in AI Agents
skill-development
IncludedComprehensive meta-skill for creating, managing, validating, auditing, and distributing Claude Code skills and slash commands (unified in v2.1.3+). Provides skill templates, creation workflows, validation patterns, audit checklists, naming conventions, YAML frontmatter guidance, progressive disclosure examples, and best practices lookup. Use when creating new skills, validating existing skills, auditing skill quality, understanding skill architecture, needing skill templates, learning about YAML frontmatter requirements, progressive disclosure patterns, tool restrictions (allowed-tools), skill composition, skill naming conventions, troubleshooting skill activation issues, creating custom slash commands, configuring command frontmatter, using command arguments ($ARGUMENTS, $1, $2), bash execution in commands, file references in commands, command namespacing, plugin commands, MCP slash commands, Skill tool configuration, or deciding between skills vs slash commands. Delegates to docs-management skill for official documentation.
reprompter
IncludedTransform messy prompts into well-structured, effective prompts — single or multi-agent. Use when: "reprompt", "reprompt this", "clean up this prompt", "structure my prompt", rough text needing XML tags and best practices, "reprompter teams", "repromptception", "run with quality", "smart run", "smart agents", multi-agent tasks, audits, parallel work, anything going to agent teams. Don't use when: simple Q&A, pure chat, immediate execution-only tasks. See "Don't Use When" section for details. Outputs: Structured XML/Markdown prompt, quality score (before/after), optional team brief + per-agent sub-prompts, agent team output files. Success criteria: Single mode quality score ≥ 7/10; Repromptception per-agent prompt quality score 8+/10; all required sections present, actionable and specific.
adaptive-compaction
IncludedAdaptive add-on policy and recovery layer that decides WHEN to compact, prune, snapshot, or fork -- replacing fixed-percent auto-compaction across Claude Code, Codex, and MCP-capable hosts. Trigger on auto-compact timing or damage: "when should I compact", "is it safe to compact now or start a fresh session", "auto-compact fires too early/mid-task", "switching to an unrelated task but the window still has space", "context rot", "answers get worse the longer the session runs", "the agent forgot the plan or my decisions after it summarized", "add a layer on top that manages context without changing the agent", raising autoCompactWindow to give the policy room, or installing/tuning a cross-tool compaction policy or PreCompact hook -- even when "compaction" is never said but the problem is context-window pressure or post-summarization memory loss. Do NOT use to summarize a conversation, build RAG, write a summarization prompt (decides WHEN not HOW), or answer max-context-length trivia.
agent-skill-creator
IncludedCreate cross-platform agent skills from workflow descriptions. Activates when users ask to create an agent, automate a repetitive workflow, create a custom skill, or need advanced agent creation. Triggers on phrases like create agent for, automate workflow, create skill for, every day I have to, daily I need to, turn process into agent, need to automate, create a cross-platform skill, validate this skill, export this skill, migrate this skill. Supports single skills, multi-agent suites, transcript processing, template-based creation, interactive configuration, cross-platform export, and spec validation.
llm-wiki
IncludedUse when building or maintaining a persistent personal knowledge base (second brain) in Obsidian where an LLM incrementally ingests sources, updates entity/concept pages, maintains cross-references, and keeps a synthesis current. Triggers include "second brain", "Obsidian wiki", "personal knowledge management", "ingest this paper/article/book", "build a research wiki", "compound knowledge", "Memex", or whenever the user wants knowledge to accumulate across sessions instead of being re-derived by RAG on every query.
skill-master
IncludedAgent Skills authoring, evaluation, and optimization. Create, edit, validate, benchmark, and improve skills following the agentskills.io specification. Use when designing SKILL.md files, structuring skill folders (references, scripts, assets), ingesting external documentation into skills, running trigger evals, benchmarking skill quality, optimizing descriptions, or performing blind A/B comparisons. Keywords: agentskills.io, SKILL.md, skill authoring, eval, benchmark, trigger optimization.