AGENT SKILL

anvil-serving-workbench

Operate anvil-serving from an agent harness using MCP/controller-backed playbooks, CLI fallbacks, and sub-agent evidence packets. Use when asked to inspect Anvil Serving status, choose models, run preflight or benchmarks, sync OpenClaw/Codex/Claude Code workbench config, collect promotion evidence, or coordinate small-model sub-agents for anvil-serving operations.

License 许可
MIT
最近更新
2026-11-14
Stars
★ 1
Forks
0

01 前言 Front Matter

name
anvil-serving-workbench
description
Operate anvil-serving from an agent harness using MCP/controller-backed playbooks, CLI fallbacks, and sub-agent evidence packets. Use when asked to inspect Anvil Serving status, choose models, run preflight or benchmarks, sync OpenClaw/Codex/Claude Code workbench config, collect promotion evidence, or coordinate small-model sub-agents for anvil-serving operations.

03 SKILL.md 正文

Anvil Serving Workbench

Use this skill as the safe entry point for operating anvil-serving from a large language model workbench. It chooses documented playbooks, prefers structured MCP/controller tools, and returns auditable evidence instead of ad hoc shell narration.

Start Here

  1. Read README.md, CLAUDE.md, and docs/OPERATOR-SKILLS-AND-SUBAGENTS.md before changing behavior or running operational commands.
  2. List or inspect available MCP tools first. Use operation_contracts before topology-aware or controller-backed work so the selected CLI operation, target context, transport, and MCP wrapper agree. Use the grouped catalog below rather than relying on a memorized subset. If the repo-scoped MCP server is unavailable, report that loss of controller coverage explicitly.
  3. Use documented anvil-serving CLI verbs only when an MCP wrapper is missing. Safe fallbacks are read-only or preview-first verbs such as eval usage, models sync, models recipes, models score, harness sync openclaw --out -, and other render/inspect commands. Return the command preview and mark the missing wrapper as a product gap. Before using a CLI fallback, verify that it resolves to this checkout or the intended installed version; do not imply that an unverified fallback is controller-backed.
  4. Use 127.0.0.1 in local URLs. Do not introduce localhost. For resource-owned commands, pass the deployed topology and declare the actual command host/runtime; do not infer command identity from the target.
  5. For OpenClaw Talk / Anvil Voice work, record the command host before interpreting loopback. Reference deployment: Companion Node runs OpenClaw Gateway plus Anvil Voice Realtime/proxy and reserves its 16 GB RAM for OpenClaw, Claude Code, and Codex. Do not run STT/TTS/LLM model serves on Mini for reference testing. Primary Node owns the router, candidate serves, and STT/TTS model endpoints. Prefer dark-audio or mini-dark-audio-proxy for OpenClaw Talk; mini-audio is an explicit optional same-host/local-audio mode only. A non-gateway checkout failing to reach Mini proxy loopback is topology evidence, not proof the live Mini/Dark path is down.
  6. Pass credentials by environment variable name only. Never place literal keys in configs, fixtures, packets, logs, or prompts.

MCP Tool Map

  • Gateway: router_status, router_fleet_status, router_config_export, router_logs, router_manage, router_transition, router_configuration, runtime_experiment, and decision_summary.
  • Serves and residency: serves_status, reservation_status, serves_manage, serves_mode, serves_logs, serves_probe, serves_profile, and serves_promote.
  • Managed media worker: media_worker_prepare, media_worker_status, media_worker_logs, and media_worker_teardown. Lifecycle mutations retain the managed-serve dry-run, confirmation, and human-approval gates.
  • Caller media: media_capabilities, media_workflow_list, media_workflow_show, media_workflow_validate, media_workflow_prepare, media_workflow_run, media_job_status, media_job_cancel, and media_artifact_inspect.
  • Voice: voice_manage and voice_proxy_manage.
  • Host, models, and telemetry: doctor_summary, host_summary, gpu_inventory, host_shared_memory, operator_config_inventory, operator_config_export, observability_collect, host_manage, host_services_status, host_services_discover, host_services_capabilities, host_services_logs, host_services_manage, container_exec, models_inventory, recipe_containers, recipe_settings, recipe_manage, model_cache_inventory, and cache_prune_plan.
  • Harness: openclaw_sync, client_catalog_sync, routed_eval, hermes_media_sync, openclaw_gateway_status, and openclaw_gateway_restart.
  • Propagation: propagation_capabilities reports scoped owner operations. The default controller has no execution profile. A constructor-bound service exposes approved admission, dispatch and bounded fleet operations; inspect each operation's availability and required scope before use. See docs/PROPAGATION-NATIVE-WRITES.md for the controlled integration boundary.
  • Evaluation and evidence: preflight_probe, benchmark_probe, benchmark_artifact, benchmark_harness_prepare, benchmark_harness_status, benchmark_harness_cleanup, benchmark_job_preflight, benchmark_job_submit, benchmark_job_status, benchmark_job_list, benchmark_job_logs, benchmark_job_cancel, benchmark_job_artifact, workflow_packet_validate, external_bench_sources, external_bench_list, external_bench_report, and external_bench_compare.
  • Transport discovery: operation_contracts.
  • Controller diagnostics: controller_inspect and controller_logs return bounded metadata for one explicitly selected Docker controller, never raw log messages. The Docker log tail is 1..200 lines (default 100), and projection returns at most 200 allowlisted events.

