Sequential Agent
Last updated
Last updated
The Sequential Agent in THub is a component within the AgentFlow V1 architecture designed to execute a series of tasks in a predetermined order. This setup is particularly useful for workflows that require a structured sequence of operations, such as data collection, processing, and response generation.
The Agent Node serves as the central decision-making component within a workflow. It leverages a Large Language Model (LLM) to process inputs, access tools, and retrieve information from knowledge bases to generate context-aware responses.
Key Features:
Tool Integration: Configure which tools the agent can utilize.
Knowledge Access: Connect to document stores or vector databases for information retrieval.
Memory Management: Enable or disable memory to consider past interactions.
Flow State Updates: Modify the workflow's runtime state ($flow.state
) during execution.
Inputs: Data from prior nodes or initial triggers.
Outputs: Agent-generated responses, either as plain text or structured JSON.
2)Condition Node
The Condition Node introduces deterministic branching logic, allowing the workflow to diverge based on specified conditions.
Key Features:
Conditional Evaluation: Assess input values using logical operators (e.g., equals, contains).
Branching Paths: Direct the workflow along different routes based on evaluation results.
Inputs: Data to be evaluated.
Outputs: Branches corresponding to condition outcomes (e.g., true or false).
3)Custom JS Function Node
The Custom JS Function Node allows the execution of bespoke JavaScript code within the workflow, enabling complex data transformations or integrations.
Key Features:
Custom Logic: Implement specific operations not covered by standard nodes.
Access to Flow Context: Utilize variables like $flow.state
, $flow.input
, and custom-defined variables.
Flow State Updates: Modify the workflow's runtime state based on function outcomes.
Inputs: Defined input variables and access to flow context.
Outputs: String value returned by the executed JavaScript function.
4) Condition Agent
The Condition agent is an agent that uses a large language model (LLM) to decide which actions to take based on specific conditions or criteria. This means the agent's behavior isn't solely determined by a predefined workflow, but it uses its reasoning capabilities to select the most appropriate course of action based on the current state and input.
5)END Node
The END Node signifies the termination point of a workflow or a specific branch within it.
Key Features:
Final Output: Deliver a concluding message to the user, which can be static or dynamically generated.
Workflow Termination: No further nodes are processed beyond this point.
Inputs: Message content from previous nodes or flow state.
Outputs: None; this node concludes the execution path.
The Execute Flow Node enables the invocation of another complete THub Chatflow or AgentFlow from within the current workflow, promoting modular design.
Key Features:
Sub-Workflow Execution: Trigger separate, pre-existing workflows.
Input Passing: Provide initial inputs to the invoked workflow.
Flow State Updates: Incorporate outputs from the executed sub-flow into the current workflow's state.
Inputs: Execution signal and input data for the sub-flow.
Outputs: Results returned by the executed sub-flow.
7)LLM Node
The LLM Node provides direct access to a configured Large Language Model for executing AI tasks, such as data extraction or content generation.
Key Features:
Structured Output: Configure the LLM to return responses in a specific JSON schema.
Flow State Updates: Store LLM outputs in the workflow's runtime state for downstream use.
Inputs: Data from the workflow's initial trigger or preceding nodes.
Outputs: LLM-generated responses, either as plain text or structured data.
8)Loop Node
The Loop Node introduces controlled cycles within the workflow, enabling iterative processes where a sequence of nodes is executed multiple times based on defined conditions.
Key Features:
Iteration Control: Define the maximum number of loop iterations to prevent infinite cycles.
Loop Back Target: Specify the node to which the workflow should return after each iteration.
Inputs: Execution signal to activate the loop.
Outputs: Redirects execution flow back to the specified node.
The Start Node is the designated entry point for initiating any AgentFlow V2 workflow execution.
Key Features:
Input Configuration: Determine how the workflow is triggered, either by chat input or a submitted form.
Flow State Initialization: Define the initial key-value pairs for the workflow's runtime state.
Memory Settings: Configure whether to consider past messages from the conversation thread.
Inputs: Initial data that triggers the workflow.
Outputs: Passes along the initial input data and the initialized Flow State to the first operational node.
The Tool Node provides a mechanism for directly and deterministically executing a specific, pre-defined Flowise Tool within the workflow sequence.
Key Features:
Deterministic Execution: Executes the selected tool without involving LLM reasoning for tool selection.
Input Argument Mapping: Define how data from your workflow is supplied to the selected tool.
Flow State Updates: Store the tool's output in the workflow's runtime state for use in subsequent nodes.
Inputs: Necessary data for the tool's arguments, sourced from previous node outputs or flow state.
Outputs: Raw output generated by the executed tool.