凡自治之物 · LGD 治理学 · 创造术家族 | 评测协议:skill-quality-gate(外部公开评测门禁文档)
English
When to use
- The user says the agent "froze", "ran away" or "burned through tokens".
- The system detects repeated calls of the same action with no real progress.
- The user asks how to set a "step limit" or suspects the flow is out of control.
- Internal monitoring accumulates "no gate" risk (LGD state).
Usage
- Core script:
loop_guard.py(root of the skill dir). - Key flags:
--check_loopfor loop detection;--enable_firewallfor circuit-breaking. - Config: env vars
LGD_MAX_STEPS=10andTOKEN_BUDGET_LIMITactivate automated monitoring.
Flow
- Trigger watch: scan conversation/log streams for "stuck" signals.
- State capture: current step count, token burn rate, action-sequence fingerprint.
- Rule match: run loop-detection; test circuit-break conditions.
- Intervention: on confirmed infinite loop or stall, fire a system-level circuit break.
- Diagnosis: structured report with root cause, remaining-token estimate, fix suggestions.
- Recovery: on user instruction, lift the limit and enter a new controlled monitoring cycle.
Evidence & safety
- Evidence: TBD. Version: 1.0.1. Security: no independent scan (TBD).
中文
何时用
- 当用户明确提及 Agent"卡死"、"跑飞"或"烧光 token"等异常状态时。
- 当系统检测到 Agent 处于重复调用同一动作的循环,且任务执行无实质性进展时。
- 当用户询问如何设置"步数上限"或质疑当前流程失控时。
- 当内部监控算法识别到"无门禁"状态持续累积风险时。
用法
- 核心脚本:直接执行
loop_guard.py(位于根目录)。 - 关键命令:
--check_loop循环检测;--enable_firewall开启熔断保护。 - 配置说明:设定环境变量
LGD_MAX_STEPS=10与TOKEN_BUDGET_LIMIT激活自动化监控。
流程
- 触发监听:在对话流或 Agent 日志中实时扫描"卡死"及异常行为信号。
- 状态采集:收集当前执行步骤、Token 消耗速率及动作序列指纹数据。
- 规则比对:运行检测算法,验证是否满足熔断条件。
- 干预决策:确认无限循环或状态停滞,立即触发系统级熔断。
- 诊断生成:输出根因分析、Token 剩余量评估及修复建议的结构化报告。
- 执行恢复:等待用户指令后解除限制,进入新一轮受控监控周期。
证据与安全声明
- 证据:TBD(暂无评测/徽章链接;产生后在此更新实际链接)
- 版本:1.0.1
- 安全:未做独立安全扫描(TBD),结论待补;补全前不作推荐背书。
