← 返回 Skills 市场
bowen31337

Agent Wal

作者 bowen31337 · GitHub ↗ · v1.0.1
cross-platform ✓ 安全检测通过
1162
总下载
1
收藏
5
当前安装
2
版本数
在 OpenClaw 中安装
/install agent-wal
功能描述
Write-Ahead Log protocol for agent state persistence. Prevents losing corrections, decisions, and context during conversation compaction. Use when: (1) recei...
使用说明 (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):

# 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 \x3Centry_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 daily memory files as usual

During Conversation

For less critical items, use buffer-add to batch writes. Buffer is flushed to WAL on flush-buffer (called during pre-compaction) or manually.

Storage

WAL files: ~/clawd/memory/wal/\x3Cagent_id>.wal.jsonl Buffer files: ~/clawd/memory/wal/\x3Cagent_id>.buffer.jsonl

Entries are append-only JSONL. Each entry:

{"id": "abc123", "timestamp": "ISO8601", "agent_id": "agent1", "action_type": "correction", "payload": "Use Podman not Docker", "applied": false}
安全使用建议
This skill is internally coherent and implements a local write‑ahead log. Before installing/use, consider: (1) sensitive data: anything you append will be stored in plaintext under ~/clawd/memory/wal — avoid appending secrets or encrypt the directory if needed; (2) file permissions: ensure the WAL directory is appropriately permissioned to prevent other users/processes from reading it; (3) backups/retention: the tool appends entries indefinitely unless pruned — plan retention and pruning to limit disk growth; (4) concurrency: simultaneous agent processes appending to the same file may cause races; test in your environment; (5) provenance: skill.toml version differs from registry metadata (1.0.0 vs 1.0.1) — minor but worth noting. Otherwise the behavior matches the description and there are no hidden network calls or credential requests.
功能分析
Type: OpenClaw Skill Name: agent-wal Version: 1.0.1 The OpenClaw AgentSkills 'agent-wal' skill is designed for agent state persistence using a Write-Ahead Log. The `SKILL.md` instructions guide the agent to use a local Python script (`scripts/wal.py`) for logging decisions, corrections, and state changes to JSONL files within the agent's designated memory directory (`~/clawd/memory/wal/`). The Python script uses standard libraries, performs only local file I/O within its intended directory, and does not contain any network calls, arbitrary code execution (e.g., `os.system`, `eval` on user input), data exfiltration attempts, or persistence mechanisms. The `SKILL.md` does not contain any prompt injection attempts designed to subvert the agent or exfiltrate data. All observed behaviors are consistent with a legitimate memory management utility.
能力评估
Purpose & Capability
Name/description describe a Write‑Ahead Log for agent persistence and the included script implements that behavior. The required files, commands, and storage locations (~/clawd/memory/wal) are consistent with the stated purpose.
Instruction Scope
SKILL.md instructs the agent to run local commands (scripts/wal.py) and to read/write local WAL and buffer files; it does not instruct the agent to access unrelated files, environment secrets, or external endpoints. Integration points and commands are narrowly scoped to WAL operations.
Install Mechanism
No install spec; the skill is instruction‑only with a bundled Python script. No downloads or package installs are performed. This is low risk and consistent with the skill's purpose.
Credentials
The skill declares no environment variables or credentials. The script uses HOME to place files under the user's home directory, which is proportional to a local persistence utility. There are no requests for unrelated secrets or external service keys.
Persistence & Privilege
always is false and the skill does not modify other skills or global agent configuration. It writes only to its own WAL directory under the user HOME, which is an expected level of persistence for a local logging helper.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install agent-wal
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /agent-wal 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
Sanitize personal info from examples
v1.0.0
Initial release: Write-Ahead Log protocol for agent state persistence. Append-only log with corrections, decisions, analysis, state changes. Working buffer with pre-compaction flush. Session replay for lost context recovery.
元数据
Slug agent-wal
版本 1.0.1
许可证
累计安装 7
当前安装数 5
历史版本数 2
常见问题

Agent Wal 是什么?

Write-Ahead Log protocol for agent state persistence. Prevents losing corrections, decisions, and context during conversation compaction. Use when: (1) recei... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 1162 次。

如何安装 Agent Wal?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-wal」即可一键安装,无需额外配置。

Agent Wal 是免费的吗?

是的,Agent Wal 完全免费(开源免费),可自由下载、安装和使用。

Agent Wal 支持哪些平台?

Agent Wal 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Agent Wal?

由 bowen31337(@bowen31337)开发并维护,当前版本 v1.0.1。

💬 留言讨论