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:
- Account level — Enable the feature
- 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
- OpenAI — https://platform.openai.com/api-keys
- Akeyless Gateway running
- Ability to create and manage Targets in Akeyless
- Protection key available for encrypting API credentials
High-Level Setup Steps
| Step | Description | Tool |
|---|---|---|
| 1 | Enable AI Insights at the account level | CLI |
| 2 | Create an OpenAI Target | CLI |
| 3 | Configure the Akeyless Gateway for AI Insights | REST API |
| 4 | Validate the configuration and test | CLI 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 trueAI 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-4Find 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-settingsVerify the Target
To verify that the OpenAI target is configured correctly, run the following command:
akeyless get-target --name my-openai-targetVerify 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:
- Open the Akeyless Web UI.
- Navigate to AI Insights.
- Start a chat session
- Ask a natural language question.
Troubleshooting
| Issue | Resolution |
|---|---|
| AI Insights disabled | Enable AI Insights at the account level |
| Gateway disabled | Update gateway configuration |
| Invalid model | Ensure the model value uses the gpt- prefix |
| Invalid target | Ensure the target is an OpenAI target |
| Target not found | Validate the target name and ID |
| Authentication failure | Re-authenticate by running akeyless auth |
| Gateway unreachable | Check that port 8000 is open and firewall rules allow access |
| API key errors | Verify 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
Updated 6 days ago
