Skip to content

Configure AI Actions

AI Actions are available in Ibexa DXP regardless of its edition. To use this feature you must first configure the built-in service connectors or build your own ones.

Next steps

Once the framework is configured, before you can start using AI Actions, you can configure access to Ibexa-made service connectors by following the instructions below, or create your own.

Only then you can restart you application and start working with the AI Actions feature.

Configure access to OpenAI (optional)

To use the built-in connector with the OpenAI service, you need to create an OpenAI account, get an API key, and make sure that you set up a billing method.

Then, in the root folder of your project, modify the .env file: find the OPENAI_API_KEY variable and replace a placeholder value with the API key that you got from the AI service.

1
2
3
###> ibexa/connector-openai ###
OPENAI_API_KEY=<your_api_key>
###< ibexa/connector-openai ###

Sample OpenAI action configurations

The AI actions come with sample AI action configurations to quickly get you started on using the feature.

Based on these examples, which reflect the most common use cases, you can learn to configure your own AI actions with greater ease.

Install Anthropic connector

Run the following command to install the package:

1
composer require ibexa/connector-anthropic

This command adds the feature code, including basic handlers that let you refine text or generate alternative text for images.

To use the connector with the Anthropic services, you need to create an account, make sure that you set up a billing method, and get an API key.

  1. Log in to your Anthropic Claude console.

  2. Go to API keys and click Create Key.

  3. Select the workspace, enter a Key Name and click Add.

  4. Take a note of the API key, because it is displayed only once.

Then, in the root folder of your project, modify the .env file: add an ANTHROPIC_API_KEY variable and populate its value with the API key that you got from the AI service.

1
2
3
###> ibexa/connector-anthropic ###
ANTHROPIC_API_KEY=<your_api_key>
###< ibexa/connector-anthropic ###

By default, when reaching out for responses, the Anthropic connector uses the Claude Sonnet 4 model. Users can override this setting at runtime when they edit or create an AI action. You can also change the default values globally. To do it, in config/packages folder, create a YAML file similar to this example:

1
2
3
4
5
6
7
8
ibexa_connector_anthropic:
    text_to_text:
        default_model: claude-opus-4-20250514
        default_temperature: 0.8
        default_max_tokens: 2045
        models:
            claude-sonnet-4-20250514: 'Claude 4 Sonnet (2025-05-14)'
            claude-opus-4-20250514: 'Claude Opus 4 (2025-05-14)'
You can now use the Anthropic connector in your project.

Install Google Gemini connector

Run the following command to install the package:

1
composer require ibexa/connector-gemini

This command adds the feature code, including basic handlers that let you refine text or generate alternative text for images.

Get API key

To use the connector with the Gemini services, you need to create an account, set up billing, enable Gemini API and get an API key.

Create the Google Cloud project

  1. Sign in to the Google Cloud Console.
  2. In the top bar, click Default Gemini Project to open a project picker.
  3. Click New project and provide project details:
    1. Add project name, for example, "My project".
    2. Modify the automatically generated Project ID if necessary.
    3. Select location: choose your organization.
  4. Click Create.

Configure billing

  1. Navigate to the Google Cloud Console's Billing page.
  2. If you do not have one, click Add billing account and add a payment method.
  3. In Your projects tab, locate your project, and in it's line, from the Actions menu, select Change billing.
  4. Select your active billing account, and click Set account.

Enable the Gemini API

  1. Navigate to the Google Cloud Console's APIs & Services page.
  2. From the left-hand menu, select Library and search for the Generative Language API.
  3. In the API's details page, click Enable.

Generate the API key

  1. Go to Google AI Studio's API keys page, and click Create API key.
  2. Provide a name for the API key, select "My project" from a list of projects and click Create key.
  3. Back inn the API keys list, in your project's line, copy the API key.

Set API key in configuration

Then, in the root folder of your project, modify the .env file: add an GEMINI_API_KEY variable and populate its value with the API key that you got from the AI service.

1
2
3
###> ibexa/connector-gemini ###
GEMINI_API_KEY=<your_api_key>
###< ibexa/connector-gemini ###

Different API keys for different SiteAccesses

If there are multiple SiteAccesses in your installation, you can set different API keys for each SiteAccess. To do it, set the keys under the ibexa.system.<scope> configuration key, like so:

