Akeyless AI Insights

Overview

Akeyless AI Insights enables natural-language interaction with the Akeyless platform using Large Language Models (LLMs). To use AI Insights, it must be configured at:

  1. Account level — Enable the feature
  2. Gateway level — Specify the LLM target and model

Supported LLM Providers

  • OpenAI (GPT models)

Prerequisites

Before you begin, ensure you have the following:

  • Akeyless CLI installed and authenticated with admin access
  • LLM Provider account and API Key
  • Akeyless Gateway running
  • Ability to create and manage Targets in Akeyless
  • Protection key available for encrypting API credentials

High-Level Setup Steps

StepDescriptionTool
1Enable AI Insights at the account levelCLI
2Create an OpenAI TargetCLI
3Configure the Akeyless Gateway for AI InsightsREST API
4Validate the configuration and testCLI or Web UI

Step 1: Enable AI Insights at the Account Level

To enable AI Insights, run the following command:

akeyless update-account-settings --enable-ai-insights true

AI Insights can also be enabled at the account level using the Web UI.

📘

To disable AI Insights, run the following command:

akeyless update-account-settings --enable-ai-insights false

Step 2: Create an OpenAI Target

This section describes how to create an OpenAI target for use with AI Insights.

Command Syntax

Use the following command to create an OpenAI target:

akeyless target create openai \
  --name <target-name> \
  --api-key <openai-api-key> \
  [--openai-url <base-url>] \
  [--model <default-model>] \
  [--organization-id <org-id>] \
  [--key <protection-key>]
Example

The following example creates an OpenAI target named my-openai-target with the GPT-4 model:

akeyless target create openai \
  --name my-openai-target \
  --api-key sk-xxxx \
  --model gpt-4

Find the Target ID

To retrieve the target ID, run the following command:

akeyless get-target --name <target-name>

Model Requirements

OpenAI models must use the gpt- prefix. The following are valid examples:

  • gpt-4
  • gpt-3.5-turbo

Step 3: Configure the Gateway

This section describes how to configure the gateway to use AI Insights.

The gateway configuration uses the Akeyless Gateway API. First, obtain an authentication token, then use the token to configure the gateway.

Obtain an Authentication Token

TOKEN=$(akeyless auth | grep token | awk '{print $2}')

Configure AI Insights on the Gateway

Use the following command to configure AI Insights on the gateway:

curl -X PUT "http://localhost:8000/config/ai-insights" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "cluster_identity": {
      "account_id": "<a-1234567890>",
      "access_id": "<p-1234567890>",
      "cluster_name": "<my-gateway>"
    },
    "ai_insights": {
      "enable": true,
      "target_name": "<my-openai-target>",
      "model": "<gpt-4>"
    }
  }'

Disable AI Insights on the Gateway

To disable AI Insights on the gateway, set the enable field to false:

"ai_insights": { "enable": false }

The Gateway can also be configured with the Web UI.

Verification

This section describes how to verify that AI Insights is properly configured.

Verify the Account Setting

To verify that AI Insights is enabled at the account level, run the following command:

akeyless get-account-settings

Verify the Target

To verify that the OpenAI target is configured correctly, run the following command:

akeyless get-target --name my-openai-target

Verify the Gateway Configuration

To verify that the gateway is configured for AI Insights, run the following command:

curl -X GET http://localhost:8000/config/ai-insights

Test in the Web UI

To test AI Insights in the Akeyless Web UI, follow these steps:

  1. Open the Akeyless Web UI.
  2. Navigate to AI Insights.
  3. Start a chat session
  4. Ask a natural language question.

Troubleshooting

IssueResolution
AI Insights disabledEnable AI Insights at the account level
Gateway disabledUpdate gateway configuration
Invalid modelEnsure the model value uses the gpt- prefix
Invalid targetEnsure the target is an OpenAI target
Target not foundValidate the target name and ID
Authentication failureRe-authenticate by running akeyless auth
Gateway unreachableCheck that port 8000 is open and firewall rules allow access
API key errorsVerify the API key is valid and check the base URL

Configuration Checklist

  • Enable AI Insights
  • Create OpenAI target
  • Store target ID
  • Configure gateway
  • Verify the Gateway configuration
  • Test in the Web UI


Footer Section