Spawn one container, return exit code and files.
The execution primitive. Domain-agnostic, zero orchestration. The bottom of the stack.
A DAG workflow engine on top of light-run. Define nodes (containers) and links (data + conditions); light-process runs the graph with fan-out, cycles, retries and schema-validated outputs.
A node is an image + entrypoint with an optional input/output JSON Schema. It runs on light-run, reads its input on stdin, and writes its result to a known file. Any language, any image.
A link carries one node's output into the next, optionally gated by a condition (equality, comparison, exists, regex, and/or). Merge several parents into one child. Inject static data along the way.
Entry nodes run in parallel batches. Back-links create loops bounded by maxIterations. A node failure stops the run with a structured error. Cancellation propagates an AbortSignal down to the container.
Declare networkDefs to provision per-run Docker networks, and services (e.g. a proxy holding an API key) that run alongside the DAG. A node reaches a service by hostname without the secret ever entering it.
execute, and your graph runs.Build a workflow in the SDK (or as workflow.json), point it at a light-run instance with LIGHT_RUN_URL, and execute.
Run it from code, the CLI, or the HTTP control plane.
npm install light-processimport { Workflow, LightRunClient } from 'light-process'; const wf = new Workflow({ name: 'pipeline' }); wf.addNode({ id: 'fetch', image: 'node:24-alpine', entrypoint: 'node fetch.js' }); wf.addNode({ id: 'parse', image: 'python:3.12-alpine', entrypoint: 'python parse.py' }); wf.addLink({ from: 'fetch', to: 'parse', when: { ok: true } }); const result = await wf.execute({ url: '...' }, { runner: new LightRunClient() }); result.success // true if every node exited 0 result.results // per-node output, validated against each schema
networkDefs are created before the DAG and torn down after, named per run. Two concurrent runs get isolated networks; bare names are never deleted.maxIterations; a cycle without it is rejected at build time. Runaway graphs cannot spin forever.The execution primitive. Domain-agnostic, zero orchestration. The bottom of the stack.
POST code, run it in a container, fetch artifacts. Stateless wrapper. light-process talks to it over HTTP.
When one container is not enough. Composes runs into pipelines with conditions, concurrency, run-scoped networks, sidecars, and structured outputs.