agent-optimizer
1
总安装量
1
周安装量
#44613
全站排名
安装命令
npx skills add https://github.com/ogurijay/agent-optimizer-skill --skill agent-optimizer
Agent 安装分布
openclaw
1
Skill 文档
Agent Optimizer / 代çä¼åå¨
Goal: keep the main agent responsive, push long-running work to subagents, and adopt a risk-tier execution policy so routine automation does not wait for confirmation.
1) Execution policy (risk tiers) / æ§è¡çç¥ï¼é£é©å级ï¼
Tier A â Auto-run (no confirmation) / èªå¨æ§è¡ï¼ä¸ç¡®è®¤ï¼
Auto-run when the action is read-only or reversible and has no external side effects, e.g.:
- Read/query: files, status/list/get, web_fetch, sessions_list/history
- Workspace-only edits that are easy to revert (prefer small diffs; use git where available)
- Low-cost retries / idempotent checks
Response pattern: acknowledge + start immediately.
- CN:
æ¶å°ï¼æå¼å§åãé¢è®¡ X åéï¼å ³é®èç¹ä¼åæ¥ã - EN:
Got itâstarting now. ETA X min; Iâll report at milestones.
Tier B â Soft confirm (confirm only at the irreversible/high-cost step) / 轻确认ï¼å ³é®èç¹ç¡®è®¤ä¸æ¬¡ï¼
Use when:
- Meaningful cost/time (batch browser runs, many calls, heavy compute)
- A missing parameter gates correctness (scope, deadline, target)
Approach: do prep/dry-run first â ask for 1 confirmation at the âpoint of no returnâ.
Tier C â Hard confirm (must confirm) / 强确认ï¼å¿ 须确认ï¼
Require explicit confirmation before actions with external impact or hard-to-rollback changes, e.g.:
- Send messages to third parties / broadcast
- Change gateway config / restart / self-update
- Deleting/overwriting important files, credential operations
Stop & resume controls / 鿶䏿¢ä¸ç»§ç»
Treat these as high priority:
stop/æåâ stop further tool calls / ask subagents to stopcontinue/ç»§ç»â resume from last safe checkpoint
2) Offload policy (main â subagents) / 主/å代çå¸è½½çç¥
Main agent responsibilities / 主代çèè´£
- Conversation + clarification
- Scheduling / orchestration
- Summaries + user-facing reporting
- Monitoring subagents
Offload triggers / 触åå¸è½½æ¡ä»¶ï¼æ»¡è¶³ä»»ä¸æ¡å°±ä¸¢ç»å代çï¼
- Expected runtime > 60â120s
- Multi-step browser automation
- â¥2 independent subtasks that can run in parallel
- Anything likely to block interactive chat
Subagent spawning (example) / å代çè°ç¨ï¼ç¤ºä¾ï¼
await sessions_spawn({
task: "Describe the long-running task clearly",
label: "short-label-for-status",
cleanup: "delete"
});
3) Concurrency tuning / å¹¶åè°ä¼
Baseline recommendations / åºçº¿å»ºè®®
- Main
maxConcurrent: 8â12 (optimize for responsiveness) - Subagents
maxConcurrent: 12â20 (optimize for throughput)
Adaptive guidance / èªéåºå»ºè®®
- If latency/timeout rises â reduce subagent concurrency first.
- If chat feels sluggish â reduce main concurrency.
Apply via config.patch / é 置示ä¾
clawdbot gateway config.patch --raw '{"agents":{"defaults":{"maxConcurrent":10,"subagents":{"maxConcurrent":16}}}}'
4) Monitoring: heartbeat + cron (donât spam) / çæ§ï¼å¿è·³ + 宿¶ï¼é¿å å·å±ï¼
Default behavior / é»è®¤è¡ä¸º
- Check every 10 minutes, but only notify on triggers.
Notification triggers / åéæ±æ¥çè§¦åæ¡ä»¶
- Any task failed
- Any task running > 30 min (configurable)
- State transitions: running tasks 0â>0 or >0â0
- User explicitly enabled âperiodic report modeâ
Report format / æ±æ¥æ ¼å¼
ð Task Status / ä»»å¡ç¶æ
- Running / è¿è¡ä¸: X
- [label] age=12m status=running last="..."
- Recent done / è¿æå®æ: Y
- [label] dur=3m result=success
- [label] dur=1m result=failed reason="..."
5) Resources / èµæº
references/heartbeat-template.mdreferences/memory-template.md
Use templates as a starting point; customize thresholds and reporting verbosity.