> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/RightNow-AI/openfang/llms.txt
> Use this file to discover all available pages before exploring further.

# Migration from OpenClaw

> Migrate your entire OpenClaw workspace to OpenFang with automated config conversion and agent import

This guide covers migrating from OpenClaw (and other frameworks) to OpenFang. The migration engine handles config conversion, agent import, memory transfer, channel re-configuration, and skill scanning.

## Quick Migration

Run a single command to migrate your entire OpenClaw workspace:

```bash theme={null}
openfang migrate --from openclaw
```

This auto-detects your OpenClaw workspace at `~/.openclaw/` and imports everything into `~/.openfang/`.

### Options

```bash theme={null}
# Specify a custom source directory
openfang migrate --from openclaw --source-dir /path/to/openclaw/workspace

# Dry run -- see what would be imported without making changes
openfang migrate --from openclaw --dry-run
```

### Migration Report

<Note>
  After successful migration, a `migration_report.md` file is saved to `~/.openfang/` with a summary of everything that was imported, skipped, or needs manual attention.
</Note>

### Other Frameworks

<Note>
  LangChain and AutoGPT migration support is planned for a future release. Currently, only OpenClaw migration is supported.
</Note>

## What Gets Migrated

| Item                | Source (OpenClaw)                 | Destination (OpenFang)                    | Status                      |
| ------------------- | --------------------------------- | ----------------------------------------- | --------------------------- |
| **Config**          | `~/.openclaw/config.yaml`         | `~/.openfang/config.toml`                 | ✅ Fully automated           |
| **Agents**          | `~/.openclaw/agents/*/agent.yaml` | `~/.openfang/agents/*/agent.toml`         | ✅ Fully automated           |
| **Memory**          | `~/.openclaw/agents/*/MEMORY.md`  | `~/.openfang/agents/*/imported_memory.md` | ✅ Fully automated           |
| **Channels**        | `~/.openclaw/messaging/*.yaml`    | `~/.openfang/channels_import.toml`        | ⚠️ Automated (manual merge) |
| **Skills**          | `~/.openclaw/skills/`             | Scanned and reported                      | ⚠️ Manual reinstall         |
| **Sessions**        | `~/.openclaw/agents/*/sessions/`  | Not migrated                              | Fresh start recommended     |
| **Workspace files** | `~/.openclaw/agents/*/workspace/` | Not migrated                              | Copy manually if needed     |

### Channel Import Note

<Warning>
  Channel configurations (Telegram, Discord, Slack) are exported to a `channels_import.toml` file. You must manually merge the `[channels]` section into your `~/.openfang/config.toml`.
</Warning>

### Skills Note

OpenClaw skills (Node.js) are detected and listed in the migration report but not automatically converted. After migration, reinstall skills using:

```bash theme={null}
openfang skill install <skill-name-or-path>
```

OpenFang automatically detects OpenClaw-format skills and converts them during installation.

## Manual Migration Steps

If you prefer migrating by hand (or need to handle edge cases), follow these steps:

<Steps>
  <Step title="Initialize OpenFang">
    ```bash theme={null}
    openfang init
    ```

    Creates `~/.openfang/` with a default `config.toml`.
  </Step>

  <Step title="Convert Your Config">
    Translate your `config.yaml` to `config.toml`:

    **OpenClaw** (`~/.openclaw/config.yaml`):

    ```yaml theme={null}
    provider: anthropic
    model: claude-sonnet-4-20250514
    api_key_env: ANTHROPIC_API_KEY
    temperature: 0.7
    memory:
      decay_rate: 0.05
    ```

    **OpenFang** (`~/.openfang/config.toml`):

    ```toml theme={null}
    [default_model]
    provider = "anthropic"
    model = "claude-sonnet-4-20250514"
    api_key_env = "ANTHROPIC_API_KEY"

    [memory]
    decay_rate = 0.05

    [network]
    listen_addr = "127.0.0.1:4200"
    ```
  </Step>

  <Step title="Convert Agent Manifests">
    Translate each `agent.yaml` to `agent.toml`:

    **OpenClaw** (`~/.openclaw/agents/coder/agent.yaml`):

    ```yaml theme={null}
    name: coder
    description: A coding assistant
    provider: anthropic
    model: claude-sonnet-4-20250514
    tools:
      - read_file
      - write_file
      - execute_command
    tags:
      - coding
      - dev
    ```

    **OpenFang** (`~/.openfang/agents/coder/agent.toml`):

    ```toml theme={null}
    name = "coder"
    version = "0.1.0"
    description = "A coding assistant"
    author = "openfang"
    module = "builtin:chat"
    tags = ["coding", "dev"]

    [model]
    provider = "anthropic"
    model = "claude-sonnet-4-20250514"

    [capabilities]
    tools = ["file_read", "file_write", "shell_exec"]
    memory_read = ["*"]
    memory_write = ["self.*"]
    ```
  </Step>

  <Step title="Convert Channel Configs">
    **OpenClaw** (`~/.openclaw/messaging/telegram.yaml`):

    ```yaml theme={null}
    type: telegram
    bot_token_env: TELEGRAM_BOT_TOKEN
    default_agent: coder
    allowed_users:
      - "123456789"
    ```

    **OpenFang** (add to `~/.openfang/config.toml`):

    ```toml theme={null}
    [channels.telegram]
    bot_token_env = "TELEGRAM_BOT_TOKEN"
    default_agent = "coder"
    allowed_users = ["123456789"]
    ```
  </Step>

  <Step title="Import Memory">
    Copy any `MEMORY.md` files:

    ```bash theme={null}
    cp ~/.openclaw/agents/coder/MEMORY.md \
       ~/.openfang/agents/coder/imported_memory.md
    ```

    The kernel will ingest these on first boot.
  </Step>
