# Function compilePipelineGraph

- compilePipelineGraph(
  template: PipelineTemplate,
  stages: StageRegistry,
  ): PipelineGraphResult

  Compile a pipeline template + stages into an executable graph.

  Each IPipelineStage is wrapped as a GraphBuilder node handler. Linear edges are auto-generated from template.stages order. Custom edges override the linear flow for feedback loops.

  #### Parameters

  - template: PipelineTemplate
  - stages: StageRegistry

  #### Returns PipelineGraphResult

  - Defined in packages/nexus-agents/src/pipeline/pipeline-graph.ts:44