Add a Composite Tool

Updated 

The Composite Tool allows you to combine multiple individual tools into a single, cohesive workflow. This approach simplifies the execution of tasks that require a sequence of actions.

Key Benefits

  • Incremental Tool Addition: Build composite tools by adding individual tools step-by-step for customized workflows.

  • Sequential Execution: Execute selected tools in order, like calling an API, processing output, and then publishing results.

  • Efficiency Improvements: Simplifies workflow by combining multiple steps into one composite tool, reducing manual sequencing.

Steps to Configure a Composite Tool

Follow the steps below to configure the Composite Tool in AI Agent Studio:

1. Access the Composite Tool

  • Navigate to AI Agent Studio from the Sprinklr Launchpad.

  • Select the AI Agent you want to configure.

  • Expand the Build section and open Tools.

  • Click + Add Tool and select Composite Tool from the list.

2. Define Basic Details

  • Name: Enter a unique name to identify the tool.

  • Description: Provide a brief description of the tool’s purpose.

3. Configure Setup Function

  • Select tool Execution Behaviour as Standard or Parallel. Select the tool to be added from the tool Flow dropdown. To add multiple tools, click the Plus icon and add.

    • Standard: In this behaviour, the tools are executed one after the other as per the workflow.

    • Parallel: In this behaviour, the tools are executed simultaneously.

  • After selecting the required tools, click Save to create a Composite Tool for your AI Agent.

Note: When executing tasks in parallel, users are limited to selecting two specific types of tools: API tool and Text Processing tool.

In standard scenarios, users can still utilize the following tools:

  1. API tool

  2. Text Processing tool

  3. On-Demand Publishing tool

  4. Composite tool

  5. Macro tool

Applications of Composite Tools

Making Multiple API Calls Efficiently

For example, a software application needs to retrieve data from ten different APIs to provide a quick response to the user. The developer creates a composite tool that includes all ten API calls. During this setup, the option for parallel execution is selected to allow simultaneous processing.

When the composite tool is triggered, it initiates all ten API calls at once rather than waiting for each one to complete sequentially. For example:

  • API Call 1: Retrieve data from API A.

  • API Call 2: Retrieve data from API B.

  • API Call 3: Retrieve data from API C.

  • API Call 4: Continue this for APIs D through J.

As each API responds, the outputs are collected and stored. This process is managed within the composite tool, which efficiently handles incoming data from multiple sources. By executing all API calls in parallel, the total response time is significantly reduced. Instead of taking approximately one minute to complete all calls (if each takes 5 seconds), the composite tool can return results in about 10 seconds.

Summarizing Outputs from Multiple Systems

For example, a data analyst needs to gather and summarize information from ten different systems to generate a comprehensive report. The analyst creates a composite tool that integrates ten individual tools, each corresponding to one of the systems. This composite tool organizes the workflow and allows for sequential execution.

The composite tool is designed to call each system one after the other. For instance:

  • Step 1: Call System A and retrieve data.

  • Step 2: Call System B and retrieve data.

  • Step 3: Continue this process for Systems C through J.

After each system's output is retrieved, the composite tool summarizes the results in smaller, manageable chunks, allowing for better token management during processing. For example, each system's output is processed and temporarily stored before moving on to the next system.