Generative AI connector and actionedit

The Generative AI connector uses axios to send a POST request to an OpenAI provider, either OpenAI or Azure OpenAI. The connector uses the run connector API to send the request.

Create connectors in Kibanaedit

You can create connectors in Stack Management > Connectors. For example:

Generative AI connector
Connector configurationedit

Generative AI connectors have the following configuration properties:

The name of the connector.
API Provider
The OpenAI API provider, either OpenAI or Azure OpenAI.
The OpenAI request URL.
The OpenAI or Azure OpenAI API key for authentication.

Create preconfigured connectorsedit

If you are running Kibana on-prem, you can define connectors by adding xpack.actions.preconfigured settings to your kibana.yml file. For example:

    name: preconfigured-gen-ai-connector-type
    actionTypeId: .gen-ai
      apiProvider: 'Azure OpenAI'
      apiKey: superlongapikey

Config defines information for the connector type.

A string that corresponds to OpenAI API Provider.
A URL string that corresponds to the OpenAI API URL.

Secrets defines sensitive information for the connector type.

A string that corresponds to OpenAI API Key.

Test connectorsedit

You can test connectors with the run connector API or as you’re creating or editing the connector in Kibana. For example:

Generative AI params test

The Generative AI actions have the following configuration properties.


A JSON payload sent to the OpenAI API URL. For example:

  "model": "gpt-3.5-turbo",
  "messages": [
      "role": "user",
      "content": "Hello world"

Connector networking configurationedit

Use the Action configuration settings to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use xpack.actions.customHostSettings to set per-host configurations.

Token usage dashboardedit

Once you’ve created a Generative AI connector, you can monitor its token usage using the Generative AI Token Usage dashboard. Select the connector in Stack Management > Connectors to view its details, then click the View OpenAI Usage Dashboard for "<Name>" Connector link to open the dashboard.

To view the dashboard, you need at least read and view_index_metadata privileges for the .kibana-event-log-* index and the Read feature privilege for Kibana. You can set up a role with these minimum privileges and assign it to non-admin users who need to view this dashboard.