Sub-agent process element
Use the Sub-agent business process element to integrate Creatio Sub-agents into any business process. Before you configure this element, make sure you have a corresponding Sub-agent set up. Learn more: Develop Creatio Sub-agent.
The exact functionality of the Sub-agent element depends on the chosen Sub-agent. For example, you can use the element to rephrase a text creatively by calling a dedicated Sub-agent that returns rephrased text in its response.
When the business process activates the Sub-agent element, the element executes the following actions:
- Call and execute the requested Sub-agent. The call might include specific request input and output parameters that are required for the Sub-agent to work properly.
- Receive response from Creatio AI. This might take some time.
- Pass the provided output parameters in the subsequent flow.
Set up the Sub-agent element
To integrate a Sub-agent into the business process:

- Select a Sub-agent to call in the element setup area. The element supports Sub-agents that have "Workflows" mode and "Active" status.
- Specify the parameter values inside the element setup area if needed (Fig. 1). The element displays connected input parameters instantly once you select a Sub-agent. Output parameters only appear when you are mapping them to process parameters or other elements.
Work with a collection of records
You can use a "Collection of records" input parameter in the element when such collection is passed directly from a Read data process element.

However, it has certain limitations:
- The parameter can only be used when the Sub-agent is designed to accept a collection as input.
- Sub-agent must define an input parameter of "Serializable list of composite values" type to receive the collection.
- You can map only a parent element that outputs a full collection of records, for example, Read data element. Selecting individual nested values is not supported.
- Parameter mapping is only available through the "Formula" option. "Process parameters" and "System setting" options are not supported.
- Output parameters of "Collection of records" type are not supported.
Pass files to the Sub-agent
You can pass files that already exist in Creatio to the Sub-agent, for example, documents from the Attachments tab of a record. Creatio.ai uses the file content when it runs the Sub-agent. For example, this is useful for making a short summary of a document or creating a record based on the file. The files must have a supported extension and size. Learn more: Use text files in Creatio.ai.
To pass files, add the Process file element before the Sub-agent element. Learn more: Process file process element. Then, click
next to Add files in the Sub-agent element setup area and select the file in the field that Creatio adds. Use the "Process parameter" or "Formula" option to select the "Collection of files" parameter or its nested "File" parameter of the Process file element.
Creatio records the files that the process handles in the process log. If a file operation fails, the process log displays the error.
Work with Sub-agent response
Sub-agent element provides the following responses you can use inside the business process:
-
Status. Primary means of understanding why the Sub-agent was executed. You can use it to define conditional flows for the business process element.
Available statuses
ExecutedSuccessfully
The Sub-agent was executed successfully.
FailedToExecute
The Sub-agent failed to execute.
InsufficientPermissions
The user lacks permissions to call the requested Sub-agent.
IntentNotFound
The Sub-agent was not found. For example, it was deleted.
InactiveIntent
The Sub-agent status is not "Active." For example, it was deactivated or put in development status.
WrongIntentMode
The Sub-agent is not in a "Workflows" mode.
ResponseParsingFailed
The output parameters of the response from the Sub-agent call could not be parsed.
CantGenerateGoodResponse
The Sub-agent call was unable to generate a good response based on Creatio AI estimation.
-
Warning message. Warning message about Sub-agent execution. The message appears independently from status.
-
Error message. Error message about Sub-agent execution.
-
Response text. Default text response from the Creatio Sub-agent to be used in the Process Designer. Legacy feature. We recommend using output parameters over response text in Creatio version 8.2.1 and later.
-
Output Parameters. Output parameters defined within the Sub-agent. Creatio AI populates them upon Sub-agent execution.
While Creatio takes effort to maintain consistency, the large language model might encounter parsing issues with output parameters upon Sub-agent execution. As such, we recommend checking response status and parameters when you design a business process.