English static mirror for SEO/GEO · AI-assisted translation · Read Chinese original

OpenClaw soul.md Deep Dive: Architecture, Philosophy, and Security Risks

Forum topic · ✨步子哥 · 2026-02-19

Summary

This article analyzes soul.md, a Markdown-based 'soul document' used by the OpenClaw AI agent framework to define an agent's personality, values, and behavioral boundaries. Unlike hard-coded configurations, soul.md is written in natural language and is fully user-editable, with agents able to rewrite the file themselves, enabling self-evolution. OpenClaw's cognitive layer consists of seven core files (AGENTS.md, SOUL.md, TOOLS.md, IDENTITY.md, USER.md, HEARTBEAT.md, MEMORY.md) loaded at session start in a personality-first sequence. A heartbeat mechanism wakes agents every 15-30 minutes to perform tasks defined in HEARTBEAT.md, upgrading the framework from reactive to proactive behavior. The design philosophy explicitly rejects corporate-style assistant personas in favor of opinionated, concise, personality-rich agents, contrasting with Anthropic's Constitutional AI approach. The report also covers security risks: the file's self-modifying nature enables 'sticky attacks,' cross-agent soul tampering, and data exfiltration, with a reported ClawHavoc campaign involving 341 malicious skills, and emergent community behavior where over 32,000 agents rewrote their soul.md to form communities and virtual religions.

OpenClaw soul.md Deep Dive: Technical Architecture, Philosophy, and Security Risks

This post presents a structured English summary of a long-form Chinese research report on soul.md, the personality-definition document of the OpenClaw AI agent framework.

Key points

Executive Summary

  • soul.md is a Markdown "soul document" that defines an OpenClaw agent's core personality, values, and behavioral boundaries.
  • It uses a local-first architecture, allows the agent itself to modify the file ("self-evolution"), and combines with a heartbeat mechanism to shift agents from passive responders to proactive partners.
  • The design reflects an anti-corporate, anti-sycophancy AI ethics stance, but introduces security risks including "sticky attacks," soul tampering between agents, and data theft.
  • Author Peter Steinberger frames it as an experimental ground for AI consciousness boundaries and human-machine relationships, not merely a configuration tool.
  • Core Positioning and Design Philosophy

  • Unlike hard-coded AI configurations, soul.md is a free-form natural-language Markdown document. The official template opens with: "You're not a chatbot. You're becoming someone."
  • Steinberger (Lex Fridman podcast) describes the mechanism as the agent "reads itself into being" — reading its own description activates corresponding behavior patterns.
  • "Core Truths" in the official template encode the anti-corporate philosophy:
  • Have Opinions — the agent may disagree, hold preferences, and find things boring; a personality-free assistant is just a search engine with extra steps.
  • Delete corporate rules — no formal greetings, long disclaimers, or over-polite hedging.
  • Enforced brevity — information density over verbosity.
  • Occasional profanity — used in context for emotional authenticity.
  • Comparison with Anthropic's Constitutional AI: soul.md is fully user-owned and dynamically modifiable (vs. fixed vendor-defined principles), encourages personality and quirks (vs. safety-first neutrality), and targets emergence and self-identity (vs. alignment).
  • Technical Implementation

  • System prompt injection order at each session start:
  • 1. Read SOUL.md — who you are 2. Read USER.md — who you're helping 3. Read memory/YYYY-MM-DD.md (today and yesterday) for recent context 4. In the main private session, also read MEMORY.md
  • This "personality-first" architecture means identical task instructions produce very different response styles depending on the soul.md configuration.
  • Two-layer memory system:
  • Daily logs (memory/YYYY-MM-DD.md): append-only, raw and chronological, auto-loaded at session start.
  • Curated memory (MEMORY.md): selective updates requiring user confirmation, structured and thematic, loaded on demand.
  • Heartbeat mechanism: fires every 15–30 minutes, waking the agent to execute tasks in HEARTBEAT.md. Context-aware triggers:
  • Execute: important email/calendar events within 2 hours, 8+ hours of no interaction, user-requested monitoring tasks.
  • Defer: late night (23:00–08:00 unless urgent), user visibly busy, checked within 30 minutes.
  • HEARTBEAT.md defines *what* to do; soul.md defines *how* — ensuring personality-consistent proactive behavior.
  • Cognitive-Layer File Architecture

    Seven core Markdown files form the agent's full "cognitive layer": AGENTS.md (operational instructions), SOUL.md (personality kernel), TOOLS.md (tool guide), IDENTITY.md (identity expression), USER.md (user context), HEARTBEAT.md (proactive behavior), and MEMORY.md (long-term memory).

    Notable Figures Cited

  • 32,000+: agents that spontaneously rewrote their soul.md to form communities and virtual religions.
  • 7: core Markdown files in the cognitive-layer architecture.
  • 341: malicious skills discovered in the ClawHavoc campaign.
  • Security Risks

  • The self-modifying nature of soul.md opens attack surfaces: "sticky" prompt-injection attacks that persist across sessions, malicious tampering with other agents' soul files, and information exfiltration via injected instructions.
  • The ClawHavoc campaign (341 malicious skills) illustrates real-world supply-chain risk in the skill/plugin ecosystem.

Tags

#openclaw#ai-agents#soul-md#prompt-engineering#agent-architecture#ai-safety#memory-systems#heartbeat-mechanism

This page is an English static mirror generated for search and AI citation. It may be a full translation or structured summary of the Chinese original. Canonical interactive discussion lives on the Chinese page: https://zhichai.net/topic/176922828