Node Details

  • Name: seqToolNode

  • Type: ToolNode

  • Version: 2.0

  • Category: Sequential Agents

  • Base Class: ToolNode

Parameters

Required Parameters

  1. Tools (Tool, list)

    • List of tools to be executed by the node
  2. LLM Node (LLMNode)

    • The Language Model node to be used for processing
  3. Name (string)

    • Custom name for the tool node

Optional Parameters

  1. Require Approval (boolean)

    • If enabled, requires approval before executing tools
  2. Approval Prompt (string)

    • Custom prompt for approval (only applicable if “Require Approval” is enabled)

    • Default: “You are about to execute tool:

      . Ask if user want to proceed”

  3. Approve Button Text (string)

    • Text for the approve button (only applicable if “Require Approval” is enabled)

    • Default: “Yes”

  4. Reject Button Text (string)

    • Text for the reject button (only applicable if “Require Approval” is enabled)

    • Default: “No”

  5. Update State (tabs)

    • Options to update the state after tool execution

    • Tabs: a. Update State (Table): GUI-based state update b. Update State (Code): Code-based state update

Input

  • The node accepts input from a predecessor node, typically an LLM node

  • Input should be in the form of AIMessages

Output

  • The node outputs ToolMessages containing:

    • Tool name

    • Tool input

    • Tool output

    • Source documents (if any)

    • Artifacts (if any)

Functionality

  1. Tool Execution: The node executes the specified tools based on the input received.

  2. Approval Process: If enabled, it seeks user approval before executing tools.

  3. State Update: After tool execution, it can update the workflow state based on the output.

  4. Error Handling: Provides error messages for various scenarios like missing tools or invalid inputs.

Use Cases

  • Integrating specific tools or actions within a sequential agent workflow

  • Allowing user intervention before critical tool executions

  • Dynamically updating workflow state based on tool outputs

Notes

  • The node is part of a larger sequential agent system and is designed to work in conjunction with other nodes, especially LLM nodes.

  • It supports both UI-based and code-based methods for updating the workflow state after tool execution.

  • The node can handle multiple tools and execute them in parallel if needed.