← 返回
未分类 中文

Alfred Rolling Summarization

Proactively updates a concise session summary every 15 turns or on tool loops to manage context size and preserve key decisions and progress.
每15轮或工具循环时主动更新简洁的会话摘要,以管理上下文大小并保留关键决策和进度。
lllljokerllll sabatech-dev 来源
未分类 clawhub v1.0.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 390
下载
💾 0
安装
1
版本
#compaction#context#latest#overflow-prevention#summarization

概述

Auto-Summarization Skill

Proactive context management to prevent overflow and improve session quality.

Problem

  • OpenClaw compaction triggers on context overflow (reactive)
  • Compaction timeout (60s internal) causes fallback to pre-compaction state
  • Tool loops (research with web_fetch) generate massive context without stopping
  • No control over WHAT is preserved during compaction

Solution: Rolling Summarization

How It Works

Every N turns, create a concise summary of recent work and update SESSION-STATE.md. This keeps the session lean while preserving important context.

Trigger Thresholds

ConditionAction
-------------------
Every 15 turnsCreate rolling summary
After 10 consecutive tool callsForce summary (tool loop guard)
Context >70% estimatedProactive summary + flush to memory

Rolling Summary Format

Update SESSION-STATE.md with a condensed view:

## Rolling Summary (as of HH:MM)
- Completed: [what was done]
- In progress: [what's being worked on]
- Decisions: [key decisions made]
- Blockers: [anything blocking]
- Next: [what to do next]

Integration with Existing Stack

  1. Hindsight auto-retain captures important facts before summary
  2. SESSION-STATE.md stores the rolling summary (always in context via bootstrap)
  3. Daily notes get the detailed version at end of session
  4. Working buffer becomes unnecessary if rolling summary works well

Anti-Patterns

  • ❌ Don't summarize every turn (adds latency, wastes LLM calls)
  • ❌ Don't duplicate Hindsight content (it already retains facts)
  • ❌ Don't include routine operations (heartbeat checks, status pings)
  • ✅ DO summarize: decisions, blockers, task progress, user preferences
  • ✅ DO keep it under 200 chars per section

Prompt Addition (add to agents that need it)

After completing a task or every 15 turns:
1. Read SESSION-STATE.md
2. Update the Rolling Summary section with current state
3. Keep it concise (under 500 chars total)
4. This prevents context overflow and preserves continuity

Metrics

MetricBeforeAfter (target)
--------------------------------
Context overflow/week1-2~0
Compaction timeout rate~50%<20%
Context lost per sessionHighLow
Additional LLM cost$0~$0.02/week

Version

1.0.0 — Initial implementation

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-05-07 15:55 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 865 📥 342,562
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,161 📥 931,278
ai-agent

Find Skills

root
帮助用户发现和安装智能体技能,当用户询问如「如何做X」、「找X的技能」、「有能做...的吗」等问题时
★ 1,516 📥 571,237