What is a Supervisor?

A supervisor monitors child agents and restarts them when they fail. Inspired by Erlang/OTP supervision trees.

Why Supervisors?

In production, agents crash. Network timeouts, API errors, out-of-memory — failures are inevitable. Supervisors ensure your system recovers automatically.

Without Supervisors

Agent crashes → Nobody notices → System broken

With Supervisors

Agent crashes → Supervisor detects → Agent restarted → System healed

How It Works

  1. You create a supervisor with a restart strategy
  2. You add child agents to the supervisor
  3. The supervisor monitors all children
  4. When a child fails, the supervisor restarts it according to the strategy
# Create supervisor
naos supervisor create main --strategy one-for-one

# Add children
naos supervisor add-child main researcher
naos supervisor add-child main analyzer

# Check status
naos supervisor status main

Supervisor Properties

Property Description
Name Unique identifier
Strategy How to handle failures
Max Restarts Maximum restart attempts
Restart Window Time window for counting restarts
Children List of supervised agents