langchain.js
    Preparing search index...
    interface RunsInvokePayload {
        afterSeconds?: number;
        checkpoint?: Omit<Checkpoint, "thread_id">;
        checkpointDuring?: boolean;
        checkpointId?: string;
        command?: Command;
        config?: Config;
        context?: unknown;
        durability?: Durability;
        ifNotExists?: "reject" | "create";
        input?: null | Record<string, unknown>;
        interruptAfter?: string[] | "*";
        interruptBefore?: string[] | "*";
        metadata?: Metadata;
        multitaskStrategy?: MultitaskStrategy;
        onCompletion?: OnCompletionBehavior;
        onDisconnect?: DisconnectMode;
        onRunCreated?: (params: { run_id: string; thread_id?: string }) => void;
        signal?: AbortSignal;
        webhook?: string;
    }
    Index

    Properties

    afterSeconds?: number

    The number of seconds to wait before starting the run. Use to schedule future runs.

    checkpoint?: Omit<Checkpoint, "thread_id">

    Checkpoint for when creating a new run.

    checkpointDuring?: boolean

    Whether to checkpoint during the run (or only at the end/interruption).

    Use durability instead.

    checkpointId?: string

    Checkpoint ID for when creating a new run.

    command?: Command

    One or more commands to invoke the graph with.

    config?: Config

    Additional configuration for the run.

    context?: unknown

    Static context to add to the assistant.

    Added in LangGraph.js 0.4

    durability?: Durability

    Whether to checkpoint during the run (or only at the end/interruption).

    • "async": Save checkpoint asynchronously while the next step executes (default).
    • "sync": Save checkpoint synchronously before the next step starts.
    • "exit": Save checkpoint only when the graph exits.
    "async"
    
    ifNotExists?: "reject" | "create"

    Behavior if the specified run doesn't exist. Defaults to "reject".

    input?: null | Record<string, unknown>

    Input to the run. Pass null to resume from the current state of the thread.

    interruptAfter?: string[] | "*"

    Interrupt execution after leaving these nodes.

    interruptBefore?: string[] | "*"

    Interrupt execution before entering these nodes.

    metadata?: Metadata

    Metadata for the run.

    multitaskStrategy?: MultitaskStrategy

    Strategy to handle concurrent runs on the same thread. Only relevant if there is a pending/inflight run on the same thread. One of:

    • "reject": Reject the new run.
    • "interrupt": Interrupt the current run, keeping steps completed until now, and start a new one.
    • "rollback": Cancel and delete the existing run, rolling back the thread to the state before it had started, then start the new run.
    • "enqueue": Queue up the new run to start after the current run finishes.
    onCompletion?: OnCompletionBehavior

    Behavior to handle run completion. Only relevant if there is a pending/inflight run on the same thread. One of:

    • "complete": Complete the run.
    • "continue": Continue the run.
    onDisconnect?: DisconnectMode

    Behavior to handle disconnection. Only relevant if there is a pending/inflight run on the same thread. One of:

    • "cancel": Cancel the run.
    • "continue": Continue the run.
    onRunCreated?: (params: { run_id: string; thread_id?: string }) => void

    Callback when a run is created.

    signal?: AbortSignal

    Abort controller signal to cancel the run.

    webhook?: string

    Webhook to call when the run is complete.