---
title: "What is a Supervisor?"
description: "A supervisor monitors child agents and restarts them when they fail. Inspired by Erlang/OTP supervision trees. In production, agents crash. Network timeouts, API errors, out of memory — failures are inevitable. Superviso"
resource: https://www.aiagents.nexus/docs/manual/supervisors/what-is-a-supervisor
generated: { by: "process:nexus-agent-assets", at: 2026-09-07T09:13:03Z }
status: stable
---

# 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

```bash
# 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 |
