Function workflow

  • Create a new WorkflowBuilder with the given human-readable name.

    Parameters

    • name: string

      Display name embedded in the compiled CompiledExecutionGraph.

    Returns WorkflowBuilder

    A fresh WorkflowBuilder instance.

    Example

    const wf = workflow('my-pipeline')
    .input(z.object({ query: z.string() }))
    .returns(z.object({ answer: z.string() }))
    .step('search', { tool: 'web_search' })
    .step('answer', { gmi: { instructions: 'Answer the question.' } })
    .compile();