For AI agents: the complete documentation index is available at /hclapi/llms.txt, the full documentation bundle is available at /hclapi/llms-full.txt, and this page is available as Markdown at /hclapi/docs/concepts/pipelines.md.

Pipelines and steps

A pipeline is an ordered sequence of steps declared inside an endpoint block. Each step performs one unit of work and writes its result into the execution context for subsequent steps to read.

StepFunctionExported outputs
sqlParameterized database queries and mutationsrows, row, rows_affected
redisCache reads, writes, deletions, countersvalue
starlarkSandboxed data transformationresult
goInvokes a registered native Go functionresult
transactionAtomic multi-statement SQL executionNested SQL outputs
parallelConcurrent branch executionNested branch outputs
respondTerminates the pipelineNone

Step execution rules

Unique step labels

Every step except respond and parallel requires a unique name. The label defines the namespace under steps.<name>.

Read-only context history

A step may read outputs written by prior steps, but cannot modify prior outputs or mutate ctx.request.

Fail-fast errors

An unhandled error in any step immediately halts the pipeline and triggers the error handler.

Early termination

Execution stops at the first respond whose condition evaluates to true, or at the first unconditional respond.