Node Details

  • Name: End

  • Type: End

  • Version: 2.0

  • Category: Sequential Agents

  • Base Class: End

Parameters

The End node accepts one input parameter:

LabelNameType
Agent | Condition | LLM | Tool NodesequentialNodeAgent | Condition | LLMNode | ToolNode

This parameter represents the preceding node in the sequence, which can be an Agent, a Condition, an LLM (Language Model), or a Tool node.

Input/Output

Input

  • The node requires a predecessor node of type ISeqAgentNode.

  • If no predecessor is provided, an error will be thrown.

Output

  • The node returns an ISeqAgentNode object with the following properties:

    • id: The unique identifier of the node

    • node: Set to the constant END

    • name: Set to the constant END

    • label: Set to the constant END

    • type: Set to ‘end’

    • output: Set to the constant END

    • predecessorAgents: An array containing the input sequential node

Usage

The End node is typically placed at the conclusion of a Sequential Agents workflow. It ensures that the process terminates appropriately and doesn’t continue beyond the intended endpoint.

Implementation Details

  • The node is implemented as a class named End_SeqAgents.

  • It implements the INode interface.

  • The init method is responsible for processing the input and generating the output.

  • The node uses the END constant from the @langchain/langgraph package to signify the termination point.

Documentation

For more detailed information on using the End node in Sequential Agents workflows, refer to the official documentation:

Notes

  • The hideOutput property is set to true, indicating that the node’s output should not be displayed in the user interface.

  • This node is essential for properly structuring and terminating Sequential Agent workflows.