1
2
3
4
5
6
7
ibexa:
    system:
    default:
        connector_gemini:
        gemini:
            api_key: '%env(GEMINI_API_KEY)%'
            base_url: 'https://generativelanguage.googleapis.com/v1beta/'

Configure default models

By default, when reaching out for responses, the Gemini connector uses the Gemini Pro model for text refinement and Gemini Flash model for alternative text generation. Users can override this setting at runtime when they edit or create an AI action. You can also change the default values globally. To do it, in config/packages folder, create a YAML file similar to this example:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
  ibexa_connector_gemini:
    text_to_text:
      models:
        gemini-pro-latest:
          label: 'Gemini Pro Latest'
          max_tokens: 4096
        gemini-flash-latest:
          label: 'Gemini Flash Latest'
          max_tokens: 4096
      default_model: gemini-pro-latest
      default_max_tokens: 4096   # must be <= the model’s max_tokens
      default_temperature: 0.8
    image_to_text:
      models:
        gemini-flash-latest:
          label: 'Gemini Flash Latest'
          max_tokens: 4096
      default_model: gemini-flash-latest
      default_max_tokens: 4096
      default_temperature: 1.0

When setting up models, make sure that you follow these rules:

  • default_model must reference a configured model
  • default_max_tokens must not exceed the model’s limit
  • If you use the same model for different action types, settings must be consistent

You can now use the Gemini connector in your project.

For more information, see Extend AI actions.

Configure access to Ibexa Connect

First, get the credentials by contacting Ibexa Support.

Create team

In Ibexa Connect, set up the account, and create a team. Navigate to the team details page and note down the numerical value of the Team id variable.

Creating a team matters, because scenarios that process data coming from your AI action are associated with a team. This way, if your organization has more than one Ibexa DXP project, each project can be linked to a different team and so can be scenarios used in those projects.

If specific users from the team are supposed to modify scenario settings, you must assign the right roles to them.

Create token

Navigate to your Ibexa Connect user's profile, and on the API ACCESS tab, create a new token. Select the following scopes to set permissions needed to enable the integration of platforms:

  • custom-property-structures:read
  • custom-property-structures:write
  • hooks:read
  • hooks:write
  • scenarios:read
  • scenarios:write
  • team-variables:read
  • team-variables:write
  • teams:write
  • templates:read
  • templates:write
  • udts:read
  • udts:write

Creating an API token

Copy the token code that appears on the tokens list, next to the label.

Set up credentials

In the root folder of your project, modify the .env file. Replace a placeholder value of the IBEXA_CONNECT_TOKEN variable with the token that you got from Ibexa Connect and provide a value of the IBEXA_CONNECT_TEAM_ID variable.

1
2
3
4
5
6
7
8
9
###> ibexa/connect ###
IBEXA_CONNECT_HOST=https://connect.ibexa.co
IBEXA_CONNECT_API_PATH=/api/v2/
# Token can be created in the user's profile in Ibexa Connect, under the 'API ACCESS' section.
IBEXA_CONNECT_TOKEN=<your_api_token>
# Use the URL below to read more on Ibexa Connect teams.
# https://doc.ibexa.co/projects/connect/en/latest/access_management/teams/
IBEXA_CONNECT_TEAM_ID=2
###< ibexa/connect ###

Initiate integration

Initiate the models provided by the handler by issuing the following command:

1
php bin/console ibexa:connect:init-connect-ai <team_id> <language> <action handler identifiers>

For example:

1
php bin/console ibexa:connect:init-connect-ai 2 en connect-image-to-text connect-text-to-text

Support for multiple Ibexa Connect languages

The language attribute determines the language in which template details such as module names will be displayed in Ibexa Connect's UI.

Then, create the Ibexa AI handler custom property in Ibexa Connect to store the list of available action handlers for this integration. You can do it by running the following command:

1
php bin/console ibexa:connect:init-custom-property-structures <organization-id> <action handler identifiers>

For example:

1
php bin/console ibexa:connect:init-custom-property-structures 4 connect-image-to-text connect-text-to-text

The Ibexa AI handler property attaches to a scenario to store information about the action handler associated with it. When creating a new Ibexa Connect-based AI action, the back office of Ibexa DXP shows only the existing scenarios that work with selected action handler.

Customize templates

Return to the Ibexa Connect dashboard and modify the Template for connect...handler templates by defining the logic needed to process the data.

Once the templates are ready, you can build scenarios from them, either directly in Ibexa Connect or in Ibexa DXP's user interface.