ADK for TypeScript: API Reference
    Preparing search index...

    Type Alias WorkflowConfig

    WorkflowConfig: BaseNodeConfig & { maxConcurrency?: number } & (
        | { dynamicEntry?: never; edges: EdgeItem[] }
        | { dynamicEntry: DynamicEntry; edges?: never }
    )

    Configuration for a Workflow.

    A workflow is driven either by a static edges graph or by an imperative dynamicEntry function — exactly one is required, and the two are mutually exclusive. The type is a discriminated union so that constraint is enforced at compile time (the runtime constructor keeps the equivalent throws for JS callers).

    Type Declaration

    • OptionalmaxConcurrency?: number

      Maximum number of graph-scheduled nodes running in parallel. undefined means unlimited; must be a positive integer otherwise. Does not throttle dynamic (ctx.runNode) children.

    • { dynamicEntry?: never; edges: EdgeItem[] }
      • OptionaldynamicEntry?: never
      • edges: EdgeItem[]

        Edge definitions used to build the workflow graph.

    • { dynamicEntry: DynamicEntry; edges?: never }
      • dynamicEntry: DynamicEntry

        An imperative entry function driving execution via ctx.runNode(...). Mutually exclusive with edges.

      • Optionaledges?: never