| name | agent-lifecycle-manager |
| description | Unified agent lifecycle management for OpenClaw. Provides batch operations (start-all, stop-all, restart-all), rolling restarts for zero downtime, health-based auto-restart, dependency-aware startup sequences, and agent status dashboard. Use when managing agent processes, recovering from failures, or monitoring agent fleet health. |
Agent Lifecycle Manager
When to use this skill
Use this skill when you need to:
- Start, stop, or restart one or more OpenClaw agents
- Perform batch operations across the agent fleet
- Implement rolling restarts for zero-downtime deployments
- Monitor agent health and auto-restart failed agents
- View agent status dashboard
- Manage agent dependencies and startup order
When NOT to use this skill
Do NOT use this skill when:
- You need to modify agent configuration (use
config-validator skill)
- You need to manage LiteLLM or Gateway services (use
gateway-pulse skill)
- You need to deliberate on triad decisions (use
triad-orchestrator skill)
- You need to backup agent state (use
fleet-backup skill)
Inputs required
Before executing, determine:
- Operation type: start, stop, restart, status, or monitor
- Target agents: specific agent IDs or "all"
- Mode: batch, rolling, or single
- Health check enabled: whether to verify health after operations
Workflow
1. Check current agent status
Before any operation, check the current status of agents:
./scripts/lifecycle-manager.sh status
./scripts/lifecycle-manager.sh status --agent <agent-id>
2. Start agents
./scripts/lifecycle-manager.sh start-all
./scripts/lifecycle-manager.sh start --agents steward,alpha,beta
./scripts/lifecycle-manager.sh start --agents <agents> --verify-health
Startup order: Agents are started in dependency order:
- Gateway and infrastructure agents first
- Triad agents (steward, alpha, beta, gamma)
- Worker agents (scout, artisan, guardian)
- Support agents (dreamer, knowledge-ingest)
3. Stop agents
./scripts/lifecycle-manager.sh stop-all
./scripts/lifecycle-manager.sh stop --agents <agent-ids>
./scripts/lifecycle-manager.sh stop --agents <agent-ids> --force
4. Restart agents
./scripts/lifecycle-manager.sh rolling-restart
./scripts/lifecycle-manager.sh restart --agents <agent-ids>
./scripts/lifecycle-manager.sh restart-all
5. Health monitoring
./scripts/lifecycle-manager.sh monitor --auto-restart
./scripts/lifecycle-manager.sh health-check
./scripts/lifecycle-manager.sh health-history
6. Status dashboard
./scripts/lifecycle-manager.sh dashboard
./scripts/lifecycle-manager.sh status --json
./scripts/lifecycle-manager.sh status --watch
Files
Examples
Example 1: Rolling restart for deployment
./scripts/lifecycle-manager.sh rolling-restart --delay 5
Example 2: Auto-restart failed agents
./scripts/lifecycle-manager.sh monitor --auto-restart --interval 30
Example 3: Status dashboard
./scripts/lifecycle-manager.sh dashboard
Troubleshooting
Agent fails to start
- Check agent logs:
docker logs <agent-container>
- Verify configuration:
openclaw config validate
- Check dependencies:
./scripts/lifecycle-manager.sh deps --agent <agent-id>
Rolling restart stuck
- Check which agent is being restarted:
./scripts/lifecycle-manager.sh status
- Verify health endpoint:
curl http://localhost:18789/health
- Force continue:
./scripts/lifecycle-manager.sh rolling-restart --force
Auto-restart not triggering
- Verify monitor is running:
./scripts/lifecycle-manager.sh monitor --status
- Check health check interval:
./scripts/lifecycle-manager.sh config
- Review health history:
./scripts/lifecycle-manager.sh health-history
Gateway Integration
This skill integrates with the OpenClaw Gateway WebSocket RPC on port 18789:
- Agent status is reported via Gateway
- Health checks use Gateway endpoints
- Auto-restart decisions are logged through Gateway
LiteLLM Integration
Agent health checks verify LiteLLM connectivity on port 4000:
- Model availability is checked during agent startup
- Chat completion endpoints are tested
- Token usage is monitored during health checks