langchain.js
    Preparing search index...

    Interface BuiltInState<TMessageStructure>

    interface BuiltInState<TMessageStructure extends BaseMessage = BaseMessage> {
        __interrupt__?: Interrupt<unknown>[];
        jumpTo?: "tools" | "model" | "end";
        messages: BaseMessage<TMessageStructure>[];
    }

    Type Parameters

    Index

    Properties

    __interrupt__?: Interrupt<unknown>[]
    jumpTo?: "tools" | "model" | "end"

    Optional property to control routing after afterModel middleware execution. When set by middleware, the agent will jump to the specified node instead of following normal routing logic. The property is automatically cleared after use.

    • "model_request": Jump back to the model for another LLM call
    • "tools": Jump to tool execution (requires tools to be available)
    messages: BaseMessage<TMessageStructure>[]