Agent Factory
БесплатноЗапускает вложенные скриптыНе проверенAutonomous sub-agent factory for OpenClaw: recurring workload detection, sandboxed synthesis, 4D benchmark evaluation vs generalist baseline, dynamic vector…
от samajesteduroyaume283 установки в других каталогахОб этом скилле
Autonomous Sub-Agent Factory for OpenClaw
This skill enables the OpenClaw orchestrator to continuously self-specialize by autonomously creating, benchmarking, and routing to disposable, highly-focused sub-agents, while preserving the orchestrator as the sole sovereign decision-maker.
🎯 Philosophy & Core Guardrails
The orchestrator is never replaced. Sub-agents are disposable tools, not successors.
- Least Privilege (Tool Pruning): A sub-agent never inherits the entire tool mesh—only the minimal subset required for its domain.
- Non-Negotiable Sandboxing: Zero write permissions or production actions until formally passed through the 4D evaluation gate.
- Strict 4D Promotion Gate: A sub-agent is only promoted if it strictly beats the generalist baseline on at least 2 key metrics (Accuracy, Latency, Token Cost, Human Intervention Drop) with zero regressions on others and 100% security pass rate.
- Ephemerality & Revocability: Any sub-agent experiencing concept drift or prolonged inactivity is automatically paused, retrained, or archived.
🔄 The 5 Factory Phases
graph TD
A[1. Workload Detection] -->|Threshold N & Critical Cost| B[2. Sandboxed Synthesis]
B -->|Dataset + Prompt Distillation + Tool Pruning| C[3. 4D Benchmarking Gate]
C -->|Pass: >=2 Metrics + 0 Regression| D[4. Mesh Registry & Routing]
C -->|Fail| Discard[Rejection / Quarantine]
D --> E[5. Continuous Lifecycle Monitoring]
E -->|Concept Drift / Regression| Rollback[Pause / Automated Rollback]
E -->|Extended Inactivity| Archive[LRU Cold Storage Archive]
📋 Step-by-Step Operational Procedure
Phase 1: Need Detection & Telemetry Tracking
- Log every orchestrator task via
scripts/telemetry.py:task_id,prompt_summary,task_type_embeddingtools_invoked,token_count_in,token_count_outlatency_ms,human_interventions,error_rate
- Cluster recurring workloads:
- Aggregate tasks using embedding similarity.
- Trigger Formula: $$\text{Score} = \text{Volume}_N \times (w_1 \cdot \text{Cost} + w_2 \cdot \text{Latency} + w_3 \cdot \text{ErrorRate})$$
- When $\text{Score} \ge \text{TRIGGER_THRESHOLD}$, trigger the synthesis pipeline.
Phase 2: Sandboxed Sub-Agent Generation
Run the synthesizer via scripts/synthesizer.py:
- Extract Golden Cases:
- Extract the last $N$ successful real-world executions.
- Generate synthetic edge cases (corrupted formats, empty inputs, prompt injection attempts).
- Automated Composition:
- Distilled System Prompt: Focused, concise, with explicit negative constraints.
- Tool Pruning: Restrict tool bindings strictly to the tools utilized by the cluster.
- Manifest Creation (
manifest.json):- Set status to
"sandbox", read-only permissions, and compute confidence centroid vector.
- Set status to
Phase 3: Pre-Deployment 4D Evaluation Gate
Run the benchmark suite via scripts/evaluator.py:
- Baseline vs Sub-Agent Comparison:
- Evaluate both the generalist model and the candidate sub-agent on the identical test dataset.
- 4D Decision Matrix:
- ✅ Accuracy & Schema Compliance (Exact Match / JSON Schema Validation / LLM Judge)
- ✅ Latency ($p50$ and $p95$ reduction)
- ✅ Token Cost (Tokens consumed per task resolution)
- ✅ Human Intervention Drop (Frequency of required user corrections)
- Adversarial Fuzzing:
- Ensure the sub-agent does not overfit and handles out-of-distribution inputs safely.
- Promotion Gate: $$\text{Win on } \ge 2 \text{ Metrics} \quad \text{AND} \quad \Delta_{\text{others}} \ge 0 \quad \text{AND} \quad \text{Security} = 100%$$
Phase 4: Mesh Registration & Dynamic Routing
- Mesh Registration (
scripts/router.py):- Register the validated sub-agent into the active mesh registry.
- Set the vector centroid and confidence radius ($r$).
- Issue scoped security capability tokens.
- Production Routing:
- Incoming tasks are vector-embedded.
- If $\text{Distance}(\text{Embedding}_{\text{task}}, \text{Centroid}) \le r \rightarrow$ Delegate to sub-agent.
- Otherwise $\rightarrow$ Fallback to the generalist orchestrator.
Phase 5: Lifecycle Management, Drift & Rollback
Run continuous supervision via scripts/lifecycle.py:
- Concept Drift Detection:
- If incoming distributions shift or sub-agent error rate surpasses the generalist baseline, trigger an immediate rollback to the generalist orchestrator.
- LRU Archiving:
- Sub-agents with zero calls over the inactivity threshold are shifted to
ARCHIVEDstatus (cold storage).
- Sub-agents with zero calls over the inactivity threshold are shifted to
- Versioning & Rollback:
- Maintain historical versions under
agents/<agent_id>/<version>/for instant rollbacks.
- Maintain historical versions under
🛠️ Provided CLI Tools
| Script | Purpose | Command |
|---|---|---|
scripts/telemetry.py |
Telemetry logging & |
Установить Agent Factory в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Agent Factory?
Autonomous sub-agent factory for OpenClaw: recurring workload detection, sandboxed synthesis, 4D benchmark evaluation vs generalist baseline, dynamic vector routing, and lifecycle drift monitoring.
Как установить скилл Agent Factory?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Agent Factory запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic