# AI Actions product guide

> For the complete documentation index, see [llms.txt](https://doc.ibexa.co/en/saas/llms.txt).

AI Actions help editors by automating repetitive tasks.

## What are AI Actions

Wherever you look, artificial intelligence becomes more and more important by enhancing user interaction and automating complex processes. Cohesivo is equipped with the AI Actions feature, which harnesses AI's potential to automate time-consuming editorial tasks. AI Actions is an extensible solution for integrating features provided by AI services into your workflows, all managed through a user-friendly interface.

AI Actions solution comes with the following action types:

- [Refine text](#refining-text): Rewrite existing text according to instructions set in a prompt
- [Generate alternative text](#generating-alternative-text): Generate alt text for images for accessibility purposes
- [Suggest taxonomy entries](#suggesting-taxonomy-entries): Generate tag or product category suggestions based on content fields

![AI Actions schematic](https://doc.ibexa.co/en/saas/ai/ai_actions/img/guide_ai_actions.png)

## Availability

You can use AI Actions, unless your organization requested to disable all AI-powered features in your system.

## How it works

AI Actions rely on an AI framework, which is responsible for gathering information from various sources, such as AI action types, AI action configurations, and contextual details like SiteAccess, user details, locale settings, and more. This data can then be combined with user input. It's then passed to a service connector for final processing on Cohesivo side. The service connector wraps all data into a prompt or another suitable format and sends it to an external service.

When the external service returns a response, the response goes back through the service connector and passes to the framework. It can then be presented to the user in any way necessary.

### Core concepts

#### AI service

AI service is a third party platform that provides access to artificial intelligence tools and capabilities. It executes tasks that it receives through a service connector.

#### Action

Actions are tasks or functions that are executed by an external AI service. Each action is a combination of an AI action type and an AI action configuration. Action types define what kind of task the AI service performs, while AI action configurations specify how the task should be executed. This clear separation allows for a flexible system where actions can be created, managed, and customized with minimal effort.

#### AI action type

AI action types are high level templates predefined by developers. AI action types correspond to tasks that users intend to perform when they interact with the interface. Each AI action type defines the structure and nature of the task that the AI service performs, and is interpreted by a handler.

Action type definitions specify the following information:

- an identifier
- a set of input parameters
- a set of output fields
- a category of action, for example, "text to image", "video to text"

AI action types could be designed, for example, to generate alternative text based on an image, translate a selected passage of text, or generate a video clip based on a description provided in the field. By defining AI action types, developers can create a wide range of functionalities that can be deployed within the application.

#### AI action configuration

AI action configurations store detailed parameters needed to generate AI actions based on AI action types. Website administrators manage AI action configurations in the [**Admin** panel](https://doc.ibexa.co/en/saas/administration/admin_panel/admin_panel/index.md), where they customize and fine-tune the behavior of each AI action. It might involve setting specific parameters used by the AI service, a response length, an expense limit, or configuring how the output should be handled. By making such adjustments, administrators can ensure that the actions are tailored to meet the needs of your organization.

#### Model

Once an AI action is defined and configured, it must be executed, and this is where models come into play. Each model is designed to work with a specific AI service and AI action type pair. Pieces of PHP code that are responsible for resolving a model are called handlers. They may include hardcoded prompts for conversational AI services like ChatGPT, or operate without prompts in the case of other types of AI. Handlers take parameters defined in the AI action type and configuration, combine it with user input and any predefined settings or prompts, and pass this information to the AI service for processing.

### Triggering actions from the UI

Among other elements, AI Actions include UI components that are used in:

- AI action management in the **Admin** panel
- text modification in online editor
- alt-text generation in the image management modal

These areas are user-friendly and well integrated with the existing application’s UI. Administrators can manage action configurations with ease, while editors can trigger actions with a click of a button. Procedures are straightforward and intuitive, ensuring that users can quickly achieve their desired outcomes.

### Triggering actions programmatically

AI Actions feature exposes a REST API interface that allows for programmatic execution of AI actions. With the API, developers can automate tasks and execute actions on batches of content by integrating them into workflows. For more information, see the [AI actions section in the REST API Reference](https://doc.ibexa.co/en/saas/api/rest_api/rest_api_reference/rest_api_reference.html#ai-actions-execute-ai-action).

## Capabilities

### Management

Users with the appropriate permissions, governed by role-based [policies](https://doc.ibexa.co/en/saas/permissions/policies/#ai-actions), can control the lifecycle of AI actions by creating, editing, executing, and deleting them. Additionally, AI action configurations can be enabled or disabled depending on the organization's needs.

![Configurations management screen](https://doc.ibexa.co/en/saas/ai/ai_actions/img/ai_actions_list.png)

An intuitive AI Actions interface within the **Admin** panel displays a list of all available AI actions. Here, you can search for specific actions and filter them by type or status. By accessing the detailed view of individual AI actions, you can quickly review all their parameters.

## Use cases

### Refining text

Content editors can benefit from using AI capabilities to [enhance or modify text](https://doc.ibexa.co/projects/userguide/en/saas/content_management/create_edit_content_items/#ai-assistant). With a few clicks, they can improve content quality or reduce the workload. While working on content, editors can request that AI performs specific actions such as: adjusting the length of the text, changing the tone, or correcting linguistic errors.

![AI Assistant](https://doc.ibexa.co/en/saas/ai/ai_actions/img/ai_assistant.png)

This functionality is available in content types that include RichText, Text line, Text Block fields, and certain Page Builder blocks.

### Generating alternative text

Media managers and content editors can benefit from employing AI to [generate alt text for images](https://doc.ibexa.co/projects/userguide/en/saas/image_management/upload_images/#ai), which results in improved accessibility and SEO. Once the feature is configured, editors can generate alt text for images they upload to the system by clicking one button.

![Alt text generation](https://doc.ibexa.co/en/saas/ai/ai_actions/img/alt_text_use_ai.png)

With some customization, administrators could use the API to run a batch process against a larger collection of illustrations.

### Suggesting taxonomy entries

Content editors and product managers can use [taxonomy suggestions](https://doc.ibexa.co/en/saas/content_management/taxonomy/taxonomy/#taxonomy-suggestions) when assigning tags or product categories to content items and products. Instead of manually browsing through extensive taxonomy trees, editors can request suggestions based on the content's text fields, such as name and description.
