ObanClaude.Agent.Supervisor (oban_claude v0.4.0)

Copy Markdown View Source

The supervision root for the agent lifecycle spike: a Registry (tracking agent_id -> current state) plus a DynamicSupervisor that owns the ObanClaude.Agent.Instance processes.

The library starts no daemon by itself; a host app opts in by adding this to its tree (after its Oban instance, so agents can enqueue):

children = [
  MyApp.Repo,
  {Oban, Application.fetch_env!(:my_app, Oban)},
  ObanClaude.Agent.Supervisor
]

The strategy is :rest_for_one with the registry first: instances register through the registry at startup, so it must always be up before (and outlive a restart of) the instance supervisor.

Summary

Functions

Returns a specification to start this module under a supervisor.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])