← 返回
开发者工具 中文

Clever Compact

Your OpenClaw agent forgets everything between sessions — after /new, after compaction, after overnight. Clever Compact fixes all three: injects your last st...
OpenClaw代理在会话之间会忘记一切——在 /new、压缩或过夜后。Clever Compact修复这三种情况:注入您上次的状态,保持连续性。
jfulmines-star
开发者工具 clawhub v2.2.5 5 版本 99827.9 Key: 无需
★ 1
Stars
📥 1,140
下载
💾 9
安装
5
版本
#/new#amnesia#compaction#context#hallucination#latest#memory#power-user#productivity

概述

Clever Compact

Publisher: AxiomStream Group

Version: 2.2.5

Tier: Free

ClaWHub: https://clawhub.ai/jfulmines-star/clever-compact

Support: kit@axiomstreamgroup.com


What This Skill Does

Clever Compact fixes the three memory failure modes every serious OpenClaw user hits:

  • /new amnesia — fresh session, agent acts like it's never met you
  • Compaction loss — context fills up, compact fires, agent forgets what it was doing mid-task
  • Overnight drift — decisions from three sessions ago quietly disappear

v2 is a native OpenClaw plugin with two parts:

Session restore (automatic): At the start of every session — including after /new and after compaction — Clever Compact checks for a recent compact-state file. If one exists (written within 72 hours), it injects the content as system context on the first turn only. Your agent wakes up oriented with zero per-turn token overhead.

State write (triggered by you): OpenClaw doesn't expose a pre-compaction lifecycle hook yet, so the write side is explicit — not automatic. Three ways to trigger it; pick one (see below).


Installation (4 steps)

1. Install:

openclaw skills add https://clawhub.ai/jfulmines-star/clever-compact

2. Enable in ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "clever-compact": {
        "enabled": true
      }
    }
  }
}

3. Add to plugins.allow:

{
  "plugins": {
    "allow": ["clever-compact"]
  }
}

4. Restart gateway:

openclaw gateway restart

That's it. Session restore is now active automatically.


Writing State

Pick one trigger method:

Manual — Tell your agent:

> "Run a Clever Compact flush"

Heartbeat — Add to your HEARTBEAT.md:

## Context Flush (at >75% context)
- Run a Clever Compact flush — write state to memory/compact-state-YYYY-MM-DD-HHmm.md

Cron — Schedule a pre-compact flush via Piston or system cron, 5 minutes before your nightly compact:

Payload: "Pre-compaction memory flush. Store durable memories now."

The plugin also exposes api.fn("clever-compact:write") for programmatic triggers from other tools.


Using with memory-core (IMPORTANT — OC 2026.5.2+)

If you're running both Clever Compact and memory-core, you have two great tools that do different things — and they work together perfectly when configured correctly.

What each owns:

  • Clever Compact → cross-session state injection (compact-state files → session start restore)
  • memory-core → within-session memory flush, memory_search/memory_get tools, dreaming

The conflict: On OC 2026.5.2+, both plugins can fire a session-start injection at the same time. The fix is one config line.

Recommended config (both enabled, no conflict):

"plugins": {
  "entries": {
    "clever-compact": {
      "enabled": true
    },
    "memory-core": {
      "enabled": true,
      "config": {
        "memoryFlush": {
          "enabled": false
        }
      }
    }
  }
}

With this setup: memory-core handles search tools and dreaming, Clever Compact handles session restore. No overlap, no conflict.

Advanced: If you want memory-core's flush AND CC's session restore, set both enabled but point memory-core's flush to a different target file. Most users don't need this — the config above covers 99% of setups.


Compatibility

VersionStatus
------
OpenClaw 2026.4.10+✅ Supported
OpenClaw 2026.5.2+✅ Supported (use memory-core config above if both enabled)
OpenClaw < 2026.4.10❌ Not supported

Changelog

  • v2.2.4 — Fix: session flag now scoped per-registration (fixes blank-session bug on OC 2026.5.2 plugin loading changes). Added memory-core coexistence guidance.
  • v2.2.3 — Stable release. Version sync across package files.
  • v2.2.0 — Native plugin (no longer skill-only). Injects once per session only — eliminates per-turn token overhead.

Built by AxiomStream Group — axiomstreamgroup.com

We built this because we needed it. We run it on our own agents every day.


If Clever Compact saved your agent's memory, star it on ClaWHub — it helps other users find it and tells us the fix was worth shipping.

Star on ClaWHub →


Security

Clever Compact is a memory plugin. It reads and writes local files in your OPENCLAW_WORKSPACE/memory/ directory only. No network requests, no shell execution, no credential access.

The ClawHub security scanner flags memory plugins because they use fs, process.env, before_prompt_build, and prependSystemContext — the same capabilities used by OpenClaw's own memory-core plugin. These are required for any memory plugin to function.

See SECURITY.md for the full capability-by-capability breakdown, or GitHub issue #1989 for the false-positive report.

VirusTotal: ✅ Benign | Static analysis: ✅ Benign | ClawScan: 🔄 Under review

版本历史

共 5 个版本

  • v2.2.5 当前
    2026-05-07 03:24 安全 安全
  • v2.2.3
    2026-03-29 04:42 安全 安全
  • v2.2.1
    2026-03-26 21:37
  • v2.2.2
    2026-03-14 01:08
  • v1.3.1
    2026-03-11 11:51

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Gog

steipete
Google Workspace 命令行工具,支持 Gmail、日历、云端硬盘、通讯录、表格和文档。
★ 921 📥 185,826

Architecture Critic

jfulmines-star
对抗式预构建架构审查。生成结构独立的代理,在实施前审查提议的构建、功能或运营决策。
★ 1 📥 376
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 671 📥 324,378