Tools
Tools are how you can get executable Python or JavaScript code to be triggered by agents or UIs.
Tool Design
When creating a tool, make sure that the title and description corresponds to the actual intended use and outcome of a tool's execution as these titles and descriptions are used in the context of agents given access to this tool.
Tool Configuration
Input Parameters: define the specific input parameters that will be used in the code execution. Each node's use case of the tool will need to be configured to use these parameters in a specific way.
Output Parameters: define the format of the output parameters for this tool. These output fields can be used by nodes following an initial node's execution of this tool.
Language: choose between the current supported languages offered by the studio. Currently we support Python primarily and JavaScript as a secondary choice for scripts unable to be performed by Python. We recommend trying Python first.
Code
The code has all features available by the monaco editor. You can use common keyboard shortcuts for finding text and performing mass replaces by using (CMD+F).
This code must be formatted in a way that whatever is returned in the root of the file, will be returned as the final output of the tool. There is no need to define a __main__ function as is common in python.
Simple return code is sufficient, for example:
Parameters
Parameters used by your tool. Whatever you set their unique name to, can be used within the executable code.
Types
String
Number
Boolean
Object
Date
Required
Whether this parameter is required for this executable code to work
IsArray
Whether this parameter is an array of its type
Default Value
The value that will be used if for some reason that parameter is not specified in its individual use
Extensions
We will continuously add more extensions as integrated features for tools to utilize. For now, the only and most important is the Web3 Extension.
Web3 Extension
There are several different configurations to apply to the Web3 extension, and all must be utilized correctly for autonomous DeFi transactions to be enabled for your agent.
Enable Web3 Transaction Parameter: must be checked to enable this tool to utilize Web3 functions
Backend Wallet: a unique backend wallet for your tool for authorizion requirements. Currently, the only way to generate one for your use case is to contact the Fungi team: hello@fungi.ag
ETH Limit Per Transaction: the amount (only in ETH) that you would limit to this autonomous transaction
Start Time: the start time for this authorization
Expire Time: the expire time for this authorization
Token Approvals: what tokens do you need approved for specified spenders
Title: for organization
Chain ID: the chain ID for this token
Token Address: the verifiable address for this token
Spender Address: the permitted spender for this token
Approved Targets: the contracts that you are making transactions on in the tool
Title: for organization
Chain ID: the chain ID for the contract
Contract Address: the verifiable address for the contract you need the user to authorize
Last updated