Stopping Agents
Stop an Agent
bash
naos stop researcher
# Output:
# ✓ Stopping agent: researcher
# ✓ Agent stopped gracefullyForce Stop
If an agent doesn't respond to graceful shutdown:
bash
naos stop researcher --force
# Output:
# ✓ Force stopping agent: researcher
# ✓ WASM instance terminatedStop All Agents
bash
naos stop --all
# Output:
# ✓ Stopping researcher
# ✓ Stopping analyzer
# ✓ 2 agents stoppedGraceful Shutdown
By default, naos stop sends a shutdown signal and waits up to 30 seconds:
- Agent receives shutdown signal
- Agent completes current task (if any)
- Agent saves state
- Agent exits
If the agent doesn't exit within 30 seconds, it's force-terminated.
Stop vs. Kill
| Command | Behavior |
|---|---|
naos stop | Graceful shutdown, waits 30s |
naos stop --force | Immediate termination |
Supervisor Interaction
If an agent is supervised, stopping it may trigger a restart:
bash
# Stop without supervisor restart
naos stop researcher --no-restart
# Stop and let supervisor decide
naos stop researcher