This article provides a comprehensive guide to using the Text Merger node within the AgentRunner platform. The Text Merger node allows you to combine two text inputs into a single output, which is useful for creating dynamic and flexible agent workflows. This article covers the node's functionality, configuration options, and usage scenarios, empowering you to effectively integrate it into your agent designs.
Overview of the Text Merger Node
The Text Merger node is a fundamental component in AgentRunner, designed to streamline the process of combining textual data from multiple sources. This node is particularly useful when you need to consolidate information before passing it to another node for further processing or analysis. By merging two distinct text inputs, you can create more complex and context-rich inputs for subsequent operations. The flexibility of the Text Merger node lies in its ability to handle various input types, including pre-defined variables (fixed inputs) and outputs from other nodes within the agent or input nodes connected. This versatility makes it an indispensable tool for building sophisticated and adaptable agents. The ability to configure the node as either private or public adds another layer of control, allowing you to manage which parameters are exposed to operators during agent execution.
Use Cases for Text Merging
The Text Merger node is invaluable in scenarios where data from multiple sources must be combined into a single, coherent text. Consider these situations:
Combining AI Output with Fixed Values: An AI node generates a response, and you need to append a different text to it before sending it to the user. The AI output is the connected input node, and the disclaimer is the fixed value.
Aggregating Data from Different Nodes: Data from several processing nodes needs to be combined into a single summary or report. Each data point comes from a connected input node, and the Text Merger node creates the final consolidated text.
Key Features and Benefits
The Text Merger node offers several key benefits that enhance the efficiency and flexibility of your agents:
Versatile Input Handling: Supports both fixed inputs (pre-defined variables) and connected nodes, allowing you to merge diverse data sources.
Simple Concatenation: Merges the two input texts through straightforward concatenation, ensuring ease of use and predictable results.
Privacy Control: Can be configured as private, restricting modification by operators during agent execution, or public, allowing runtime adjustments.
History Tracking: Maintains a history of each run, including the timestamp, user who ran the agent, and detailed logs, providing valuable insights for debugging and optimization.
Seamless Integration: Integrates smoothly within the AgentRunner node editor, enabling visual configuration and chaining with other nodes to create complex transformations.
Configuring the Text Merger Node
To effectively use the Text Merger node, understanding its configuration options and interface elements is crucial. This section provides a detailed walkthrough of the node's settings and how to tailor them to your specific needs. Each Text Merger node presents a user-friendly interface that includes named input fields for the two text sources, configuration settings for visibility, and display options for easy identification within the agent. By mastering these settings, you can optimize the node's behavior and ensure it functions seamlessly within your agent. Properly configured, the Text Merger node becomes a powerful tool for dynamic text manipulation, enabling you to create sophisticated and responsive agents.
Input Fields and Variable Names
The Text Merger node features two primary input fields, each associated with a variable name. These names are essential for referencing the node's inputs when calling the AgentRunner API. Here’s a breakdown:
Input 1: This field accepts either a fixed value (a pre-defined variable) or a connection from another node. The associated variable name is used to identify this input programmatically.
Input 2: Similar to Input 1, this field can also accept a fixed value or a connection from another node. It also has a corresponding variable name for API calls.
Both input fields allow you to add comments above their text fields, providing context and documentation for your configuration.
Privacy Settings: Public vs. Private Nodes
The Text Merger node includes a toggle that controls its visibility and modifiability during agent execution:
Public Node: When the toggle is set to "Public," the node's values can be changed by anyone running the agent. This is useful for scenarios where you want operators to have the flexibility to adjust the input values at runtime.
Private Node: When the toggle is set to "Private," only developers and owners can view and modify the node's values. This ensures that critical or sensitive configurations remain protected from unauthorized changes during agent execution.
Renaming and Display Options
For organizational purposes, you can rename the Text Merger node to a more descriptive name. This display name is purely for your convenience within the node editor and does not affect the node's functionality. The renaming feature helps you keep your agents organized and easily identifiable, especially in complex agents with numerous nodes.
Using the Text Merger Node in an Agent
Integrating the Text Merger node into your AgentRunner agents is straightforward. This section outlines the step-by-step process of adding, configuring, and connecting the Text Merger node within your agents. Understanding these steps ensures that you can effectively leverage the node's capabilities to create dynamic and responsive agent interactions. Each step is designed to enhance your control over text manipulation, allowing you to build sophisticated agents that handle diverse data sources with ease. By following these guidelines, you can seamlessly incorporate the Text Merger node into your agents and optimize their performance.
Step-by-Step Instructions
Add the Text Merger Node:
In the AgentRunner node editor, locate the Text Merger node in the node library.
Drag and drop the node onto the canvas where you want to integrate it into your agent.
Configure Input Fields:
Input 1: Determine whether you want to use a fixed value or connect it to another node.
Fixed Value: Enter the pre-defined variable in the input field.
Connected Input Node: Drag a connection from another node to Input 1.
Input 2: Repeat the same process for Input 2.
Set Privacy Settings:
Use the privacy toggle to set the node to either "Public" or "Private," depending on whether you want operators to be able to modify the values during agent execution.
Rename the Node (Optional):
Rename the node to a descriptive name that helps you identify its purpose within the agent.
Connect the Output:
Drag a connection from the output of the Text Merger node to the input of the next node in your agent.
Tips and Considerations
Inputs can’t be empty, the agent will not run.
Expected Outcome
Following these steps, the Text Merger node will successfully concatenate the two input texts into a single output. This output can then be used as input for subsequent nodes in your agent, enabling dynamic and context-aware agent interactions.