# `MingaAgent.Supervisor`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_agent/supervisor.ex#L1)

DynamicSupervisor for AI agent session processes.

Each agent session (and its provider) runs under this supervisor with
`:one_for_one` strategy. A crash in one agent session is completely
isolated from the editor, buffers, and other agent sessions.

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `sessions`

```elixir
@spec sessions() :: [pid()]
```

Lists all running agent session pids.

# `start_link`

```elixir
@spec start_link(keyword()) :: Supervisor.on_start()
```

Starts the agent supervisor.

# `start_session`

```elixir
@spec start_session(keyword()) :: DynamicSupervisor.on_start_child()
```

Starts a new agent session under this supervisor.

# `stop_session`

```elixir
@spec stop_session(pid()) :: :ok | {:error, :not_found}
```

Stops a running agent session.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
