
Node Details
- Name: ConditionAgent_SeqAgents
- Type: ConditionAgent
- Category: Sequential Agents
- Version: 2.0
Parameters
Main Parameters
-
Name (string)
- Label: Name
- Description: Name for the Condition Agent
-
Sequential Node (Start | Agent | LLMNode | ToolNode)
- Label: Start | Agent | LLM | Tool Node
- Description: Previous nodes in the sequence
- List: true
-
Chat Model (BaseChatModel)
- Label: Chat Model
- Description: Overwrite model to be used for this agent
- Optional: true
Prompt Parameters
-
System Prompt (string)
- Label: System Prompt
- Description: System message for the agent
- Optional: true
- Default: Example prompt provided
-
Human Prompt (string)
- Label: Human Prompt
- Description: Human message added at the end of the conversation
- Optional: true
- Default: Example prompt provided
-
Format Prompt Values (json)
- Label: Format Prompt Values
- Description: Assign values to prompt variables
- Optional: true
- List: true
Output Configuration
-
JSON Structured Output (datagrid)
- Label: JSON Structured Output
- Description: Instruct the LLM to give output in a JSON structured schema
- Optional: true
Condition Configuration
-
Condition (conditionFunction)
- Label: Condition
- Description: Function or table to evaluate the condition
- Tabs: a. Condition (Table): Datagrid for defining conditions b. Condition (Code): JavaScript function for custom condition logic
Inputs
- Previous node in the sequential flow
- Chat model (optional)
- Prompts and prompt values
- Condition logic (table or code)
Outputs
- Next: Connection to the next node if condition is met
- End: Connection to end the flow if condition is not met
Functionality
- Initializes with previous nodes and configurations
- Prepares the agent with system and human prompts
- Executes the agent to evaluate the current state
- Applies the condition logic (either table-based or code-based)
- Determines the next step in the flow based on the condition result
Use Cases
- Routing conversations based on user intent
- Implementing decision trees in conversational flows
- Applying business logic to determine next steps in a process
- Filtering or categorizing responses before proceeding
Notes
- The node supports both simple table-based conditions and complex JavaScript-based condition functions
- It can use structured output from the LLM for more precise decision-making
- The condition can access various parts of the conversation state, including previous messages and custom variables