# oban_claude v0.4.0 - Table of Contents

> Run Claude Code jobs on an Oban queue: an Oban.Worker over claude_wrapper that maps claude's typed result/error onto Oban return values.

## Pages

- [oban_claude](readme.md)
- [Changelog](changelog.md)

- Guides
  - [Getting started](getting_started.md)
  - [Agent worker patterns](agent_worker_patterns.md)
  - [Agent lifecycle](agent_lifecycle.md)

## Modules

- [ObanClaude](ObanClaude.md): Run a Claude Code job (via [`claude_wrapper`](https://hex.pm/packages/claude_wrapper))
on an Oban queue.
- [ObanClaude.Args](ObanClaude.Args.md): Build a claude job's args map without knowing `claude_wrapper` or the CLI.
- [ObanClaude.Outcome](ObanClaude.Outcome.md): 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`.
- [ObanClaude.Testing](ObanClaude.Testing.md): Build the values a `:query_fun` returns, without knowing `claude_wrapper`'s
struct shapes.
- [ObanClaude.Worker](ObanClaude.Worker.md): Define an Oban worker that runs a claude job.

- Agent lifecycle
  - [ObanClaude.Agent](ObanClaude.Agent.md): A facade over long-lived agent processes whose turns run as Oban jobs.
  - [ObanClaude.Agent.Instance](ObanClaude.Agent.Instance.md): One agent as one `:gen_statem` process, its asynchronous turns run as Oban
jobs. Part of the experimental agent layer (see `ObanClaude.Agent`).
  - [ObanClaude.Agent.Job](ObanClaude.Agent.Job.md): The default Oban worker for agent turns: runs claude, then routes the
outcome back to the owning `ObanClaude.Agent.Instance`.
  - [ObanClaude.Agent.Supervisor](ObanClaude.Agent.Supervisor.md): 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.
  - [ObanClaude.Agent.Tick](ObanClaude.Agent.Tick.md): 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.

## Mix Tasks

- [mix oban_claude](Mix.Tasks.ObanClaude.md): Run claude from the CLI: `mix oban_claude <run|doctor|args>`.
- [mix oban_claude.install](Mix.Tasks.ObanClaude.Install.md): Scaffold a runnable SQLite-backed oban_claude setup.

