Skip to main content

Part 2: Equip Agent with Data Access Capabilities using DataHub Query Tool

Now that you've defined your agent's role and responsibilities, you need to equip it with data access capabilities. In this section, you'll create a DataHub Query tool to retrieve invoice information and provide your agent with all the data tools it needs for autonomous decision-making.

  1. From the main "Agents" list, click the Tools icon in the left-hand navigation bar.

    Tools Navigation

Create a New DataHub Query Tool

  1. Click Create New Tool.

  2. Select DataHub Query from the Agent Designer modal and click Add Tool.

    DataHub Query Selection

Define the Tool Signature

  1. Tool Name: Query Invoices [builderInitials]

  2. Description: Retrieve Invoice by Invoice Number from DataHub

  3. Under Input Parameters, click + Add Input Parameter.

  4. Name: Invoice Number

  5. Description: Invoice Number to use for query

  6. Type: Select String from the dropdown.

  7. Click Add Input Parameter.

  8. Click Save & Continue.

    Tool Signature Configuration

Select Data Fields for the Tool

  1. On the "Select Fields" screen, choose your Repository (AI Workshop) and Model (Invoice).

  2. Select the checkboxes for all fields you want the tool to be able to access. In this case, we'll just click the checkbox in the table header to select all fields.

  3. Click Save & Continue.

Filter the Data

  1. On the "Filter data" screen, click + Add Filter.

  2. FieldName: Select INVOICE_DOC.

  3. Operator: Select EQUALS.

  4. Value: Select the {{Invoice Number}} parameter you created earlier.

  5. Click Save & Continue.

    Filter Configuration

Review and Deploy the Tool

  1. On the Review screen, verify the tool's configuration and click Deploy Tool.

  2. Confirm by clicking Deploy in the pop-up.

Attach Tools to Your Agent

Now you'll attach all data query tools to your agent's Data Collection & Validation responsibility area. This gives your agent the autonomy to decide which data to gather and when, based on each reconciliation scenario.

Role-Based Tool Provisioning

In role-based agentic design, we provide agents with all the capabilities they need for their responsibility area, rather than prescribing exactly when to use each tool. Your agent will autonomously determine which documents to retrieve and in what order based on the context of each reconciliation scenario.

This is fundamentally different from task-based workflow automation, where you would explicitly program: "First call tool A, then call tool B, then call tool C." Role-based design trusts the agent's intelligence to determine the optimal approach.

  1. Navigate back to the Agents screen.

  2. Click on your agent's name from the list. Select Edit in the bottom right, and then click Disable if a dialog box appears.

  3. On the Tasks tab, find the Data Collection & Validation task.

  4. Click the Manage Tools button for this task.

  5. Click + Add New Tool.

  6. Search for and check the boxes for the following tools:

    • Query Invoices [builderInitials] (you built a few moments ago)
    • [Invoice] PO Query by PO Number (prebuilt in this shared account)
    • [Invoice] GRN Query by PO Number (prebuilt in this shared account)
    note

    In order to locate the two prebuilt tools, you may have to scroll to the bottom of this window, and page through for the tools you need.

  7. Click Add Tool, and then Save.

  8. Click Save and Continue through the remaining screens, then Deploy Agent.

Data Capabilities Configured

Your agent now has autonomous access to all procurement data sources. It can independently decide which documents to retrieve based on the reconciliation scenario at hand. In the next section, you'll add action capabilities so your agent can communicate findings and update system status.