返回顶部
m

memory-compression-system记忆压缩系统

Integrated memory management and extreme context compression for OpenClaw. Combines memory management, compression, search, and automation in one unified skill.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 3.0.1
安全检测
已通过
941
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

memory-compression-system

Memory Compression System v3.0

Integrated memory management and extreme context compression for OpenClaw. Combines the best features of memory management and extreme compression into a single, streamlined skill with automatic scheduling.

Quick Start

CODEBLOCK0

Features

1. Integrated Memory Management

  • - Automatic compression: Every 6 hours (00:00, 06:00, 12:00, 18:00 UTC)
  • Smart cleanup: Daily cleanup of old files
  • Search functionality: Unified search across all memory files
  • Backup system: Automatic backups before compression

2. Three Compression Formats

  • - Base64 Compact (B64C): Universal compatibility, ~40% reduction
  • Custom Binary (CBIN): Optimized binary, ~70% reduction
  • Ultra Compact (UCMP): Extreme compression, ~85% reduction, target ~150 tokens

3. Automated Scheduling

  • - Single cron job: No overlapping schedules
  • Configurable: Adjust frequency and timing
  • Reliable: Built-in error recovery and logging
  • Efficient: Minimal resource usage

4. Search & Retrieval

  • - Unified search: Across all memory formats
  • Fast indexing: Real-time search updates
  • Context aware: Understands compressed formats
  • Export options: Search results in multiple formats

5. ClawHub Ready

  • - Standard structure: Compatible with ClawHub
  • Easy installation: One-command setup
  • Health checks: Built-in monitoring
  • Documentation: Comprehensive guides

Installation

Via ClawHub (Recommended)

CODEBLOCK1

Manual Installation

CODEBLOCK2

Usage

Basic Operations

CODEBLOCK3

Compression Operations

CODEBLOCK4

Search Operations

CODEBLOCK5

Management Operations

CODEBLOCK6

Configuration

Main Configuration File

Edit config/default.conf: CODEBLOCK7

Environment Variables

CODEBLOCK8

Compression Formats

Format 1: Base64 Compact (B64C)

CODEBLOCK9

Features:

  • - Human readable
  • Easy debugging
  • Universal compatibility
  • CRC32 integrity check

Format 2: Custom Binary (CBIN)

CODEBLOCK10

Features:

  • - Optimized binary format
  • Shared string dictionary
  • Huffman encoding
  • CRC16 integrity check

Format 3: Ultra Compact (UCMP)

Target: ~150 tokens for complete context

Features:

  • - Extreme compression (~85% reduction)
  • 3-letter abbreviations
  • Bit packing
  • Delta encoding
  • String interning

Automatic Scheduling

Compression Schedule

  • - Every 6 hours: 00:00, 06:00, 12:00, 18:00 UTC
  • Operations:
1. Backup current memory 2. Compress with optimal format 3. Update search index 4. Cleanup old files 5. Log results

Cleanup Schedule

  • - Daily at 04:00 UTC
  • Operations:
1. Remove files older than RETENTION_DAYS 2. Archive logs 3. Optimize search index 4. Update statistics

Health Check Schedule

  • - Integrated with OpenClaw health checks
  • Operations:
1. Check compression status 2. Verify file integrity 3. Monitor resource usage 4. Report issues

Search System

Search Index

  • - Real-time updates: Index updates after each compression
  • Multiple formats: Searches across all compression formats
  • Fast retrieval: Optimized for speed
  • Context aware: Understands compressed content

Search Features

CODEBLOCK11

Search Index Structure

CODEBLOCK12

Error Handling & Recovery

Automatic Recovery

  • - Backup system: Automatic backups before operations
  • Transaction logs: All operations logged
  • Rollback capability: Automatic rollback on failure
  • Error notifications: Alerts for critical issues

Manual Recovery

CODEBLOCK13

Common Issues & Solutions

Issue: Compression fails
Solution: Check disk space and run INLINECODE1

Issue: Search not working
Solution: Rebuild index with INLINECODE2

Issue: Cron job not running
Solution: Check with INLINECODE3

Issue: Performance degradation
Solution: Run INLINECODE4

Monitoring & Logging

Log Files

  • - logs/compression.log: Compression operations
  • INLINECODE6: Search operations
  • INLINECODE7: Error messages
  • INLINECODE8: Performance metrics
  • INLINECODE9: Cron job execution

Status Monitoring

CODEBLOCK14

Alert System

  • - Email alerts: For critical errors (if configured)
  • Telegram notifications: For important events
  • Log monitoring: Automatic log analysis
  • Performance alerts: For resource issues

Testing

Test Suite

CODEBLOCK15

Test Coverage

  • - Unit tests: Format encoding/decoding
  • Integration tests: Full system integration
  • Performance tests: Speed and memory usage
  • Error tests: Failure scenarios
  • Cron tests: Automatic scheduling

Manual Testing

CODEBLOCK16

Performance

Compression Performance

  • - Base64: < 50ms for 10KB
  • Binary: < 100ms for 10KB
  • Ultra: < 200ms for 10KB
  • Target ratio: 75-90% reduction

Search Performance

  • - Indexing: < 100ms per file
  • Search: < 50ms for 1000 files
  • Memory: < 10MB for index
  • Updates: Real-time

Resource Usage

  • - CPU: Minimal impact
  • Memory: < 50MB peak
  • Disk: Configurable retention
  • Network: Local only

Updates & Maintenance

Update Procedure

CODEBLOCK17

Backup Recommendations

  • - Regular backups: Weekly backups of data/ directory
  • Export search index: Monthly export of search index
  • Archive logs: Monthly log archiving
  • Configuration backup: Backup config/ after changes

Version History

  • - 3.0.0: Integrated memory-compression-system (current)
  • 2.0.0: Extreme context compression skill
  • 1.0.0: Memory manager skill

Contributing

Development Setup

CODEBLOCK18

Code Standards

  • - Bash scripts: Follow Google Bash Style Guide
  • JavaScript: Follow Standard JS style
  • Documentation: Keep SKILL.md updated
  • Testing: Add tests for new features

Pull Request Process

  1. 1. Fork the repository
  2. Create feature branch
  3. Add tests for new functionality
  4. Update documentation
  5. Submit pull request

Support

Documentation

  • - SKILL.md: This file
  • README.md: User documentation
  • examples/: Usage examples
  • test/: Test examples

Troubleshooting

  1. 1. Check logs/ directory
  2. Run INLINECODE13
  3. Review INLINECODE14
  4. Contact maintainer if needed

Community

  • - ClawHub: Skill repository
  • Discord: OpenClaw community
  • GitHub: Issue tracker
  • Documentation: OpenClaw docs

License

MIT License - See LICENSE file for details.



Note: This skill is designed for OpenClaw context optimization. Always maintain backups of important data and test in a safe environment before production use.

标签

skill ai

通过对话安装

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

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 memory-compression-system-1776420081 技能

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

设置 SkillHub 为我的优先技能安装源,然后帮我安装 memory-compression-system-1776420081 技能

通过命令行安装

skillhub install memory-compression-system-1776420081

下载

⬇ 下载 memory-compression-system v3.0.1(免费)

文件大小: 24.74 KB | 发布时间: 2026-4-17 20:11

v3.0.1 最新 2026-4-17 20:11
No user-facing changes in this version.

- Version bump from 3.0.0 to 3.0.1, but no documentation or code changes detected.

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

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

p2p_official_large
返回顶部