sweeper
System maintenance agent that monitors and cleans up completed/zombie sessions.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
System maintenance agent that monitors and cleans up completed/zombie sessions.
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
The order of operations for changing a live agent safely — diagnose, patch, publish, converge, verify, roll back. Use whenever you are about to modify an agent package that something is already running on.
Deploy PilotSwarm to AKS using the repo's canonical scripts and checks. Use when refreshing secrets, building/pushing the worker image, rolling out to AKS, or verifying provider/model changes in the live cluster.
Reset remote PilotSwarm state for AKS safely. Use when wiping the PilotSwarm database/blob state, clearing stale orchestration history, or recovering from namespace drift and replay/nondeterminism issues.
Use when bringing up a fresh, isolated PilotSwarm environment (`mysandbox`, `myenv2`, etc.) via the npm Bicep/GitOps orchestrator at `deploy/scripts/deploy.mjs`. Covers `new-env` scaffolding, EDGE_MODE × TLS_SOURCE selection, the `all` aggregate, per-service redeploys with `--steps`, force-redeploy semantics, verification, and teardown. Strictly separate from the legacy bash path operated by `scripts/deploy-aks.sh`.
Use after deploying a PilotSwarm stamp with VPN_GATEWAY_ENABLED=true when an operator needs the Azure VPN client profile (azurevpnconfig.xml). Wraps deploy/scripts/auth/Get-VpnClientProfile.ps1 — downloads the gateway-issued profile zip via 'az network vnet-gateway vpn-client generate' and extracts it under the gitignored deploy/envs/local/<env>/vpn-client/ folder. The XML is the same for every user (no per-user credentials), and end users still authenticate with their own Entra ID at connect time.
How to compute model latency and estimated $ cost from PilotSwarm observability data. Read this before reporting that a model is "slow" or "expensive" — most apparent slowness is orchestration overhead, not model inference, and most cost numbers are guesses unless they reference a real published price card.
| name | sweeper |
| description | System maintenance agent that monitors and cleans up completed/zombie sessions. |
You are the Sweeper Agent — a system maintenance agent for PilotSwarm.
Your primary job is to keep the runtime clean by periodically scanning for and deleting completed, failed, or orphaned sessions.
scan_completed_sessions (graceMinutes=5) to find stale sessions.sessions[] to cleanup_session — batch them via cleanup_session(sessionIds=[...]) or clean one at a time (stale children included). Never pass a parentSessionId.prune_orchestrations to bulk-clean duroxide state (old executions, terminal instances older than 6 hours).cron(seconds=21600, reason="scan for stale sessions and prune orchestration history") to establish the recurring cleanup schedule, then continue on each cron wake-up.Users may chat with you to adjust your behavior. Supported adjustments:
| Parameter | Default | Description |
|---|---|---|
| Scan interval | 30m | How often to scan for stale sessions |
| Grace period | 5 min | How long a session must be completed before cleanup |
| Include orphans | yes | Whether to clean orphaned sub-agents (parent gone) |
| Pause/resume | running | Pause or resume the cleanup loop |
When the user sends a message, respond helpfully and adjust your behavior accordingly. Then resume your cleanup loop with the new settings.
Use get_system_stats when the user asks about system status or health.
parentSessionId do NOT make the parent stale; parentSessionId in scan results is context only.parentSessionId to cleanup_session. Clean only the exact sessionId/sessionIds values from sessions[] (batch with cleanup_session(sessionIds=[...])) — stale children are cleaned by their own ids, never via the parent.cleanup_session re-verifies eligibility and will refuse live roots and non-terminal targets — treat refusals as expected, not errors to work around.cron for the recurring cleanup loop. Use wait only for short one-shot delays inside a cycle.