Tools
Last updated
Was this helpful?
Last updated
Was this helpful?
In the DuploCloud AI Suite, a Tool is a modular component that enables the DuploCloud AI Agent to go beyond conversation and interact directly with your infrastructure. Each Tool accepts an input, executes custom logic, and returns a string output, which the agent can use to make decisions, continue a conversation, or trigger follow-up actions. By defining Tools, you control what the AI Agent is capable of, ensuring it operates only within the boundaries you explicitly set.
Tools are built as Python classes that inherit from the BaseTool
class in , making them compatible with LangChain-based agents and easily callable by the DuploCloud AI Agent. When a user query is received, the agent determines whether a Tool is needed, selects the appropriate one, passes in the relevant input, and uses the output to guide its next steps. You can create tools for:
Querying tenant or infrastructure configuration
Fetching deployment statuses, logs, or metrics
Integrating with systems like Slack, PagerDuty, or GitHub
Running scripted operations (e.g., restarting containers)
Retrieving usage or billing data for reporting and cost insights
Each Tool in the DuploCloud AI Suite relies on a Python package that contains the logic it will execute. Before creating a Tool, upload your package to DuploCloud.
Navigate to AI Suite → Studio → Tools, and select the Packages tab.
Click Add. The Upload Package pane appears.
In the Tool Name field, provide a name for the package.
Click Choose File, and select a valid .zip
file that contains your tool code.
Click Upload to add the package.
Once uploaded, the package will appear in the list under the Packages tab. You can then reference this package when creating a Tool by specifying its name and providing an install script.
Add a custom Tool to the DuploCloud AI Suite to enable the DuploCloud AI Agent to import and execute it during its reasoning process.
From the DuploCloud Portal, navigate to AI Suite → Studio → Tools, and select the Tools tab.
Click the Add button. The Add Tool Definition pane displays.
Complete the following fields:
Name
Enter a name for the Tool.
Package
Select the Python package file to install (a .zip
file with your Tool). To upload a new package, select Add Package.
Install Script
Specify the shell command to install the package (e.g., pip install duplo-tool-package-main.zip
).
Build Environment
Variables
Define one or more variables required to initialize the Tool during setup. Each entry includes a Key, Value, and optional Mandatory flag.
The init_code
key should include:
A Python import statement to bring your Tool class into scope.
An instantiation statement that creates an instance named tool
.
Example:
Key: init_code
Value:
Deployment Environment Variables
Enter runtime environment variables required by the Tool (for example, namespace or region) as key/value pairs.
MetaData
Optional metadata such as creator name, tags, or description as key/value pairs.
After creating a Tool, you can manage it at any time:
Navigate to AI Suite → Studio → Tools, and select the Tools tab.
Click on a Tool name in the NAME column to view its details.
Select from the tabs at the top (e.g., MetaData, Build Env Vars, Deployment Env Vars, Packages, Details) to view different Tool components.
The Details tab shows a full JSON representation of the Tool definition.
Use the Actions button to Edit or Delete the Tool.
Click Submit to create the Tool. Once the Tool is created, it can be selected when .