← 返回
AI智能 中文

TinkerClaw Subagent Overseer

You spawned 4 sub-agents. One died 20 minutes ago. You're still waiting. Overseer watches them so you don't have to — zero tokens, pure OS-level process chec...
您已生成4个子代理,其中一个20分钟前死亡,仍在等待。Overseer 负责监视它们,无需您操心——零令牌,纯操作系统级别的进程检查...
globalcaos
AI智能 clawhub v1.1.1 3 版本 100000 Key: 无需
★ 0
Stars
📥 610
下载
💾 24
安装
3
版本
#latest

概述

Sub-Agent Overseer

Lightweight pull-based daemon that monitors sub-agent health. Writes a status file every N seconds. The heartbeat handler reads it — no push, no noise.

Architecture

overseer.sh (bash, runs in background)
    ├── /proc/<pid>  → gateway alive? CPU? threads?
    ├── openclaw sessions list  → sub-agent count + ages
    ├── find -newer marker  → filesystem activity
    └── writes /tmp/overseer/status.json  (atomic mv)

heartbeat (agent, every 3min)
    └── reads /tmp/overseer/status.json → summarize or HEARTBEAT_OK

Key principle: The overseer does all data collection. The heartbeat handler does zero tool calls if the status file is fresh and healthy.

Quick Start

1. Start the overseer when spawning sub-agents

setsid scripts/overseer.sh \
  --workdir /path/to/repo \
  --interval 180 \
  --max-stale 4 \
  --voice \
  &>/dev/null &

2. Heartbeat reads the status file

cat /tmp/overseer/status.json

3. Interpret the status

FieldMeaning
------
subagents.countActive sub-agent sessions
subagents.details[].staleConsecutive cycles with no filesystem changes
subagents.details[].statusactive / idle / warning / stuck
gateway.health.aliveIs openclaw-gateway running?
filesystem.changes_since_lastFiles modified since last check

4. Staleness thresholds (at 180s interval)

stale countTimeStatusAction
------------
0-10-3 minactive/idleNormal
2-36-9 minwarningVoice alert (if --voice)
≥4≥12 minstuckAgent should investigate/kill

Heartbeat Handler Protocol

When HEARTBEAT.md fires:

  1. Read /tmp/overseer/status.json — if missing or stale (>10 min), restart overseer
  2. If subagents.count == 0 for 2+ cycles → overseer auto-exits → reply HEARTBEAT_OK
  3. If all agents active → brief one-line status → HEARTBEAT_OK
  4. If any stuck → report which labels are stuck → consider killing via subagents kill
  5. Never cache a previous heartbeat response. Always read the status file fresh.

Flags

FlagDefaultDescription
---------
--interval180Seconds between checks
--workdircwdDirectory to watch for file changes
--labels(all)Comma-separated labels to filter
--max-stale4Cycles before marking stuck
--voiceoffLocal TTS alerts via jarvis command

How It Works (No AI Tokens)

  1. Gateway health: Reads /proc//status for CPU, memory, threads, FD count. Pure kernel data.
  2. Sub-agent list: Single openclaw sessions list call per cycle. Parses grep output.
  3. Filesystem diff: find -newer marker — detects any file writes in the workdir.
  4. Status file: JSON written atomically (write to temp, mv into place). Any reader sees a complete file.
  5. Self-exit: If no sub-agents for 2 consecutive cycles, the overseer stops itself.
  6. Dedup: flock ensures only one overseer instance runs at a time.

Cost

  • Overseer: $0.00 (bash + /proc + one CLI call per cycle)
  • Voice alerts: $0.00 (local sherpa-onnx via jarvis)
  • Heartbeat reads status file: $0.00 (one cat command)
  • Only cost is the heartbeat model itself (qwen3 local = free)

Pairs Well With

👉 https://github.com/globalcaos/tinkerclaw

_Clone it. Fork it. Break it. Make it yours._

版本历史

共 3 个版本

  • v1.1.1 当前
    2026-06-07 12:28 安全 安全
  • v1.1.0
    2026-03-29 10:09 安全 安全
  • v1.0.0
    2026-03-11 11:29

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-intelligence

ontology

oswalpalash
类型化知识图谱,用于结构化智能体记忆与可组合技能。支持创建/查询实体(人员、项目、任务、事件、文档)及关联...
★ 711 📥 243,717
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,356 📥 318,069
ai-intelligence

Proactive Agent

halthelobster
将AI智能体从任务执行者升级为主动预判需求、持续优化的智能伙伴。集成WAL协议、工作缓冲区、自主定时任务及实战验证模式。Hal Stack核心组件 🦞
★ 834 📥 213,006