LangGraph.js API Reference
    Preparing search index...

    Interface LangGraphRunnableConfig<ContextType>

    interface LangGraphRunnableConfig<
        ContextType extends Record<string, any> = Record<string, any>,
    > {
        callbacks?: Callbacks;
        configurable?: ContextType;
        context?: ContextType;
        interrupt?: (value: unknown) => unknown;
        maxConcurrency?: number;
        metadata?: Record<string, unknown>;
        recursionLimit?: number;
        runId?: string;
        runName?: string;
        signal?: AbortSignal;
        store?: BaseStore;
        tags?: string[];
        timeout?: number;
        writer?: (chunk: unknown) => void;
    }

    Type Parameters

    • ContextType extends Record<string, any> = Record<string, any>

    Hierarchy

    Index

    Properties

    callbacks?: Callbacks

    Callbacks for this call and any sub-calls (eg. a Chain calling an LLM). Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.

    configurable?: ContextType

    Runtime values for attributes previously made configurable on this Runnable, or sub-Runnables.

    context?: ContextType

    User provided context

    interrupt?: (value: unknown) => unknown

    Interrupts the execution of a graph node.

    This function can be used to pause execution of a node, and return the value of the resume input when the graph is re-invoked using Command. Multiple interrupts can be called within a single node, and each will be handled sequentially.

    When an interrupt is called:

    1. If there's a resume value available (from a previous Command), it returns that value.
    2. Otherwise, it throws a GraphInterrupt with the provided value
    3. The graph can be resumed by passing a Command with a resume value

    Because the interrupt function propagates by throwing a special GraphInterrupt error, you should avoid using try/catch blocks around the interrupt function, or if you do, ensure that the GraphInterrupt error is thrown again within your catch block.

    Type Declaration

      • (value: unknown): unknown
      • Parameters

        • value: unknown

          The value to include in the interrupt.

        Returns unknown

        The resume value provided when the graph is re-invoked with a Command.

    maxConcurrency?: number

    Maximum number of parallel calls to make.

    metadata?: Record<string, unknown>

    Metadata for this call and any sub-calls (eg. a Chain calling an LLM). Keys should be strings, values should be JSON-serializable.

    recursionLimit?: number

    Maximum number of times a call can recurse. If not provided, defaults to 25.

    runId?: string

    Unique identifier for the tracer run for this call. If not provided, a new UUID will be generated.

    runName?: string

    Name for the tracer run for this call. Defaults to the name of the class.

    signal?: AbortSignal

    Abort signal for this call. If provided, the call will be aborted when the signal is aborted.

    store?: BaseStore

    Persistent key-value store

    tags?: string[]

    Tags for this call and any sub-calls (eg. a Chain calling an LLM). You can use these to filter calls.

    timeout?: number

    Timeout for this call in milliseconds.

    writer?: (chunk: unknown) => void

    Callback to send custom data chunks via the custom stream mode