返回顶部
c

context-budgeting

Manage and optimize OpenClaw context window usage via partitioning, pre-compression checkpointing, and information lifecycle management. Use when the session context is near its limit (>80%), when the agent experiences "memory loss" after compaction, or when aiming to reduce token costs and latency for long-running tasks.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
3,517
下载量
5
收藏
概述
安装方式
版本历史

context-budgeting

# Context Budgeting Skill This skill provides a systematic framework for managing the finite context window (RAM) of an OpenClaw agent. ## Core Concepts ### 1. Information Partitioning - **Objective/Goal (10%)**: Core task instructions and active constraints. - **Short-term History (40%)**: Recent 5-10 turns of raw dialogue. - **Decision Logs (20%)**: Summarized outcomes of past steps ("Tried X, failed because Y"). - **Background/Knowledge (20%)**: High-relevance snippets from MEMORY.md. ### 2. Pre-compression Checkpointing (Mandatory) Before any compaction (manual or automatic), the agent MUST: 1. **Generate Checkpoint**: Update `memory/hot/HOT_MEMORY.md` with: - **Status**: Current task progress. - **Key Decision**: Significant choices made. - **Next Step**: Immediate action required. 2. **Run Automation**: Execute `scripts/gc_and_checkpoint.sh` to trigger the physical cleanup. ## Automation Tool: `gc_and_checkpoint.sh` Located at: `skills/context-budgeting/scripts/gc_and_checkpoint.sh` **Usage**: - Run this script after updating `HOT_MEMORY.md` to finalize the compaction process without restarting the session. ## Integration with Heartbeat Heartbeat (every 30m) acts as the Garbage Collector (GC): 1. Check `/status`. If Context > 80%, trigger the **Checkpointing** procedure. 2. Clear raw data (e.g., multi-megabyte JSON outputs) once the summary is extracted.

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 context-budgeting-1776339205 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 context-budgeting-1776339205 技能

通过命令行安装

skillhub install context-budgeting-1776339205

下载 Zip 包

⬇ 下载 context-budgeting v1.0.0

文件大小: 2.31 KB | 发布时间: 2026-4-17 15:39

v1.0.0 最新 2026-4-17 15:39
- Initial release of the context-budgeting skill for OpenClaw agents.
- Provides a structured method to partition the agent's context window by priority: goals, recent history, decision logs, and relevant knowledge.
- Introduces mandatory pre-compression checkpointing to preserve key task data before context compaction.
- Adds an automation script (`gc_and_checkpoint.sh`) for efficient memory cleanup without session restart.
- Integrates with the agent's heartbeat to automatically trigger context management when usage exceeds 80%.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部