GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • ADK for TypeScript: API Reference

This view

  • Original page
  • New address

GeezerVison is showing adk.dev — WorkflowNode | ADK for TypeScript: API Reference - v2.5.0

  • WorkflowNode

Class WorkflowNode<TInput, TOutput>Abstract

A base class designed for subclassing. Implement runNodeImpl to provide node logic; subclasses inherit the schema/retry/timeout machinery of BaseNode.

Named WorkflowNode (not Node) to read consistently with Workflow and WorkflowConfig, and to avoid shadowing the DOM / @types/node Node global in the flat @google/adk namespace. The node() factory remains the ergonomic way to wrap a function/tool/agent.

Mirrors google/adk-python workflow/_node.py::Node. The parallel_worker capability is added in Phase 6.

Type Parameters

  • TInput = unknown
  • TOutput = unknown

Hierarchy (View Summary)

  • BaseNode<TInput, TOutput>
    • WorkflowNode
  • Defined in core/src/workflow/node.ts:49

Constructors

constructor

  • new WorkflowNode<TInput = unknown, TOutput = unknown>(
        config: BaseNodeConfig,
    ): WorkflowNode<TInput, TOutput>

    Type Parameters

    • TInput = unknown
    • TOutput = unknown

    Parameters

    • config: BaseNodeConfig

    Returns WorkflowNode<TInput, TOutput>

    Inherited from BaseNode.constructor

    • Defined in core/src/workflow/base_node.ts:107

Properties

Readonly[BASE_NODE_SIGNATURE_SYMBOL]

"[BASE_NODE_SIGNATURE_SYMBOL]": true

Brand identifying this object as a BaseNode (see isBaseNode).

Inherited from BaseNode.[BASE_NODE_SIGNATURE_SYMBOL]

  • Defined in core/src/workflow/base_node.ts:88

Readonlydescription

description: string

Inherited from BaseNode.description

  • Defined in core/src/workflow/base_node.ts:91

Optional ReadonlyinputSchema

inputSchema?: SchemaLike

Inherited from BaseNode.inputSchema

  • Defined in core/src/workflow/base_node.ts:102

Optional ReadonlyisolationScope

isolationScope?: string | true

Inherited from BaseNode.isolationScope

  • Defined in core/src/workflow/base_node.ts:105

Readonlyname

name: string

Inherited from BaseNode.name

  • Defined in core/src/workflow/base_node.ts:90

Optional ReadonlyoutputSchema

outputSchema?: SchemaLike

Inherited from BaseNode.outputSchema

  • Defined in core/src/workflow/base_node.ts:103

Optional ReadonlypreparedRetryConfig

preparedRetryConfig?: PreparedRetryConfig

The retry config with its exception filter normalized once, up front (see prepareRetryConfig). Used by the node runner so the retry hot path never re-normalizes or throws on a malformed config mid-retry.

Inherited from BaseNode.preparedRetryConfig

  • Defined in core/src/workflow/base_node.ts:100

ReadonlyrerunOnResume

rerunOnResume: boolean

Inherited from BaseNode.rerunOnResume

  • Defined in core/src/workflow/base_node.ts:92

Optional ReadonlyretryConfig

retryConfig?: RetryConfig

Inherited from BaseNode.retryConfig

  • Defined in core/src/workflow/base_node.ts:94

Optional ReadonlystateSchema

stateSchema?: SchemaLike

Inherited from BaseNode.stateSchema

  • Defined in core/src/workflow/base_node.ts:104

Optional Readonlytimeout

timeout?: number

Inherited from BaseNode.timeout

  • Defined in core/src/workflow/base_node.ts:101

ReadonlywaitForOutput

waitForOutput: boolean

Inherited from BaseNode.waitForOutput

  • Defined in core/src/workflow/base_node.ts:93

Accessors

requiresAllPredecessors

  • get requiresAllPredecessors(): boolean

    Whether this node must wait for ALL of its predecessors to trigger before it runs (fan-in barrier). Overridden by JoinNode.

    Returns boolean

    Inherited from BaseNode.requiresAllPredecessors

    • Defined in core/src/workflow/base_node.ts:134

Methods

run

  • run(ctx: NodeContext, input: TInput): AsyncGenerator<Event, void, void>

    Runs the node, normalizing every yielded item into an Event. This is what the engine (and ctx.runNode()) consumes. Validates the input against inputSchema once, up front (skipping genai Content, which nodes coerce themselves).

    Parameters

    • ctx: NodeContext
    • input: TInput

    Returns AsyncGenerator<Event, void, void>

    Inherited from BaseNode.run

    • Defined in core/src/workflow/base_node.ts:155

ProtectedrunImpl

  • runImpl(ctx: NodeContext, input: TInput): AsyncGenerator<unknown, void, void>

    Core execution contract. Subclasses yield one of:

    • an Event (emitted as-is),
    • a raw value (boxed into an event whose output is that value),
    • null/undefined (skipped).

    Parameters

    • ctx: NodeContext
    • input: TInput

    Returns AsyncGenerator<unknown, void, void>

    Overrides BaseNode.runImpl

    • Defined in core/src/workflow/node.ts:62

Protected AbstractrunNodeImpl

  • runNodeImpl(
        ctx: NodeContext,
        input: TInput,
    ): AsyncGenerator<unknown, void, void>

    Implement node execution logic here. May yield Events, raw values, or null (normalized by BaseNode.run).

    Parameters

    • ctx: NodeContext
    • input: TInput

    Returns AsyncGenerator<unknown, void, void>

    • Defined in core/src/workflow/node.ts:57

ProtectedtoEvent

  • toEvent(ctx: NodeContext, data: unknown): Event | null

    Normalizes a single yielded item into an Event (or null to skip). Subclasses may override for richer coercion (e.g. FunctionNode).

    Parameters

    • ctx: NodeContext
    • data: unknown

    Returns Event | null

    Inherited from BaseNode.toEvent

    • Defined in core/src/workflow/base_node.ts:217

ProtectedvalidateInput

  • validateInput(input: TInput): TInput

    Validates node input against inputSchema (Content passes through). Only enforced for Zod schemas; a genai Schema is left unvalidated (see parseWithSchema).

    Parameters

    • input: TInput

    Returns TInput

    Inherited from BaseNode.validateInput

    • Defined in core/src/workflow/base_node.ts:178

ProtectedvalidateOutput

  • validateOutput(output: unknown): unknown

    Validates node output against outputSchema (Content passes through). Only enforced for Zod schemas; a genai Schema is left unvalidated (see parseWithSchema).

    Parameters

    • output: unknown

    Returns unknown

    Inherited from BaseNode.validateOutput

    • Defined in core/src/workflow/base_node.ts:198
Constructors
constructor
Properties
[BASE_NODE_SIGNATURE_SYMBOL]descriptioninputSchemaisolationScopenameoutputSchemapreparedRetryConfigrerunOnResumeretryConfigstateSchematimeoutwaitForOutput
Accessors
requiresAllPredecessors
Methods
runrunImplrunNodeImpltoEventvalidateInputvalidateOutput
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.