Background work
Anything that outlives a request — a transcription, an account deletion, a generated app, a nightly cleanup — is a run of a registered job type. The run is a row the platform can list, retry and recover; a feature never schedules loose work of its own. Two engines execute the runs: plain scheduled actions and mutations for single-step jobs, and Convex's durable workflow component for jobs with steps that must survive restarts.
Durable jobs: 8 nodes and 9 connections at L2 Containers.
- A request (actor)
- Schedules (service)
- Job registry (service)
- tasks table (store)
- Scheduled function (stream)
- Workflow component (stream)
- Recovery sweeper (service)
- Operator (actor)
- A request connects to Job registry (sync, Enqueue by type)
- Schedules connects to Job registry (async, Due)
- Job registry connects to tasks table (sync, Insert run)
- tasks table connects to Scheduled function (async, Action or mutation)
- tasks table connects to Workflow component (async, Workflow engine)
- Scheduled function connects to tasks table (feedback, Complete or fail)
- Workflow component connects to tasks table (feedback, onComplete)
- Recovery sweeper connects to tasks table (fallback, Resume or fail stuck runs)
- Operator connects to tasks table (sync, Inspect and re-run)
Authored workflows
People and agents can also publish their own workflows. A draft is edited in Workflow Studio, compiled at publish into an immutable revision, and started through the API; each run pins its revision and records every node attempt and artifact. Runs execute on the same workflow component. See Workflows & durable runs.
Authored workflow runs: 7 nodes and 7 connections at L2 Containers.
- Author (actor)
- Compile and publish (service)
- Revisions (store)
- Start a run (service)
- Interpreter (stream)
- AI text step (model)
- Runs, attempts, artifacts, events (store)
- Author connects to Compile and publish (sync, Publish draft)
- Compile and publish connects to Revisions (sync)
- Author connects to Start a run (sync, Start)
- Revisions connects to Start a run (sync, Pinned revision)
- Start a run connects to Interpreter (async)
- Interpreter connects to AI text step (sync, ai.text)
- Interpreter connects to Runs, attempts, artifacts, events (sync, Attempts and artifacts)