End Node
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.
Node Details
-
Name: End
-
Type: End
-
Version: 2.0
-
Category: Sequential Agents
-
Base Class: End
Parameters
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.
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 constantEND
-
name
: Set to the constantEND
-
label
: Set to the constantEND
-
type
: Set to ‘end’ -
output
: Set to the constantEND
-
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 totrue
, 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.