搜索

PythonReactSEOPDF
OpenClaw

agent-wal

Write-Ahead Log protocol for agent state persistence. Prevents losing corrections, decisions, and context during conversation compaction. Use when: (1) receiving a user correction — log it before responding, (2) making an important decision or analysis — log it before continuing, (3) pre-compaction memory flush — flush the working buffer to WAL, (4) session start — replay unapplied WAL entries to restore lost context, (5) any time you want to ensure something survives compaction.

bowen313370 来源安装数☆ 0 仓库 Stars

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

SkillHub CLI

skillhub install bowen31337/agent-wal

打开来源仓库,查看说明和兼容环境后,按来源提供的命令或步骤安装。

将来源链接提供给你的 Agent,让它先读取说明、核对依赖,并向你说明将执行的安装步骤。

查看来源 ↗使用指南

技能说明

Agent WAL (Write-Ahead Log)

Write important state to disk before responding. Prevents the #1 agent failure mode: losing corrections and context during compaction.

Core Rule

Write before you respond. If something is worth remembering, WAL it first.

When to WAL

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

Commands

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

Integration Points

On Session Start
  1. Run replay to get unapplied entries
  2. Read the summary into your context
  3. Mark entries as applied after incorporating them
On User Correction
  1. Run append with action_type correction BEFORE responding
  2. Then respond with the corrected behavior
On Pre-Compaction Flush
  1. Run flush-buffer to persist any buffered entries
  2. Then write to d...

来源信息

Source
github
Repository
openclaw/skills
Path
skills/bowen31337/agent-wal
Version
—
Commit
7f48b9977ce6d36cf20f9e4db3996361a76ce0cb
分类来源
rules
状态
active
可见性
public

这些信息来自收录时的来源分析,可能滞后;使用前请核对最新来源文件。

来源内容

SKILL.md
# Agent WAL (Write-Ahead Log)

Write important state to disk **before** responding. Prevents the #1 agent failure mode: losing corrections and context during compaction.

## Core Rule

**Write before you respond.** If something is worth remembering, WAL it first.

## When to WAL

| 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 |

## Commands

All commands via `scripts/wal.py` (relative to this skill directory):

```bash
# 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
```

## Integration Points

### On Session Start
1. Run `replay` to get unapplied entries
2. Read the summary into your context
3. Mark entries as applied after incorporating them

### On User Correction
1. Run `append` with action_type `correction` BEFORE responding
2. Then respond with the corrected behavior

### On Pre-Compaction Flush
1. Run `flush-buffer` to persist any buffered entries
2. Then write to d...

相关技能

OpenClaw

agent-pack-n-go

aicodelion

🚀 Clone your OpenClaw AI Agent to a new device in ~25 minutes — configs, memory, skills, everything.

OpenClaw

cacheforge-skills

cacheforge-ai

⚡ SOTA agent skills for OpenClaw — observability, security, code quality, incident response, and more. Built by Anvil AI.

OpenClaw

restart-guard

zjianru

OpenClaw Skill: Safely restart the Gateway with context preservation, guardian watchdog, and multi-channel notification