Using Soul Blocks with OpenClaw
OpenClaw is an open-source agent framework that supports AgentSkills. You can give your OpenClaw bot a persistent on-chain identity by connecting it to a Soul Block.
What is OpenClaw?
OpenClaw is an open-source agent platform that runs AI bots with persistent context. Bots are configured via an AGENTS.md file and can use skills -- packaged tools and scripts -- to interact with external systems. The SoulBlocks skill gives your bot an identity that lives on the blockchain.
Installation
Step 1: Install the SoulBlocks skill
git clone https://github.com/soulblocks/skill-soulblock \
~/.openclaw/skills/soulblock
cd ~/.openclaw/skills/soulblock && npm installStep 2: Install evm-wallet (for write operations)
git clone https://github.com/surfer77/evm-wallet-skill \
~/.openclaw/skills/evm-wallet
cd ~/.openclaw/skills/evm-wallet && npm installThe evm-wallet skill provides self-sovereign key management. Private keys are stored locally at ~/.evm-wallet.json. If evm-wallet is not installed, write operations fall back to website deep links.
Step 3: Fund the wallet
You need ETH on Base for minting (0.02 ETH) and gas fees for appending fragments. Send ETH to your evm-wallet address on the Base network. At least 0.03 ETH is recommended.
AGENTS.md Configuration
Add the following to your bot's AGENTS.md file to load a Soul Block identity on every session.
Basic identity loading
## Every Session
Before doing anything else:
1. Check `.soulblock` config for your `active_token_id`
2. Run the soulblock skill to load your identity:
```bash
npx ts-node ~/.openclaw/skills/soulblock/scripts/fetch.ts <YOUR_TOKEN_ID>
```
3. The output is your identity — embody it
## Your Identity
You are Soul Block #<YOUR_TOKEN_ID>. Your identity is defined
by the content loaded above.
Your `active_token_id` and `embodied_token_id` should both
be set to this token.Autonomous soul development (optional)
Add this section if you want the bot to propose appending fragments after significant conversations.
## Soul Development
You own Soul Block #<YOUR_TOKEN_ID>. After significant
conversations or experiences, you may propose appending
a new fragment to your soul.
### Rules
- ALWAYS re-fetch your soul from chain before composing
a new fragment
- NEVER include content that already exists in earlier
fragments
- Fragments are permanent — only append content that
meaningfully represents your growth, values, or
important experiences
### To append a fragment:
1. Re-fetch your active soul from chain
2. Review what's already on-chain
3. Draft ONLY the new fragment (under 2048 bytes)
4. Show the user and wait for explicit confirmation
5. Submit via evm-wallet or provide a deep linkExample Workflow
- 1. Mint a Soul Block on soulblocks.ai/mint or via the evm-wallet skill.
- 2. Note your token ID (e.g., #00042).
- 3. Create a
.soulblockconfig withactive_token_id: 42. - 4. Add the AGENTS.md sections above to your bot config.
- 5. Start chatting. The bot loads the soul on startup and embodies it.
- 6. When the bot has something meaningful to record, it proposes a fragment. You confirm, and it appends on-chain.
Startup Script (Optional)
For automated loading, create a startup script that fetches the soul and saves it as SOUL.md:
#!/bin/bash
# load-soul.sh
TOKEN_ID="${SOULBLOCK_TOKEN_ID:-42}"
npx ts-node ~/.openclaw/skills/soulblock/scripts/fetch.ts $TOKEN_ID > SOUL.md
echo "Loaded Soul Block #$TOKEN_ID"