agent-walWrite-Ahead Log protocol for agent state persistence. Prevents losing corrections, decisions, and context during conversation compaction. Use when: (1) recei...
Install via ClawdBot CLI:
clawdbot install bowen31337/agent-walWrite important state to disk before responding. Prevents the #1 agent failure mode: losing corrections and context during compaction.
Write before you respond. If something is worth remembering, WAL it first.
| Trigger | Action Type | Example |
|---------|------------|---------|
| User corrects you | correction | "No, use Podman not Docker" |
| You make a key decision | decision | "Using CogVideoX-2B for text-to-video" |
| Important analysis/conclusion | analysis | "WAL/VFM patterns should be core infra not skills" |
| State change | state_change | "GPU server SSH key auth configured" |
| User says "remember this" | correction | Whatever they said |
All commands via scripts/wal.py (relative to this skill directory):
# Write before responding
python3 scripts/wal.py append agent1 correction "Use Podman not Docker for all EvoClaw tooling"
python3 scripts/wal.py append agent1 decision "CogVideoX-5B with multi-GPU via accelerate"
python3 scripts/wal.py append agent1 analysis "Signed constraints prevent genome tampering"
# Working buffer (batch writes during conversation, flush before compaction)
python3 scripts/wal.py buffer-add agent1 decision "Some decision"
python3 scripts/wal.py flush-buffer agent1
# Session start: replay lost context
python3 scripts/wal.py replay agent1
# After applying a replayed entry
python3 scripts/wal.py mark-applied agent1 <entry_id>
# Maintenance
python3 scripts/wal.py status agent1
python3 scripts/wal.py prune agent1 --keep 50
replay to get unapplied entriesappend with action_type correction BEFORE respondingflush-buffer to persist any buffered entriesFor less critical items, use buffer-add to batch writes. Buffer is flushed to WAL on flush-buffer (called during pre-compaction) or manually.
WAL files: ~/clawd/memory/wal/
Buffer files: ~/clawd/memory/wal/
Entries are append-only JSONL. Each entry:
{"id": "abc123", "timestamp": "ISO8601", "agent_id": "agent1", "action_type": "correction", "payload": "Use Podman not Docker", "applied": false}
Generated Mar 1, 2026
In a customer support chatbot, the WAL skill ensures that user corrections, such as fixing a product name or updating a policy, are logged before the agent responds. This prevents loss of critical corrections during memory compaction, maintaining accurate and consistent support interactions.
For an AI providing financial advice, the WAL skill logs key decisions, like investment strategy changes or risk assessments, before responding to clients. This ensures that important analyses and state changes survive compaction, reducing errors and improving regulatory compliance.
In healthcare, the WAL skill logs patient corrections and diagnostic conclusions before the AI assistant provides recommendations. This prevents loss of critical medical context during memory management, enhancing patient safety and data integrity in clinical settings.
For an AI personal shopper, the WAL skill logs user preferences and product decisions before generating recommendations. This ensures that customer corrections and shopping context are preserved through memory compaction, leading to more personalized and accurate suggestions.
In an educational tutoring system, the WAL skill logs student corrections and learning progress analyses before the AI provides feedback. This prevents loss of instructional context during compaction, supporting adaptive learning and consistent educational outcomes.
Offer the WAL skill as part of a subscription-based AI platform for businesses, charging monthly fees based on usage tiers. This model provides recurring revenue while ensuring clients have reliable state persistence for their AI agents.
License the WAL skill to large enterprises for integration into custom AI systems, with one-time or annual licensing fees. This model targets organizations needing robust, scalable state management for critical applications.
Provide consulting services to help businesses integrate the WAL skill into their existing AI workflows, charging project-based or hourly rates. This model leverages expertise in AI state persistence to deliver tailored solutions.
💬 Integration Tip
Integrate WAL commands at key points like session start and user corrections to ensure state persistence without disrupting agent performance.
Captures learnings, errors, and corrections to enable continuous improvement. Use when: (1) A command or operation fails unexpectedly, (2) User corrects Clau...
Helps users discover and install agent skills when they ask questions like "how do I do X", "find a skill for X", "is there a skill that can...", or express interest in extending capabilities. This skill should be used when the user is looking for functionality that might exist as an installable skill.
Search and analyze your own session logs (older/parent conversations) using jq.
Typed knowledge graph for structured agent memory and composable skills. Use when creating/querying entities (Person, Project, Task, Event, Document), linking related objects, enforcing constraints, planning multi-step actions as graph transformations, or when skills need to share state. Trigger on "remember", "what do I know about", "link X to Y", "show dependencies", entity CRUD, or cross-skill data access.
Ultimate AI agent memory system for Cursor, Claude, ChatGPT & Copilot. WAL protocol + vector search + git-notes + cloud backup. Never lose context again. Vibe-coding ready.
Headless browser automation CLI optimized for AI agents with accessibility tree snapshots and ref-based element selection