System integration builders having a sandbox system can quickly try out a simple AI chat widget automation that demonstrates the ability of an AI agent to invoke a tool automation. It should take only a few minutes to obtain the needed API keys.
To get started, obtain an OpenAI API key at https://platform.openai.com/settings/organization/api-keys.
Enter the API key into your keyvault via your Admin Console here:
NOTE: entering an OpenAI API key will also unlock AI assistants in the Automation Editor. Currently the system has AI assistants that help with action searches and action field mappings. After entering the OpenAI API key, reload the automation editor to access the AI assistants.
Next, open your automation editor and switch account via the top right account menu:
Switch to the Automation Samples account:
The sample account may have many different samples loaded. For this discussion, select the AI Tool sample folder:
Turn on both automations. When the tool automation is turned on, you will be prompted to connect a Logo.dev account:
Click the button to connect an account, then click the link to Logo.dev:
Create a free account and copy your public API key. Paste the key back in the connection dialog in the automation editor.
After both automations are turned on, click the play icon in the chat automation to open the chat widget in a test page:
The tool automation can invoke the Logo.dev API to fetch a logo image for a given domain name. Give it a try:
The APIANT system automatically handles the API calls to OpenAI and makes the tool automations available to the AI model. The AI model may choose to have the system invoke one or more tool automations to help it generate responses.
Tool automations are made available the AI model as functions (see https://platform.openai.com/docs/api-reference/responses/create). Only tool automations that are turned on and in the same folder as the chat automations are made available.
The system uses the tool automation’s name and description to inform the AI model about available tools:
The system also reads the tool automation’s inputs and passes that info to the AI model:
Each input parameter’s name and description is passed to the AI model:
It is the virtue of a tool automation having a tool input trigger and a tool output action that identifies it as an AI tool automation.
It is up to the AI model to choose to invoke tool automations based upon the provided information about the tool automations and the context of the conversation.
Use the history icons to view processed transactions from your testing:
You may also want to drill down into the assembly diagrams for some of the triggers and/or actions in the sample automations. Right click on items in the automation diagrams to open their assemblies: