Skip to main content

Migration from OpenClaw

OpenFang includes a built-in migration engine to import agents, memory, skills, and configurations from OpenClaw.

What Gets Migrated

Agent Manifests

Converts YAML agent configs to TOML format

Memory & Sessions

Imports conversation history and KV store

Skills

Converts SKILL.md to OpenFang skill.toml

Configuration

Maps provider names and channel configs

Migration Process

1

Backup OpenClaw data

# Backup your OpenClaw installation
cp -r ~/.openclaw ~/.openclaw.backup
2

Dry run (preview changes)

openfang migrate --from openclaw --dry-run
Shows what would be migrated without making changes.
3

Run migration

openfang migrate --from openclaw
Output:
Migrating from OpenClaw...
Found OpenClaw installation at: ~/.openclaw

Migrated:
✓ 5 agents
✓ 12 skills
✓ 3 channel configurations
✓ 847 memory entries

Skipped:
- 2 agents (unsupported module type)

Warnings:
- Agent 'coder' uses tool 'deprecated_tool' (not available in OpenFang)

Migration complete. Review ~/.openfang/migration-report.json
4

Review migrated agents

openfang agent list
All migrated agents are in suspended state. Inspect and activate them:
cat ~/.openfang/agents/migrated-agent.toml
openfang agent spawn ~/.openfang/agents/migrated-agent.toml
5

Test thoroughly

Chat with each agent to ensure it works correctly:
openfang agent chat migrated-agent

Migration Details

Agent Manifest Conversion

OpenClaw YAML:
name: my-agent
module: builtin:chat
provider: anthropic
model: claude-3-opus
temperature: 0.7
tools:
  - file_read
  - web_search
OpenFang TOML:
name = "my-agent"
module = "builtin:chat"

[model]
provider = "anthropic"
model = "claude-3-opus-20240229"
temperature = 0.7

[capabilities]
tools = ["file_read", "web_search"]

Tool Name Mapping

OpenClaw tool names are automatically mapped to OpenFang equivalents:
OpenClaw ToolOpenFang Tool
shellshell_exec
read_filefile_read
write_filefile_write
search_webweb_search
fetch_urlweb_fetch
store_memorymemory_store
recall_memorymemory_recall
See crates/openfang-migrate/src/tool_compat.rs for the full mapping (21 tools).

Provider Name Mapping

OpenClaw ProviderOpenFang Provider
claudeanthropic
gptopenai
geminigemini
llamagroq or ollama

Memory Migration

OpenClaw’s memory files are imported into OpenFang’s SQLite database:
  • Structured KVmemory.db table
  • Sessionssessions table
  • Embeddingsembeddings table (if present)

Skill Migration

OpenClaw SKILL.md files are automatically converted: OpenClaw SKILL.md:
---
name: github-expert
version: 1.0.0
author: community
---

# GitHub Expert

You are an expert at GitHub workflows...
OpenFang skill.toml + SKILL.md:
# skill.toml
name = "github-expert"
version = "1.0.0"
author = "community"
runtime = "prompt"
The Markdown content is preserved in SKILL.md.

Custom Migration Path

For advanced scenarios:
# Migrate from specific OpenClaw path
openfang migrate --from openclaw --path /path/to/.openclaw

# Migrate only agents (skip memory/skills)
openfang migrate --from openclaw --agents-only

# Migrate only skills
openfang migrate --from openclaw --skills-only

Post-Migration Steps

1

Update API keys

OpenFang uses different environment variable names:
# OpenClaw
export CLAUDE_API_KEY=...

# OpenFang
export ANTHROPIC_API_KEY=...
See LLM Providers for all variable names.
2

Review capabilities

Migrated agents may have broader capabilities than intended. Review and restrict:
[capabilities]
tools = ["file_read"]  # Was ["file_read", "file_write", "shell_exec"]
3

Update channel configs

Channel adapter names may differ:
# OpenClaw: telegram_bot
# OpenFang: telegram
[channels.telegram]
enabled = true
4

Test all agents

Spawn and test each migrated agent:
for agent in ~/.openfang/agents/*.toml; do
  echo "Testing $agent..."
  openfang agent spawn "$agent"
  openfang agent chat $(basename "$agent" .toml)
done

Compatibility Notes

Supported Features

✅ Agent manifests (YAML → TOML) ✅ Memory KV store ✅ Sessions and conversation history ✅ Skills (SKILL.md format) ✅ Tool name mapping (21 tools) ✅ Provider name mapping ✅ Channel configurations

Unsupported Features

❌ OpenClaw-specific modules (must be ported manually) ❌ Custom WASM modules (rebuild for OpenFang) ❌ Third-party plugins (check FangHub for alternatives)

Known Issues

Some OpenClaw tools don’t have direct OpenFang equivalents. The migration report lists these. You’ll need to:
  1. Remove the deprecated tool from capabilities.tools
  2. Update the system prompt to use available alternatives
If OpenClaw used custom memory structures, they may not import cleanly. Check:
sqlite3 ~/.openfang/data/openfang.db "SELECT * FROM memory LIMIT 10;"
Python skills may reference packages not in OpenFang’s bundled environment. Add them to skill.toml:
[requirements]
python_packages = ["requests", "beautifulsoup4"]

Migration Report

After migration, review the detailed report:
cat ~/.openfang/migration-report.json
{
  "timestamp": "2026-03-07T12:34:56Z",
  "source": "openclaw",
  "source_path": "/home/user/.openclaw",
  "imported": {
    "agents": 5,
    "skills": 12,
    "memory_entries": 847,
    "channels": 3
  },
  "skipped": {
    "agents": [{"name": "custom-wasm", "reason": "unsupported module type"}]
  },
  "warnings": [
    "Agent 'coder' uses deprecated tool 'shell' (mapped to 'shell_exec')"
  ]
}

Getting Help

If you encounter migration issues:
  1. Check the migration documentation
  2. Review the migration report for specific errors
  3. Join the Discord community
  4. Open an issue on GitHub

Next Steps

Configuration

Set up your LLM providers

Agent Setup

Create new agents for OpenFang

Build docs developers (and LLMs) love