Configure a Generative AI activity using the Dynamic configuration
You can dynamically configure the Generative AI activity so you can use a single process with different configurations.
-
Add an activity to the map.
By default, the Configuration tab is open in the properties panel of the activity.
Tungsten Automation adheres to transparent policies and complies with regulatory guidance regarding the use of AI. Select the Learn more about the use of AI link to know about Tungsten Automation's commitment to responsible AI and compliance.
- Change the default Name of the activity as required.
- On the Type list, select .
- Select the Configuration mode as Dynamic.
-
On the
Dynamic configuration (JSON) list, select a process or server variable
(String or Data object).
-
The String variable must have a valid JSON configuration. If the JSON is not valid, an error appears at runtime.
-
For a data object variable, you can use the "AIDynamicConfig" data model available in the System category. This data object holds the dynamic configuration JSON for the Generative AI provider.
-
In Dynamic configuration mode, you need to supply the provider and the model you want the activity to use in the JSON configuration, along with the other settings. The JSON configuration has fields such as AIProviderName - Text (string), SourceFormat - Number ( -1, 0, and 1 maps to AISourceFormatType), Temperature - Number (0.0-2.0, decimal precision 1), and more. The fields depend on the source format. See the following sample JSON:
Sample JSON{ "AIProviderName": "AzureOpenAI", "ProviderModelName": "gpt-4o", "InputValue": { "Script": "Translate the following text to French: Hello, how are you?", "RuleType": 25 }, "RetryIfResponseIsEmpty": true, "SourceFormat": -1, "Temperature": 0.2}If the configuration does not supply a model, the activity uses the model configured on the provider it names.
At runtime, the activity uses the provider and the model supplied in the JSON configuration.
-
-
Optional. To use MCP servers with Generative AI activity, select Use MCP servers. (Default: Clear)
Making MCP servers available for use is giving consent for them to be executed at runtime.
-
Select
Add to add MCP servers.
The New MCP server dialog box is displayed.
-
On the MCP serverlist, select a preconfigured
MCP server. See Configure MCP server connection.
When MCP servers are added, all tools exposed by the selected servers are listed and become available for use in the Generative AI activity.
-
To dynamically override the MCP tools available, select
Override tools and select/deselect the custom tools as required.
When this option is enabled, the MCP server configuration is not modified, and only the tools selected for this activity are available for use.
Optionally, use the Search tools box and the dropdown beside it to find specific tools by name and filter them.
You can override MCP tools only at design time and not at runtime.
-
Select
Save.
The MCP server appears in the list.
- You can add more MCP servers.
-
Select
Add to add MCP servers.
-
You can specify whether the job be suspended if an error is returned from the provider. Do either of the following for
Suspend job on error.
-
Leave the option selected (default).
When you export a process and import it to a target server, the Generative AI activity is executed correctly if the provider is configured with the same name as the source server and the same ID.
-
Clear the check box and map the following process variables:
-
On the Error raised list, select a boolean variable.
-
On the Status code list, select a short variable.
-
On the Error message list, select a string variable.
When you execute the Generative AI activity and an error occurs, the activity is completed without an error and the process variable mapped to the response is not populated.
-
-
-
On the
Response list, select a Data object variable that holds the output. You can
create a new data object variable or map the "AIDynamicResult" variable available under System category.
The response only supports simple type variables, XML, Data object, and a list within the Data object.
Based on the variable type mapped to the response, the result is displayed.
-
Save the process map.
When you execute this activity, the system does the following:
-
Pass the correct input to the selected AI provider and populates the mapped variable at runtime.
-
Record an audit entry that the Generative AI activity is executed. The audit entry includes the provider and the actual model used.
-