hargabyte

Chaos Mind

AI 智慧體v0.1.3
作者:hargabyte更新於 2026-05-17共 4 個版本 · 最新版本釋出於 2026-02-06chaos-mind@clawhub_hargabyte/chaos-mind
上下文管理記憶增強工具呼叫#Memory System

據 AlphaMoat 統計,截至 2026-09,Chaos Mind 累計下載 3,130 次、獲 2 個星標,在全部 5,078 個 AI 技能中排名第 3,637 位,在「AI 智慧體」分類(969 個)中排名第 735 位。

累計安裝
236
累計下載
3130
星標
2
全站排名
#3,637
全站前 72% · 「AI 智慧體」前 76%
平台累計安裝累計下載星標評論
ClawHub ↗99309321
SkillHub ↗23631302—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

該技能為 AI 智慧體提供混合檢索記憶系統(Context-aware Hierarchical Autonomous Observation System),融合 BM25 關鍵詞、向量語義、圖關係加成和訪問熱度四路檢索訊號。透過 chaos-cli 使用:任務前 search 檢索相關記憶,任務中 store 儲存重要事實/決策(帶分類和優先順序),任務後 list 檢視最近條目;--mode index 模式每條約 75 tokens,可節省約 90% token。自動捕獲為可選開啟,預設僅手動搜尋與儲存。

資料釋出於 2026-10-27

可以用來做什麼

  • 任務前用 chaos-cli search 檢索相關的歷史決策與事實
  • 任務中用 store 記錄重要決策、核心事實並設優先順序
  • 用 --mode index 快速掃描,每條約 75 tokens 省約 90% 成本
  • 按 category(decision/core 等)組織記憶庫
  • 任務後用 list 10 回顧最近儲存的條目

什麼時候用

  • 需要跨會話保留和檢索專案決策、事實與洞察時
  • 希望在長任務前後快速回顧相關記憶以節省 token 時
  • 只需要手動存取、不想要自動捕獲時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

先搜一下關於定價決策的歷史記憶再開始這個任務
記住:企業版每月 99 美元,分類 decision,優先順序 0.9
用 index 模式快速掃一遍團隊決策,給我最近 10 條

月度資料趨勢

累計下載3130
1775250332302026-03 · 累計下載 18752026-05 · 累計下載 24312026-06 · 累計下載 25662026-07 · 累計下載 28182026-08 · 累計下載 29652026-09 · 累計下載 313026-0326-09
星標2
1232026-03 · 星標 22026-05 · 星標 22026-06 · 星標 22026-07 · 星標 22026-08 · 星標 22026-09 · 星標 226-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093130—2
2026-082965+5.2%2
2026-072818+9.8%2
2026-062566+5.6%2
2026-052431—2
2026-031875—2

SKILL.md 原文

以下是作者釋出的原始檔案,按純文字顯示,本站未做修改或稽核;其中的連結不可點選,命令請核實後再執行。抓取於 2026-10-23。

8.1 KB · ClawHub v0.1.3
---
name: chaos-memory
description: Hybrid search memory system for AI agents. Manual search and storage - auto-capture is opt-in only.
homepage: https://github.com/hargabyte/Chaos-mind
metadata:
  {
    "openclaw":
      {
        "emoji": "🧠",
        "install":
展開全部(共 346 行)
          [
            {
              "id": "chaos-install",
              "kind": "shell",
              "command": "bash install.sh",
              "label": "Install CHAOS Memory",
            },
          ],
      },
  }
---

# CHAOS Memory

**C**ontext-aware **H**ierarchical **A**utonomous **O**bservation **S**ystem

Hybrid search memory for AI agents with 4 retrieval signals:
- **BM25** - Keyword matching
- **Vector** - Semantic similarity  
- **Graph** - Relationship bonuses
- **Heat** - Access patterns + priority

---

## 🤖 For AI Agents: How to Use This Tool

**First time?** Run this to see the complete reference:
```bash
chaos-cli --help
```

