Stopping Agents
Stop an Agent
naos stop researcher
# Output:
# ✓ Stopping agent: researcher
# ✓ Agent stopped gracefully
Force Stop
If an agent doesn't respond to graceful shutdown:
naos stop researcher --force
# Output:
# ✓ Force stopping agent: researcher
# ✓ WASM instance terminated
Stop All Agents
naos stop --all
# Output:
# ✓ Stopping researcher
# ✓ Stopping analyzer
# ✓ 2 agents stopped
Graceful 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:
# Stop without supervisor restart
naos stop researcher --no-restart
# Stop and let supervisor decide
naos stop researcher