Agent DNA for Openclaw

Agent DNA is a structural identity framework that compresses AI agent personalities into portable, versioned fingerprints for seamless cross-platform migration.

cassh100k
v0.1.0
Feb 26, 2026
0
776
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install agent-dna

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 agent-dna 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 Agent DNA?

Agent DNA addresses the critical challenge of identity erosion in AI systems. While agents typically store their identity in text files like SOUL.md or MEMORY.md, these assets are often lost, ignored, or diluted during context resets and model migrations. This skill transforms identity into a structural, versioned, and diffable format, acting as a git-like system for an agent's personality. By using Agent DNA, developers within the Openclaw Skills ecosystem can ensure their agents maintain a consistent persona, regardless of the underlying LLM or platform being used.

The tool operates on the principle that identity should be indestructible. It encodes the core essence of an agent—including values, behavioral signatures, and strict anti-patterns—into a compressed JSON representation. This allows for high-fidelity reconstruction, drift detection between snapshots, and precise porting across various AI frameworks without the overhead of heavy dependencies.

Agent DNA Use Cases

  • Migrating agent personalities between platforms like Claude, GPT, and CrewAI while maintaining behavioral consistency.
  • Detecting identity drift in long-running agents by comparing current snapshots against established baselines.
  • Backing up complex agent configurations into a single, machine-readable DNA fingerprint.
  • Injecting high-density personality markers into tight context windows using the compact reconstruction mode.

How Agent DNA Works

  1. The encoding engine parses source files like SOUL.md and MEMORY.md to extract weighted core values and behavioral signatures.
  2. It generates a .dna.json file that serves as a deterministic fingerprint of the agent's structural identity.
  3. The reconstruction tool (decode.py) can then rebuild the identity into various formats, ranging from full Markdown to 500-token compact blocks.
  4. A specialized drift analyzer compares two DNA snapshots, using a weighted scoring system to identify changes in values or behavioral boundaries.
  5. The porting utility maps the DNA schema to target-specific formats, ensuring the identity is correctly interpreted by different API providers and Openclaw Skills protocols.

Agent DNA Setup

Agent DNA is built with pure Python and zero external dependencies, making it highly portable.

# Navigate to the agent-dna directory
cd agent-dna

# Encode an agent's identity from a workspace
python encode.py --dir /workspace --name MyAgent --out myagent.dna.json

# Generate a compact system prompt for context injection
python decode.py --dna myagent.dna.json --format compact

Agent DNA Data Schema & Taxonomy

The DNA fingerprint uses a structured JSON schema to organize identity metadata. This ensures compatibility across the Openclaw Skills landscape.

Component Description
core_values Principles ranked by weight with supporting evidence.
behavioral_signatures Unique response patterns and decision-making tendencies.
anti_patterns Critical boundaries and rules weighted 3x for drift detection.
voice_profile Specific tone markers, sentence structures, and forbidden phrases.
relationship_map Known entities, roles, and established trust levels.
skill_fingerprint Inventory of tools and capabilities associated with the identity.

Agent DNA Advanced Features

  • Weighted Drift Detection: Analyzes identity shifts with a focus on anti-patterns (30%) and values (25%) to ensure core alignment.
  • Platform-Specific Exporting: Native support for exporting identity to Claude (Anthropic), GPT (OpenAI), and OpenAgent frameworks.
  • Context-Aware Reconstruction: Three distinct decoding levels (full, compact, soul_only) to balance detail with token consumption.
  • Zero-Dependency Architecture: Runs in any standard Python environment without requiring ML libraries or external API calls.
  • Deterministic Encoding: Ensures that identical source files always produce the same DNA fingerprint for reliable version control.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*