Create an AI agent activity
You can use AI agents in your application to perform tasks. For example, you might configure an AI agent to suggest inputs for the fields on an activity form so that users only need to check the details before submitting. Equally, you might use an AI agent to perform tasks without any user input or supervision, such as generating reports or summarizing content. In either case, the AI agent can access data from within your application (as well as external sources) to perform the task.
To use an AI agent to perform tasks, you need to create an AI agent activity. AI agent activities are similar to casetype activities: each time the activity is performed it creates a case for the AI agent in relation to the current user and the target case. You can provide inputs to the AI agent when the activity starts, and you can access the outputs from the result form of the agent case.
For example, if you wanted to use an AI agent activity to generate a message of thanks to send to a repeat customer, you might add the agent activity to the Customer
casetype. You could then use a mapping to provide inputs for the AI agent when the activity starts. Once the activity is complete, you could use triggers and mappings to send the output (i.e. the AI-generated message) to the customer.
Create the agent activity
Before you can create an AI agent activity, you must create an AI agent. The AI agent configuration determines the LLM that is used.
To create an AI agent activity:
- From your Studio, select the parent casetype for the activity (such as a page or a standard casetype) and open the Activities tab.
- Click Create activity and enter a name to identify the activity.
- From the Type picklist, select Agent. Note that if have not created an AI agent, this option is not available.
- From the Agent picklist, select the AI agent you want to use to perform the activity.
- Configure other options as required and then click Submit.
Once you have created an AI agent activity, use the activity designer to add a mapping to the On start
stage and provide an Input
for the AI agent. The input allows you to provide context-specific instructions, which are used in combination with the prompt in the AI agent configuration. You can also use a mapping to specify the target case.
The output from the activity and a complete log of the conversation history with the AI agent are added to the result form of the agent case. You can access the output by adding a mapping from Task out
to the When done
stage of the AI agent activity.
Grant rights to perform the activity
As with activities performed by users, you must grant an AI agent rights to perform an agent activity. The rights that you grant to the agent role determine whether the activity is mandatory or optional.
To grant an agent rights to perform an activity:
- From the activity page, select the Rights tab and click Edit rights.
- Select the Agent tab. The available rights are listed.
- Use the relevant picklist to select the agent role(s) to which you want to grant the rights:
- Execute - The agent performs the mandatory task autonomously (i.e. without user input or oversight).
- Request - The agent performs the optional activity autonomously.
- Click Submit. The rights are granted to the agent role.
Currently you can only grant an AI agent rights to perform an activity autonomously (i.e. without user input or oversight). In future it will also be possible to require a user to review and approve an AI agent's inputs before the activity can be submitted.