Agent Node
The Agent Node is a core component of the Sequential Agent architecture. It acts as a decision-maker and orchestrator within our workflow.
Understanding the Agent Node​
Upon receiving input from preceding nodes, which always includes the full conversation history state.messages
and any custom State at that point in the execution, the Agent Node uses its defined "persona", established by the System Prompt, to determine if external tools are necessary to fulfill the user's request.
- If tools are required, the Agent Node autonomously selects and executes the appropriate tool. This execution can be automatic or, for sensitive tasks, require human approval before proceeding (Human-in-the-Loop, HITL).
- The Agent Node also maintains an ongoing dialogue with users, providing relevant responses based on the conversation's context and any tool-derived information.
Inputs​
Required | Description | |
---|---|---|
System Prompt | Yes | A text prompt that defines the Agent's personality, role, and constraints. It guides the Agent's decision-making and response generation. |
Tools | No | The Tool Nodes that the Agent Node can access and execute, each offering specific functionality to retrieve information or perform actions. |
Chat Model | No | A custom Chat Model (LLM) to use instead of the default one defined in the Start Node. |
JSON Schema | No | A schema defining the structure of the Agent Node's response when JSON Structured Output is enabled. |
Enable JSON Structured Output | No | A configuration to force the Agent Node's response to follow a predefined JSON schema. |
Update State | No | A JSON object that defines how the Agent Node should update the custom State before passing it to the next node. |
Outputs​
The Agent Node can connect to the following nodes as outputs:
- Agent Node: Connects to another Agent Node to continue the conversation with a different agent or persona.
- LLM Node: Routes the conversation flow to an LLM Node for processing and response generation.
- Condition Agent Node: Connects to a Condition Agent Node to implement branching logic based on the agent's evaluation of the conversation.
- Condition Node: Connects to a Condition Node to implement branching logic based on predefined conditions.
- Loop Node: Connects to a Loop Node to implement repetitive processes based on specific conditions.
- End Node: Connects to an End Node to conclude the conversational flow.