GeezerVison is showing adk.dev — WorkflowNode | ADK for TypeScript: API Reference - v2.5.0
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
Constructors
constructor
-
Type Parameters
- TInput = unknown
- TOutput = unknown
Properties
Readonly[BASE_NODE_SIGNATURE_SYMBOL]
"[BASE_NODE_SIGNATURE_SYMBOL]": true
Brand identifying this object as a BaseNode (see isBaseNode).
Readonlydescription
description: string
Optional ReadonlyinputSchema
Optional ReadonlyisolationScope
isolationScope?: string | true
Readonlyname
name: string
Optional ReadonlyoutputSchema
Optional ReadonlypreparedRetryConfig
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.
ReadonlyrerunOnResume
rerunOnResume: boolean
Optional ReadonlyretryConfig
Optional ReadonlystateSchema
Optional Readonlytimeout
timeout?: number
ReadonlywaitForOutput
waitForOutput: boolean
Accessors
Methods
run
-
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).
Returns AsyncGenerator<Event, void, void>
ProtectedrunImpl
-
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).
Returns AsyncGenerator<unknown, void, void>
Protected AbstractrunNodeImpl
-
Implement node execution logic here. May yield Events, raw values, or
null (normalized by BaseNode.run).
Returns AsyncGenerator<unknown, void, void>
ProtectedtoEvent
-
Normalizes a single yielded item into an Event (or null to skip).
Subclasses may override for richer coercion (e.g. FunctionNode).
Returns Event | null
ProtectedvalidateInput
-
Validates node input against inputSchema (Content passes through). Only
enforced for Zod schemas; a genai Schema is left unvalidated (see
parseWithSchema).
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).
Returns unknown
Constructors
Properties
Accessors
Methods
|