benchmark_probe and benchmark_artifact are bounded capacity tools. The benchmark_job_* tools provide durable context, agentic, and SWE job control; they do not make a job's grader independent or authorize model promotion.

Gates

Stop for a human gate before changing the active direct alias, applying a serve promotion, destructive cache pruning, host repair, Docker/WSL restart, public or non-loopback bind, or any operation that would persist a new serving target.

serves_promote and live serves_mode enter/leave have the same three-part gate: confirm=true, dry_run=false, and human_approved=true. host_manage and mutating router_transition actions remain human-gated even though their MCP schemas support preview and confirmation.

Never self-verify. The model that generated a candidate output cannot be the critic or judge that validates it.

Do not write Anvil state.db directly. If Anvil task entry is requested, use the supported Anvil CLI or MCP path; if it is unavailable, report the blocker.

Playbook Selection

  • Controller diagnosis: use controller_inspect and controller_logs through the declared controller when reachable. When that transport is unavailable, use the verified local anvil-serving controller inspect --container NAME and anvil-serving controller logs --container NAME --tail 20 on its owning host; this read-only fallback also applies when a remote MCP wrapper exists but cannot be reached. Do not substitute SSH or another controller. Native services and macOS-local diagnostics are unsupported in this version. Configured bindings are not observed publication, and diagnostic state=ok proves neither endpoint node/build identity nor deployment acceptance. Diagnostics grant no repair, restart, route or promotion authority.
  • Readiness: inspect operation_contracts, router_status, router_fleet_status, serves_status, reservation_status, doctor_summary, host_summary, gpu_inventory, models_inventory, and configured endpoint status. Use observability_collect only for bounded declared capabilities.
  • Model catalog: read or sync model inventory and use external_bench_sources, external_bench_list, external_bench_report, or external_bench_compare for benchmark priors. Keep those priors advisory-only. Use models recipes list/show to inspect recorded configurations and recipe_containers or models recipes running to discover label-owned loaded containers without registry dependence. Create or revise candidates through models recipes create/update, review the rendered recipe, and use models recipes load only with an exact container plus its documented confirmation gate. Use models recipes delete only for an exact reviewed registry entry. Run models pull only after an explicit network, disk, and target-volume gate.
  • Serve swap: inspect reservation_status, then preview lifecycle work with serves_manage, an exclusive TP=2 transaction with serves_mode, or a named transaction with serves_promote. The newer role-based recipe flow is anvil-serving serves switch ROLE [MODEL]; it is CLI-only, so return its preview and name the missing MCP wrapper. Require an exact target and the documented confirmation gate before apply, then run preflight before either capacity or quality benchmarks.
  • Voice lifecycle: preview audio with voice_manage and the persistent Realtime proxy with voice_proxy_manage; live lifecycle changes on the owning host require confirm=true plus dry_run=false. Profile selection is topology selection: for reference OpenClaw Talk and candidate benchmarks, keep Mini model-free and select Dark-host audio or a Mini-side proxy to Dark. Use mini-audio only when explicitly testing the optional same-host/local-audio mode.
  • Harness sync: preview OpenClaw provider, skill, and agent config with openclaw_sync; apply only to an explicit out/gateway_host target and preserve operator-owned keys. Use client_catalog_sync to reconcile local OpenClaw and Pi context/output limits from the router's authenticated status and capability endpoints; preview first, preserve compaction/auth keys, and require confirmation before writing. Use hermes_media_sync to install the narrow media MCP catalog and packaged Hermes skill; keep credentials as environment references and verify a second preview is empty. Use routed_eval on the client-owning host, locally or through its declared controller, for fail-closed router identity plus real OpenClaw/Hermes acceptance; do not substitute a response from another host's clients.
  • Router operations: use router_status, router_fleet_status, bounded router_logs, router_manage, router_transition, and decision_summary; lifecycle and tier-transition mutation is preview-first and live only with confirm=true plus dry_run=false.
  • Evaluation: before model validation or comparison, load skills/anvil-serving-llm-qualification/references/evidence-contract.md and skills/anvil-serving-benchmark-docs/SKILL.md. Declare the test scope and freeze the required serving-metrics matrix before requests. A focused smoke check must identify its limited scope; a full comparison requires verified coverage of the frozen matrix. Preserve quality failures separately from safe performance measurements and report every unmeasured metric. Use preflight_probe with the model family's declared thinking mode, reasoning effort/evidence expectation, visible-answer budget, reasoning headroom, and allowed finish reasons. Use benchmark_probe or benchmark_artifact for capacity only. For quality, run anvil-serving eval benchmark quality with repeated attempts and preserve visible output, reasoning-channel evidence, finish reasons, separate visible and reasoning budgets, provenance, and per-attempt failure classification. Do not rank or promote from an older one-shot score that lacks that evidence.
  • Promotion evidence: assemble status, gateway probes, preflight, benchmark artifacts, serve/direct-alias config diffs, and reviewer recommendation with promoted=false.
  • OpenClaw COLO smoke/eval: when validating the Mini-to-Dark path or gathering release/blog evidence, use examples/openclaw/colo_smoke.py --live; add --run-generations --run-interaction-benchmark for repeatable intent stats. Preserve the artifact's interaction_benchmarks and recipe fields. Treat generation caps, exact/stream benchmark caps, benchmark reasoning effort, and endpoint overrides as serve/model-recipe settings, not skill or plugin constants.
  • Host/cache work: use host_summary, gpu_inventory, host_shared_memory, and cache_prune_plan for read-only checks and plans. Use host_manage only for an exact reviewed repair after its human gate. Report Docker/WSL restart, WSL config edits, and cache deletion as blocked or human_required unless the human approves the existing gate; MCP cache pruning is plan-only. host_summary also reports the persistent host.toml WSL cache-reclaim policy. When enabled, confirmed model pulls and managed model-load boundaries inherit one disclosed, readiness-aware, warning-only page-cache postcondition; do not add a second manual reclaim after a reclaimed result. Ad-hoc Compose, voice, request-time ComfyUI loads, and the request-triggered multiplexer remain outside that policy. Treat changing the persistent opt-in as a reviewed host mutation.
  • Host-supervised service work: use host_services_status, host_services_discover, host_services_capabilities, and bounded host_services_logs before host_services_manage. Adopt only an exact launchd or Anvil-owned Docker identity. Mutating service actions stay previews until dry_run=false and confirm=true; never use raw supervisor commands. Keep manager and engine separate, retain Parakeet/Kokoro LaunchAgent entries as legacy, and use a qualified model-lifecycle or recipe workflow for any model migration. Docker model bindings require their owning model declaration and manifest path; native model bindings require memory_mib and preserve the 4 GiB host reserve.
  • Public/private config work: use operator_config_inventory first for metadata-only classification and dependency closure. Use operator_config_export only for the resulting safe versionable files and allowlisted, redacted Anvil-owned gateway fragment. Preserve its refusal on symlinks, unsupported YAML export, outside-root or missing dependencies, unsafe secret fields, and oversized files; never replace it with raw remote filesystem access. When a whole-home export is blocked by YAML, use the inventory and an explicit bounded paths selection for only the required supported files; every selected file's direct dependency closure is still mandatory.