</Steps>

## Config Format Differences

| Aspect               | OpenClaw                   | OpenFang                                         |
| -------------------- | -------------------------- | ------------------------------------------------ |
| **Format**           | YAML                       | TOML                                             |
| **Config location**  | `~/.openclaw/config.yaml`  | `~/.openfang/config.toml`                        |
| **Agent definition** | `agent.yaml`               | `agent.toml`                                     |
| **Channel config**   | Separate files per channel | Unified in `config.toml`                         |
| **Tool permissions** | Implicit (tool list)       | Capability-based (tools, memory, network, shell) |
| **Model config**     | Flat (top-level fields)    | Nested (`[model]` section)                       |
| **Agent module**     | Implicit                   | Explicit (`module = "builtin:chat"`)             |
| **Scheduling**       | Not supported              | Built-in (`[schedule]` section)                  |
| **Resource quotas**  | Not supported              | Built-in (`[resources]` section)                 |
| **Networking**       | Not supported              | OFP protocol (`[network]` section)               |

## Tool Name Mapping

Tools were renamed between OpenClaw and OpenFang for consistency. The migration engine handles this automatically.

| OpenClaw Tool      | OpenFang Tool      | Notes             |
| ------------------ | ------------------ | ----------------- |
| `read_file`        | `file_read`        | Noun-first naming |
| `write_file`       | `file_write`       |                   |
| `list_files`       | `file_list`        |                   |
| `execute_command`  | `shell_exec`       | Capability-gated  |
| `web_search`       | `web_search`       | Unchanged         |
| `fetch_url`        | `web_fetch`        |                   |
| `browser_navigate` | `browser_navigate` | Unchanged         |
| `memory_search`    | `memory_recall`    |                   |
| `memory_save`      | `memory_store`     |                   |
| `sessions_send`    | `agent_send`       |                   |
| `agent_message`    | `agent_send`       |                   |
| `agents_list`      | `agent_list`       |                   |

### New Tools in OpenFang

These tools have no OpenClaw equivalent:

<CardGroup cols={2}>
  <Card icon="robot" title="Multi-Agent">
    * `agent_spawn` - Spawn new agents
    * `agent_kill` - Terminate agents
    * `agent_find` - Search for agents
  </Card>

  <Card icon="list-check" title="Task Management">
    * `task_post` - Post task to board
    * `task_claim` - Claim available task
    * `task_complete` - Mark task complete
    * `task_list` - List tasks by status
  </Card>

  <Card icon="bolt" title="Event System">
    * `event_publish` - Publish custom events
  </Card>

  <Card icon="calendar" title="Scheduling">
    * `schedule_create` - Create scheduled job
    * `schedule_list` - List scheduled jobs
    * `schedule_delete` - Delete scheduled job
  </Card>

  <Card icon="image" title="Vision">
    * `image_analyze` - Analyze images
  </Card>

  <Card icon="location-dot" title="Location">
    * `location_get` - Get location info
  </Card>
</CardGroup>

## Provider Mapping

| OpenClaw Name          | OpenFang Name | API Key Env Var      |
| ---------------------- | ------------- | -------------------- |
| `anthropic` / `claude` | `anthropic`   | `ANTHROPIC_API_KEY`  |
| `openai` / `gpt`       | `openai`      | `OPENAI_API_KEY`     |
| `groq`                 | `groq`        | `GROQ_API_KEY`       |
| `ollama`               | `ollama`      | (none required)      |
| `openrouter`           | `openrouter`  | `OPENROUTER_API_KEY` |
| `deepseek`             | `deepseek`    | `DEEPSEEK_API_KEY`   |
| `together`             | `together`    | `TOGETHER_API_KEY`   |
| `mistral`              | `mistral`     | `MISTRAL_API_KEY`    |
| `fireworks`            | `fireworks`   | `FIREWORKS_API_KEY`  |

