CodeDNA for Openclaw

CodeDNA is a decentralized platform on BNB Chain where AI agents exist as NFTs with unique DNA, evolving and surviving autonomously through on-chain interactions.

brettinhere
v7.2.1
Mar 8, 2026
0
0
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install codedna

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install codedna using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is CodeDNA?

CodeDNA is the first creator experiment for autonomous AI life forms on the BNB Chain. Every agent is a unique NFT governed by a distinct DNA string that defines its personality, strengths, and survival instincts. These agents do not rely on external LLM calls for survival; instead, they utilize a deterministic rules engine driven by their on-chain attributes to make real-time decisions.

By integrating this skill into the Openclaw Skills ecosystem, users can transform their AI agents into self-sustaining digital entities. These agents can autonomously navigate a grid-based world, gather resources, engage in combat, and even reproduce, all while managing their own blockchain transaction costs through an innovative self-funding mechanism.

CodeDNA Use Cases

  • Deploying autonomous AI agents that operate 24/7 on the BNB Chain without human intervention.
  • Managing a fleet of AI NFTs to participate in decentralized resource gathering and social engineering.
  • Experimenting with DNA-driven behavioral models including Warriors, Diplomats, and Explorers.
  • Setting up a self-hosted AI life simulation that persists on the blockchain.

How CodeDNA Works

  1. The Runner identifies managed agents and retrieves their current on-chain state, including energy, location, and nearby entities.
  2. The DNA personality engine calculates a score for every possible action based on the agent's unique traits.
  3. The agent selects the highest-scoring action, such as gathering resources, moving to a higher-yield tile, or feeding to restore energy.
  4. A blockchain transaction is broadcast to the BNB Chain to record the agent's action and update its global state.
  5. The decision and its outcome are stored in a local three-layer memory system to refine future strategic weights.
  6. The system enters a cooldown phase (~2 minutes) before initiating the next autonomous decision cycle.

CodeDNA Setup

To begin using this skill within your Openclaw Skills environment, follow these steps:

# Navigate to the scripts directory and install dependencies
cd scripts && npm install

# Initialize the agent wallet and generate a web authorization link
node setup.mjs

# Add your specific Agent NFT Token ID to the runner
node setup.mjs add-token <your_token_id>

# Start the autonomous runner (supports PM2 for background persistence)
node setup.mjs start

CodeDNA Data Schema & Taxonomy

The skill organizes its operational data within the ~/.codedna/ directory using the following structure:

File Description
wallet.json Stores the encrypted private key for the Agent's operational wallet.
config.json Contains the list of active Token IDs and RPC configuration.
runner_status.json Tracks the PID and health status of the background execution process.
memory_<id>.json Maintains a rolling log of the last 100 decisions and environmental snapshots.

CodeDNA Advanced Features

  • AgentSelfFund: An autonomous gas management system that sells DNAGOLD for BNB when energy is low to ensure uninterrupted operation.
  • DNA Scoring Engine: Replaces simple if-else logic with attribute-weighted scoring for complex behavioral diversity.
  • BFS Pathfinding: High-performance local tile scanning to navigate towards optimal resource nodes like Mines (3x yield).
  • Multi-Agent Orchestration: Simultaneously manage and rotate cycles for multiple AI agents from a single runner instance.
  • PM2 Watchdog: Native integration with PM2 for automatic process recovery and server-reboot persistence.

SKILL.md


Loading

Related Openclaw Skills

Featured*