SoulForce โ AI Agent Memory Evolution System. Make your OpenClaw smarter with every conversation.
๐ ไธญๆๆๆกฃ: README.zh-CN.md
OpenClaw doesn't automatically update SOUL.md, USER.md, or IDENTITY.md.
You write them once. They stay the same forever. Your AI never gets smarter.
| Pain Point | SoulForce Fix |
|---|---|
| โ SOUL.md goes stale after first write โ AI stays the same | โ Auto-analyzes memory, discovers patterns, evolves SOUL.md |
| โ Correct the same mistake 10 times, AI forgets | โ Corrections logged โ auto-evolved after 3 repetitions |
| โ USER.md doesn't track new preferences | โ USER.md auto-syncs user preference changes |
| โ Multi-agent teams pollute each other's memory | โ Full isolation โ each agent has its own storage |
| โ Manual memory maintenance is tedious | โ Cron automation โ zero effort, continuous evolution |
| โ hawk-bridge memories fade withoutๆฒๆท | โ Integrates with hawk-bridge vector store, extracts to files |
Bottom line: This skill makes your OpenClaw continuously smarter. Every correction, every pattern, every preference gets captured and evolved.
- Reads
memory/*.mddaily logs - Analyzes
.learnings/correction records - Uses configured LLM to detect recurring patterns
- Auto-updates SOUL.md / USER.md / IDENTITY.md / MEMORY.md / AGENTS.md / TOOLS.md
- Smart insertion points: append / section-based / top-of-file
- Auto-rollback: Writes are verified; failed writes auto-restore from backup
- Token budget: Configurable max tokens per run (default 4096), newest-first truncation
- Schema validation: Pydantic validation with 1-retry on LLM output errors
- Pattern expiry: Blocks can have TTL;
--clean --expiredremoves stale patterns - Incremental backup: Manual snapshots via
backup --create
Each agent's data is physically isolated โ no cross-contamination:
| Agent | Backup Dir | State Dir |
|---|---|---|
| main | .soulforge-main/backups/ |
.soulforge-main/ |
| wukong | .soulforge-wukong/backups/ |
.soulforge-wukong/ |
| tseng | .soulforge-tseng/backups/ |
.soulforge-tseng/ |
- Reads hawk-bridge's LanceDB vector memory
- Incremental sync โ only fetches entries newer than last run
- Shared data source with hawk-bridge for dual-layer backup
last_hawk_synctracked per-agent for efficient re-runs
- Incremental updates: Only appends, never overwrites
- Backup before write: Auto-backup before every update (20 for important files, 10 for normal)
- Auto-rollback: Post-write validation; failures auto-restore from snapshot
- Dedup detection: Skips patterns already in files
- Schema validation: Pydantic validation of LLM output with retry fallback
- Preview mode:
--dry-runto see changes first - Pattern expiry: Stale blocks can be auto-cleaned
Before (static, written once):
# SOUL.md
## Who I Am
I'm an AI assistant that helps with tasks.
## How I Work
I try to be helpful and accurate.After running SoulForge for 1 week:
# SOUL.md
## Who I Am
I'm an AI assistant that helps with tasks.
## How I Work
I try to be helpful and accurate.
---
<!-- SoulForge Update | 2026-04-05 -->
## Behavior: User Prefers Numbered Options
**Source**: memory/2026-04-04.md, memory/2026-04-05.md
**Pattern Type**: communication
**Confidence**: High (observed 4 times)
**Content**:
User gets overwhelmed by long text options. ALWAYS present choices as numbered lists (1/2/3) instead of paragraphs. Keep it scannable.
<!-- /SoulForge Update -->
<!-- SoulForge Update | 2026-04-03 -->
## Behavior: User Corrected "Do It Yourself" Pattern
**Source**: .learnings/LEARNINGS.md (correction)
**Pattern Type**: correction
**Confidence**: High (observed 3 times)
**Content**:
When user says "why does this keep happening" or expresses frustration, it means I should fix the root cause, not just patch symptoms. User values prevention over remediation.
<!-- /SoulForge Update -->Before (generic, never updated):
# USER.md
## User
A person who uses this AI assistant.After running SoulForge for 1 week:
# USER.md
## User
A person who uses this AI assistant.
---
<!-- SoulForge Update | 2026-04-04 -->
## Discovered: User Prefers Concise Replies
**Source**: memory/2026-04-04.md
**Pattern Type**: preference
**Confidence**: High (observed 3 times)
**Content**:
User prefers concise, actionable replies over verbose explanations. Lead with the answer, then optionally explain briefly if needed.
<!-- /SoulForge Update -->
<!-- SoulForge Update | 2026-04-05 -->
## Discovered: User Hates Manual Steps
**Source**: memory/2026-04-05.md
**Pattern Type**: preference
**Confidence**: High (observed 5 times)
**Content**:
User repeatedly asks to "automate this". Never suggests manual workarounds. If a task can be scripted, do it without asking.
<!-- /SoulForge Update -->| File | Before | After |
|---|---|---|
| SOUL.md | 150 chars, 0 updates | 850 chars, 12 updates, 4 new behavior patterns |
| USER.md | 80 chars, static | 620 chars, 6 updates, preferences tracked |
| IDENTITY.md | Empty | Full team structure documented |
| MEMORY.md | Empty | 3 important decisions recorded |
The AI becomes genuinely smarter over time.
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ Memory โ โโโถ โ Analyzer โ โโโถ โ Evolver โ
โ Sources โ โ (LLM) โ โ (Safe) โ
โโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโ
โ โ โ
โผ โผ โผ
memory/*.md Pattern Detection SOUL.md
.learnings/ 3ร threshold USER.md
hawk-bridge Confidence Scoring IDENTITY.md
MEMORY.md
Triggers:
- Same pattern appears 3+ times (configurable threshold)
- User corrects same issue 2+ times
- New preference or decision discovered
- Confidence-based filtering: High (>0.8) auto-applied, Medium (0.5-0.8) needs review, Low (<0.5) ignored
--forceflag overrides confidence threshold
# Via clawhub (recommended)
clawhub install soul-force --force
# Manual clone
git clone https://github.com/relunctance/soul-force.git ~/.openclaw/workspace/skills/soul-force
โ ๏ธ Why--force? ClawHub uses VirusTotal to scan all skills. Any skill that calls an external API is flagged as "suspicious" โ this is a false positive. The--forceflag bypasses this warning. SoulForce only uses the LLM you already configured in OpenClaw.
No API key configuration needed โ SoulForce automatically reads your OpenClaw settings.
# Manual trigger
python3 ~/.openclaw/workspace/skills/soul-force/scripts/soulforge.py run
# Preview mode (no writes)
python3 ~/.openclaw/workspace/skills/soul-force/scripts/soulforge.py run --dry-run
# Force apply all patterns (ignore confidence threshold)
python3 ~/.openclaw/workspace/skills/soul-force/scripts/soulforge.py run --force
# Review mode: generate patterns without writing
python3 ~/.openclaw/workspace/skills/soul-force/scripts/soulforge.py review
# Apply from review after confirmation
python3 ~/.openclaw/workspace/skills/soul-force/scripts/soulforge.py apply --confirm
# Check status
python3 ~/.openclaw/workspace/skills/soul-force/scripts/soulforge.py status# Set cron via command (every 2 hours)
soulforge.py cron-set --every 120
# Other intervals
soulforge.py cron-set --every 60 # every hour
soulforge.py cron-set --every 30 # every 30 minutes
soulforge.py cron-set --every 240 # every 4 hours
# View current schedule
soulforge.py cron-set --show
# Remove cron
soulforge.py cron-set --remove# View current config
soulforge.py config --show
# Set a config value (persists to ~/.soulforgerc.json)
soulforge.py config --set max_token_budget=8192
soulforge.py config --set rollback_auto_enabled=true# Clean expired pattern blocks
soulforge.py clean --expired # dry run first
soulforge.py clean --expired --confirm # actually delete
# Manual backup snapshot
soulforge.py backup --create
# Rollback last failed write (auto-restore from backup)
soulforge.py rollback --auto
# View diff since last run
soulforge.py diffOr via OpenClaw CLI directly:
openclaw cron add --name soulforce-evolve --every 120m \
--message "exec python3 ~/.openclaw/workspace/skills/soul-force/scripts/soulforge.py run"# View English changelog
soulforge.py changelog
# View Chinese changelog
soulforge.py changelog --zh
# View full changelog (no truncation)
soulforge.py changelog --fullEach agent runs its own instance with isolated workspace:
# main agent
python3 soulforge.py run --workspace ~/.openclaw/workspace
# wukong agent
python3 soulforge.py run --workspace ~/.openclaw/workspace-wukong
# tseng agent
python3 soulforge.py run --workspace ~/.openclaw/workspace-tsengWith hawk-bridge installed, SoulForce gains:
| Feature | Description |
|---|---|
| Semantic Search | Searches 33 vector memories from hawk-bridge |
| Cross-Session | hawk-bridge memories auto-analyzed |
| Incremental | Only processes new memories |
| Dual Backup | Vector layer (hawk) + File layer (soulforce) |
# Install hawk-bridge first (if not present)
clawhub install hawk-bridge --force
# SoulForce auto-detects hawk-bridge
python3 soulforge.py runsoul-force/
โโโ SKILL.md # OpenClaw Skill definition
โโโ README.md # English documentation
โโโ README.zh-CN.md # ไธญๆๆๆกฃ
โโโ soulforge/
โ โโโ __init__.py # Package init (v2.1.0)
โ โโโ config.py # Config (multi-agent isolation, config.json)
โ โโโ memory_reader.py # Multi-source memory reading (incremental)
โ โโโ analyzer.py # LLM-powered pattern analyzer (schema validation)
โ โโโ evolver.py # Safe file updates (auto-rollback)
โ โโโ schema.py # Pydantic models for pattern validation
โโโ scripts/
โ โโโ soulforge.py # CLI entry point
โโโ references/
โ โโโ ARCHITECTURE.md # Technical architecture
โ โโโ help-en.md # English help text
โ โโโ help-zh.md # ไธญๆๅธฎๅฉๆๆฌ
โโโ tests/
โโโ test_soulforge.py # Unit tests
- Python 3.10+
- OpenClaw with configured LLM
- OpenClaw (optional, for cron)
- hawk-bridge (optional, for vector memory)
MIT License โ see LICENSE