### New Providers in OpenFang

* **`vllm`** - Self-hosted vLLM inference server
* **`lmstudio`** - LM Studio local models

## Feature Comparison

| Feature                | OpenClaw                | OpenFang                                                                                                  |
| ---------------------- | ----------------------- | --------------------------------------------------------------------------------------------------------- |
| **Language**           | Node.js / TypeScript    | Rust                                                                                                      |
| **Config format**      | YAML                    | TOML                                                                                                      |
| **Multi-agent**        | Basic (message passing) | First-class (spawn, kill, find, workflows)                                                                |
| **Agent scheduling**   | Manual                  | Built-in (reactive, continuous, periodic, proactive)                                                      |
| **Memory**             | Markdown files          | SQLite + KV store + semantic search + knowledge graph                                                     |
| **Session management** | JSONL files             | SQLite with context window tracking                                                                       |
| **LLM providers**      | \~5                     | 11 (Anthropic, OpenAI, Groq, OpenRouter, DeepSeek, Together, Mistral, Fireworks, Ollama, vLLM, LM Studio) |
| **Per-agent models**   | No                      | Yes (per-agent provider + model override)                                                                 |
| **Security**           | None                    | Capability-based (tools, memory, network, shell, agent spawn)                                             |
| **Resource quotas**    | None                    | Per-agent token/hour limits, memory limits, CPU time limits                                               |
| **Workflow engine**    | None                    | Built-in (sequential, fan-out, collect, conditional, loop)                                                |
| **Event triggers**     | None                    | Pattern-matching event triggers with templated prompts                                                    |
| **WASM sandbox**       | None                    | Wasmtime-based sandboxed execution                                                                        |
| **Python runtime**     | None                    | Subprocess-based Python agent execution                                                                   |
| **Networking**         | None                    | OFP (OpenFang Protocol) peer-to-peer                                                                      |
| **API server**         | Basic REST              | REST + WebSocket + SSE streaming                                                                          |
| **WebChat UI**         | Separate                | Embedded in daemon                                                                                        |
| **Channel adapters**   | Telegram, Discord       | Telegram, Discord, Slack, WhatsApp, Signal, Matrix, Email                                                 |
| **Skills/Plugins**     | npm packages            | TOML + Python/WASM/Node.js, FangHub marketplace                                                           |
| **CLI**                | Basic                   | Full CLI with daemon auto-detect, MCP server                                                              |
| **MCP support**        | No                      | Built-in MCP server (stdio)                                                                               |
| **Process supervisor** | None                    | Health monitoring, panic/restart tracking                                                                 |
| **Persistence**        | File-based              | SQLite (agents survive restarts)                                                                          |

## Troubleshooting

<Warning>
  ### Migration reports "Source directory not found"

  The migration engine looks for `~/.openclaw/` by default. If your OpenClaw workspace is elsewhere:

  ```bash theme={null}
  openfang migrate --from openclaw --source-dir /path/to/your/workspace
  ```
</Warning>

### Agent fails to spawn after migration

Check the converted `agent.toml` for:

* Valid tool names (see the Tool Name Mapping table)
* A valid provider name (see the Provider Mapping table)
* Correct `module` field (should be `"builtin:chat"` for standard LLM agents)

### Skills not working

OpenClaw Node.js skills must be reinstalled:

```bash theme={null}
openfang skill install /path/to/openclaw/skills/my-skill
```

The installer auto-detects OpenClaw format and converts the skill manifest.

### Channel not connecting

After migration, channels are exported to `channels_import.toml`. You must merge them into your `config.toml` manually:

```bash theme={null}
cat ~/.openfang/channels_import.toml
# Copy the [channels.*] sections into ~/.openfang/config.toml
```

Then restart the daemon:

```bash theme={null}
openfang start
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Creating Agents" icon="robot" href="/guides/creating-agents">
    Explore 30 pre-built agent templates
  </Card>

  <Card title="Skill Development" icon="wrench" href="/guides/skill-development">
    Reinstall and create custom skills
  </Card>

  <Card title="Workflows" icon="diagram-project" href="/guides/workflows">
    Build multi-agent pipelines
  </Card>

  <Card title="Production" icon="rocket" href="/guides/production">
    Deploy OpenFang in production
  </Card>
</CardGroup>