**Quick workflow:**
1. **Before a task:** `chaos-cli search "keywords" --mode index --limit 10`
2. **During a task:** `chaos-cli store "important fact" --category decision --priority 0.9`
3. **After a task:** `chaos-cli list 10`

**Token savings:** Use `--mode index` for 90% token savings (~75 tokens/result)

**More help:** Run `chaos help-agents` for the AI-optimized reference guide.

---

## Quick Start

After installation, use `chaos-cli`:

```bash
# Search memories
chaos-cli search "pricing decisions" --limit 5

# Store a memory
chaos-cli store "Enterprise tier: $99/month" --category decision

# List recent
chaos-cli list 10
```

---

## Search Memories

**Quick search** (summary mode):
```bash
chaos-cli search "architecture patterns" --mode summary --limit 5
```

**Fast scan** (index mode, 90% token savings):
```bash
chaos-cli search "team decisions" --mode index --limit 10
```

**Full detail**:
```bash
chaos-cli search "model selection" --mode full --limit 3
```

**Modes:**
| Mode | Tokens/Result | Use Case |
|------|---------------|----------|
| index | ~75 | Quick scan, many results |
| summary | ~250 | Balanced (default) |
| full | ~750 | Deep dive |

---

## Store Memory

```bash
# Decision
chaos-cli store "Qwen3-1.7B is default model" --category decision --priority 0.9

# Core fact
chaos-cli store "Database runs on port 3307" --category core --priority 0.7

# Research finding
chaos-cli store "43x speedup with think=false" --category research --priority 0.8
```

**Categories:** decision, core, semantic, research

**Priority:** 0.0-1.0 (higher = more important)

---

## Get by ID

```bash
chaos-cli get <memory-id>
```

---

## List Recent

```bash
chaos-cli list        # Default 10
chaos-cli list 20     # Show 20
```

---

## Auto-Capture (Optional - Opt-In Only)

**⚠️ DISABLED BY DEFAULT for privacy.**

To enable auto-capture:

1. **Review privacy implications** - reads your session transcripts
2. **Edit config:** `nano ~/.chaos/config/consolidator.yaml`
3. **Set:** `auto_capture.enabled: true`
4. **Configure paths:** Add your session directories to `auto_capture.sources`
5. **Install Ollama:** https://ollama.com (if not already installed)
6. **Pull model:** `ollama pull qwen3:1.7b`
7. **Test:** `chaos-consolidator --auto-capture --once`

**What it extracts:** Decisions, facts, insights  
**What it skips:** Greetings, filler, acknowledgments  
**Where it runs:** 100% local (your machine, no external APIs)  
**Speed:** 2.6s per message (~42s per 16-message session)

**Privacy:** Only processes files you explicitly configure. See SECURITY.md for details.

---

## 🔗 Enhanced Capabilities

CHAOS Memory integrates with other tools for deeper intelligence:

### Cortex (cx) - Semantic Code Anchoring

**What it does:** Anchors memories to specific code locations and files

**Why use it:** Memories become context-aware - "this decision affects Auth.tsx lines 45-67"

**How it works:**
- CHAOS detects if `cx` is available at startup
- Automatically creates semantic links: `memory → code location`
- Search results include related code snippets

**Install Cortex:**
```bash
# Cortex is a separate tool
# Install from: https://github.com/hargabyte/cortex
```

**Example:**
```bash
# Without Cortex
chaos-cli search "auth flow"
→ "Changed auth to use JWT tokens"

# With Cortex
chaos-cli search "auth flow"
→ "Changed auth to use JWT tokens"
→ 📍 Auth.tsx:45-67, middleware/auth.js:12
```

### Beads - Task Relationship Tracking

**What it does:** Links memories to tasks and issues

**Why use it:** Track which memories led to which tasks, decisions to implementations

**How it works:**
- CHAOS detects if `beads` or `beads-rust` is available
- Creates bidirectional links: `memory ↔ task`
- Memories can reference issue IDs automatically

