Stopping Agents

Stop an Agent

bash
naos stop researcher

# Output:
# ✓ Stopping agent: researcher
# ✓ Agent stopped gracefully

Force Stop

If an agent doesn't respond to graceful shutdown:

bash
naos stop researcher --force

# Output:
# ✓ Force stopping agent: researcher
# ✓ WASM instance terminated

Stop All Agents

bash
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:

  1. Agent receives shutdown signal
  2. Agent completes current task (if any)
  3. Agent saves state
  4. Agent exits

If the agent doesn't exit within 30 seconds, it's force-terminated.

Stop vs. Kill

CommandBehavior
naos stopGraceful shutdown, waits 30s
naos stop --forceImmediate 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