API Reference oban_claude v#0.4.0

Copy Markdown View Source

Modules

Run a Claude Code job (via claude_wrapper) on an Oban queue.

A facade over long-lived agent processes whose turns run as Oban jobs.

One agent as one :gen_statem process, its asynchronous turns run as Oban jobs. Part of the experimental agent layer (see ObanClaude.Agent).

The default Oban worker for agent turns: runs claude, then routes the outcome back to the owning ObanClaude.Agent.Instance.

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 adapter between Oban.Plugins.Cron (which schedules at the worker layer) and the agent state machine (which owns turn enqueueing): a scheduled tick delivers a prompt to an agent through the facade, never a claude job behind the machine's back.

Build a claude job's args map without knowing claude_wrapper or the CLI.

The default mapping from claude_wrapper's typed result/error onto Oban's return values. Override per-worker with use ObanClaude.Worker, classifier: &MyMod.classify/1.

Build the values a :query_fun returns, without knowing claude_wrapper's struct shapes.

Define an Oban worker that runs a claude job.

Mix Tasks

Run claude from the CLI: mix oban_claude <run|doctor|args>.

Scaffold a runnable SQLite-backed oban_claude setup.