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

    Class FunctionNode<TInput, TOutput>

    A node that wraps a plain function, async function, or (sync/async) generator.

    Ported (TS-idiomatic subset) from google/adk-python _function_node.py. Return-value handling:

    • Event → emitted as-is (output validated against outputSchema)
    • genai Content → emitted as the event content
    • null/undefined → skipped (unless there are pending state deltas)
    • anything else → emitted as Event(output=value) State written via ctx.state during execution is attached to emitted events.

    Type Parameters

    • TInput = unknown
    • TOutput = unknown

    Hierarchy (View Summary)

    Constructors

    Properties

    "[BASE_NODE_SIGNATURE_SYMBOL]": true

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

    authConfig?: AuthConfig
    description: string
    inputSchema?: SchemaLike
    isolationScope?: string | true
    name: string
    outputSchema?: SchemaLike
    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.

    rerunOnResume: boolean
    retryConfig?: RetryConfig
    stateSchema?: SchemaLike
    timeout?: number
    waitForOutput: boolean

    Accessors

    • 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

    Methods

    • 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