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

# Migrate from Mem0

> Switch from Mem0 to MemoClaw in under 10 minutes.

MemoClaw and Mem0 both provide memory for AI agents, but MemoClaw uses **wallet-based identity** — no API keys, no accounts.

## Key Differences

| Feature        | Mem0               | MemoClaw                                                  |
| -------------- | ------------------ | --------------------------------------------------------- |
| Authentication | API key            | Wallet signature / x402 payment                           |
| Pricing        | Subscription tiers | Pay-per-request (variable per endpoint)                   |
| Free tier      | Limited            | 100 free calls per wallet                                 |
| Memory types   | Generic            | Typed (correction, preference, decision, etc.)            |
| Decay model    | None               | Per-type exponential decay with pinning                   |
| Relations      | No                 | Yes (related\_to, contradicts, supersedes, etc.)          |
| Scoring        | Vector similarity  | 4-signal hybrid (vector + keyword + recency + importance) |

## Concept Mapping

| Mem0                       | MemoClaw                           |
| -------------------------- | ---------------------------------- |
| `m.add(messages, user_id)` | `client.ingest(messages=messages)` |
| `m.search(query, user_id)` | `client.recall(query)`             |
| `m.get_all(user_id)`       | `client.list()`                    |
| `m.delete(memory_id)`      | `client.delete(memory_id)`         |
| `user_id`                  | Wallet address (automatic)         |
| `app_id`                   | `namespace`                        |

## Migration Steps

<Steps>
  <Step title="Install MemoClaw">
    <CodeGroup>
      ```bash Python theme={null}
      pip install memoclaw
      ```

      ```bash TypeScript theme={null}
      npm install memoclaw
      # or pnpm add memoclaw
      ```
    </CodeGroup>
  </Step>

  <Step title="Set up wallet">
    ```bash theme={null}
    python -c "from eth_account import Account; a = Account.create(); print(f'MEMOCLAW_PRIVATE_KEY={a.key.hex()}')"
    export MEMOCLAW_PRIVATE_KEY=0x...
    ```
  </Step>

  <Step title="Replace the client">
    <CodeGroup>
      ```python Mem0 (before) theme={null}
      from mem0 import Memory
      m = Memory()
      m.add("User prefers dark mode", user_id="alice")
      results = m.search("preferences", user_id="alice")
      ```

      ```python MemoClaw (after) theme={null}
      from memoclaw import MemoClaw
      client = MemoClaw()
      client.store("User prefers dark mode", importance=0.8)
      results = client.recall("preferences")
      ```
    </CodeGroup>
  </Step>

  <Step title="Export and re-import memories">
    ```python theme={null}
    from mem0 import Memory
    from memoclaw import MemoClaw

    m = Memory()
    mc = MemoClaw()

    all_memories = m.get_all(user_id="alice")
    batch = [{"content": mem["memory"], "importance": 0.7} for mem in all_memories]
    mc.store_batch(batch)
    ```
  </Step>
</Steps>

## What You Gain

* **No vendor lock-in** — wallet-based identity
* **Transparent pricing** — from \$0.005 per call (free endpoints available), no surprise bills
* **Smart decay** — memories fade by type, unless pinned
* **Relations** — link memories into knowledge graphs
* **Hybrid search** — vector + keyword + recency scoring