Model Benchmark Source Freshness

When researching Fast or Heavy tier candidates, include dates in the evidence. Treat serving posts, community recipes, benchmark tables, and issue threads as time-sensitive.

  • Classify sources as current at 0-60 days, aging at 61-120 days, and stale after 120 days, when undated, or when tied to a materially older engine, driver, CUDA, quantization, or checkpoint generation.
  • Prefer current official model cards, vendor release notes, and vLLM, SGLang, llama.cpp, NVIDIA, or model-owner documentation and issues.
  • Treat Reddit, forum posts, and community benchmarks as recipe discovery, not promotion evidence. Label aging or stale hardware-matched posts as historical priors and require a current official source or local benchmark.
  • Record candidate, URL, published or observed date, age class, evidence type, hardware/engine relevance, and decision impact.
  • Never let stale community evidence justify a shortlist, serve swap, or promotion by itself. Local preflight, benchmarks, independent quality eval, and the human gate remain required.

Sub-Agents

Use small/local models for inventory scout, serve-config reviewer, preflight runner, benchmark runner, and evidence reporter roles. Use a stronger independent model for quality critic or adversarial review. Keep role outputs bounded: facts, tool calls, artifacts, recommendations, and blockers.

Result Packet

Return an operator-workflow/v1 packet with schema_version, request, gate_state, targets, tools_used, artifacts, advisory_priors, recommendation, human_gate_required, and promoted. Each tools_used entry must include source_class, ok, dry_run, confirmed, target, and error. Allowed recommendations are promote, do_not_promote, needs_more_data, and blocked. Allowed gate_state values are not_required, confirm_required, human_required, and blocked. Validate final packets with workflow_packet_validate when the MCP/control-plane tool is available. That validator checks packet shape, gate consistency, evidence scope, and bounded paths; it does not prove evidence sufficiency or reviewer independence. An independent critic must still reject promotion when the underlying evidence is missing or self-generated.

04 同仓库更多 Skills