The End node is a crucial component in the Sequential Agents workflow. It signifies the termination point of a conversation or process flow. This node is used to explicitly define where a sequence of operations should conclude.
Name: End
Type: End
Version: 2.0
Category: Sequential Agents
Base Class: End
The End node accepts one input parameter:
Label | Name | Type |
---|---|---|
Agent | Condition | LLM | Tool Node | sequentialNode | Agent | 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.
The node requires a predecessor node of type ISeqAgentNode
.
If no predecessor is provided, an error will be thrown.
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
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.
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.
For more detailed information on using the End node in Sequential Agents workflows, refer to the official documentation:
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.