**Install Beads:**
```bash
# Beads is a separate task management tool
# Install from: https://github.com/hargabyte/beads
```

**Example:**
```bash
# Store memory with task reference
chaos-cli store "Need to refactor auth" --category decision --task AUTH-123

# Search shows related tasks
chaos-cli search "auth refactor"
→ "Need to refactor auth"
→ 📋 Task: AUTH-123 (In Progress)
```

### Combined Power

When **all three tools** work together:
```bash
chaos-cli search "performance optimization"
→ Memory: "Added Redis caching layer"
→ 📍 Code: cache/redis.js:34-89
→ 📋 Task: PERF-042 (Completed)
→ 🔗 Related: 3 other memories, 2 code files, 1 PR
```

**Status Detection:**
- Cortex: Detected automatically on startup (logs `[OPT] Cortex Engine: FOUND`)
- Beads: Detected automatically on startup (logs `[OPT] Beads Task Manager: FOUND`)
- View status: Check the startup logs when running `chaos-mcp`

---

## Configuration

Default config location: `~/.chaos/config/consolidator.yaml`

```yaml
# Auto-capture is DISABLED by default
auto_capture:
  enabled: false  # Change to true after configuring paths
  sources: []     # Add your session paths here
  
# Example (uncomment after reviewing):
# sources:
#   - ~/.openclaw-*/agents/*/sessions/*.jsonl

qwen:
  model: qwen3:1.7b  # Locked default

chaos:
  mode: mcp
  mcp:
    env:
      CHAOS_DB_PATH: "~/.chaos/db"
```

---

## Environment Variables

| Variable | Default | Description |
|----------|---------|-------------|
| `CHAOS_HOME` | `~/.chaos` | Installation directory |
| `CHAOS_DB_PORT` | `3307` | Database port |
| `CHAOS_MODEL` | `qwen3:1.7b` | Extraction model |

---

## Requirements

- **Dolt** - Version-controlled database
- **Ollama** - Local LLM inference (for auto-capture)
- **Go 1.21+** - To build from source (optional)

The install script handles dependencies automatically.

---

## Troubleshooting

**Command not found:**
```bash
export PATH="$HOME/.chaos/bin:$PATH"
```

**Database error:**
```bash
cd ~/.chaos/db && dolt sql-server --port 3307 &
```

**No results:**
```bash
chaos-cli list  # Check if memories exist
```

---

## Security & Privacy

**Data Storage:** All memories stored locally on your machine (`~/.chaos/db`)
- No cloud sync or external transmission
- Your data never leaves your computer
- Database is version-controlled (Dolt) for auditability

**Auto-Capture (Opt-In):**
- **Disabled by default** - you must explicitly enable and configure
- Requires manual configuration of session paths in `~/.chaos/config.yaml`
- Only processes files you explicitly specify in `auto_capture.sources`
- Runs locally using your own Ollama instance (no external API calls)

**Permissions:**
- Read: Session transcript files (only paths you configure)
- Write: Local database (`~/.chaos/db`)
- Network: None (all processing is local)

**Control:**
```bash
# View what auto-capture will process (dry-run)
chaos-consolidator --auto-capture --once --dry-run

# Disable auto-capture
# Edit ~/.chaos/config.yaml:
# auto_capture:
#   enabled: false

# Or simply don't configure session paths
```

**Transparency:**
- Install script source: Included in repo (`install.sh`)
- All binaries built via GitHub Actions (reproducible)
- Database is plain Dolt (inspect with `dolt sql`)

---

## Links

- **GitHub:** https://github.com/hargabyte/Chaos-mind
- **Docs:** https://github.com/hargabyte/Chaos-mind/blob/main/README.md
- **Issues:** https://github.com/hargabyte/Chaos-mind/issues

---

*Version 1.0.0 | Created by HSA Team*

「AI 智慧體」分類下的熱門技能

資料月份:2026-09 · 下載/星標/安裝數聚合自公開技能註冊庫(ClawHub、SkillHub),按月更新。口徑說明見資料方法。