Custom model definitions

Custom model definitions empower you to integrate with and leverage external generative AI models, hosted on diverse platforms in various environments, including On-Premises infrastructure, private clouds, and public cloud platforms.

Custom model APIs enable you to connect to any REST API-compatible models, giving you the ability to tap into a winder range of AI solutions.

The need for custom models

The rapid advancement of generative AI technologies has resulted in a wide range of foundational models being available, each with its own strengths and specializations. While Automation Anywhere provides a selection of pre-integrated models within AI Agent Studio, the need to leverage other models could be due to:

Specialized models

You have developed or acquired models trained on specific datasets or fine-tuned for unique tasks relevant to your business needs.

Data security and residency

Organizations with strict data security policies or regulatory requirements may need to use models hosted within their own secure environments, such as on-premises infrastructure or private clouds.

Leveraging existing investments

Organizations that have already invested in developing and deploying AI models on platforms can benefit from the ability to integrate these models directly into their Automation Anywhere workflows.

Custom model APIs

To address these, Automation Anywhere has developed custom model APIs to define and connect to custom generative AI models. These API function by seeding information about the model, including its vendor, name, authentication mechanism, input parameters, and output mapping, into the database of a Control Room instance.


Custom model API
The following four APIs designed to manage custom models in AI Agent Studio include:
  1. POST https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel
    • This API creates a new custom model definition.
    • It requires a JSON payload schema, which encapsulates information about the model. The schema defines attributes such as the vendor's name, the specific model's name, authentication protocols, API endpoint details (including path parameters, query parameters, and required headers), and the structure of the request and response bodies.
    • The API allows users to define variables within the request and response bodies that can be dynamically populated during runtime. These variables can be designated for different purposes using specific annotations:
      • PROMPT_QUERY: This annotation signifies that the corresponding variable should be replaced with the prompt provided by the user in the AI Skills page. This is essential for passing user input prompts to the model.
      • REQUEST_PARAMETER: This annotation indicates that the variable should be exposed as a configurable parameter on the Model connections page.
      • MODEL_PARAMETER: Similar to REQUEST_PARAMETER, this annotation designates the variable for configuration on the AI Skills page.
      • RESPONSE_PARAMETER: This annotation signifies that the variable will be returned in the response from the AI model.
    • The API returns a 200 OK response with the created model upon successful creation.
  2. GET https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel/vendors/{vendorName}/models/{modelName}
    • This API retrieves the definition of an existing custom models.
    • It requires the vendor name (vendorName) and the model name (modelName) as path parameters.
    • The API returns a 200 OK response containing the objects representing the requested model.
  3. DELETE https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel/vendors/{vendorName}/models/{modelName}
    • This API deletes an existing custom model.
    • Similar to the GET API, it uses (vendorName) and (modelName) as path parameters to identify the target model.
      Note: The model can only be deleted if it is not currently associated with any active Model connections. This means you must first remove any AI Skills and Task Bots that rely on the Model connection before attempting to delete the model definition.
    • The API returns a returns a 204 No Content response upon successful deletion.
  4. POST https:/{{ControlRoomURL}}/gai/prompttools/v1/custommodel/list
    • This API retrieves a list of all custom models defined for all vendors within the Control Room.
    • It accepts an optional request body containing a FilterRequest object, enabling users to filter the results based on specific criteria.
    • The API returns a 200 OK response with objects containing the requested models.

For more details about these APIs, see AI Agent Studio API. You can download here a Postman collection for AI Agent Studio - custom model definitions which contain example API calls to connect to the model Definition API.

Known limitations

This section lists the limitations of the custom model APIs. Some of the key areas identified for improvement include:
Lack of a UI (user interface)
The current offering lacks a user-friendly interface for defining custom models, relying solely on API calls.
Limited update capabilities
After a model definition is created, updating it requires deleting the existing definition and recreating it with the desired changes. This is a cumbersome process, especially if the model is actively used in Model connections.
Text-only input parameters
Currently, only text-based input parameters are supported in Model connections. In the future, support for other data types, such as integers to accommodate a wider range of model inputs will be considered.
Limited visibility into credentials and headers
Currently, credentials are only visible and editable within the Model connections screen. The ability to specify credentials at the AI Skills level will be considered.
Lack of support for AWS authentication
The v.35 release does not include built-in support for authenticating with models hosted in AWS environments. This limitation is expected to be addressed in future releases.