跳到正文
TakoAPI
返回技能列表

agent-wal

由 bowen31337 提供

Notes & PKM
827下载量由 clawskills.sh 提供
1星标
0浏览量
0 个赞登录后即可为这个技能点赞
—暂无评分
你的评分

简介

Write-Ahead Log protocol for agent state persistence.

描述

该技能的功能

Write-Ahead Log protocol for persisting agent state to disk before responding. Prevents corrections, decisions, and context from being lost when conversations are compacted. Entries are stored as append-only JSONL and can be replayed at session start to restore lost context.

Unlike relying on in-memory context alone, WAL entries persist to disk and survive compaction, so corrections made early in a session are not silently discarded.

何时使用

  • Preserving a user correction across a session restart
  • Logging an architectural decision before continuing a long conversation
  • Flushing buffered context before anticipated compaction
  • Replaying missed corrections at the start of a new agent session
  • Batching state changes during a complex multi-step task

示例工作流

输入

User says: 'No, use Podman not Docker for all tooling'

智能体
  1. 1

    Runs wal.py append agent1 correction 'Use Podman not Docker for all tooling' before responding

  2. 2

    Confirms entry is written to the JSONL WAL file at ~/clawd/memory/wal/agent1.wal.jsonl

  3. 3

    Responds to the user with the corrected behavior applied

  4. 4

    On next session start, runs wal.py replay agent1 to surface unapplied entries

  5. 5

    Marks the entry as applied after incorporating it into context

输出

Correction persisted to disk and restored at the next session start, with no manual re-statement needed from the user

安装

clawhub install bowen31337/agent-wal

运行 CLI 命令,或把这段提示词粘贴到 Claude Code、Cursor、Codex 或你在用的任意编程智能体里。

链接