# KeeperAI

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2F7rQtwjXJlA3ddCR7ztE5%2FKeeperAI.png?alt=media&#x26;token=53ec3b12-b6fd-451d-9cc1-c0c5da9c81a5" alt=""><figcaption></figcaption></figure>

## Overview

KeeperAI is an agentic service that provides AI-powered security features including threat detection, anomaly detection, privileged session visual summaries, and context-aware analysis. KeeperAI is embedded into the Keeper Gateway and enhances key functional areas across the Keeper platform, including privileged sessions and KeeperDB.

## Key Features

* **Automated Session Analysis**: Analyze session metadata, keystroke logs, visual interaction and command execution logs to detect unusual behavior
* **Threat Classification**: Automatically categorize detected threats and assign risk levels, generate alerts and push events to connected SIEM provider.
* **Database administration**: Assists within KeeperDB database sessions with query generation, optimization, data science workflows, human-in-the-loop query approvals, and context-aware analysis.
* **Flexible Deployment**: Support for both third-party, cloud-based, and on-premises LLM inference
* **Customizable Configuration**: Adjust risk parameters and detection rules to your environment

Video Overview:

{% embed url="<https://vimeo.com/1143898222?fe=sh&fl=pl>" %}
KeeperAI Threat Detection for Privileged Sessions
{% endembed %}

KeeperAI Product Page:

{% embed url="<https://www.keepersecurity.com/features/keeper-ai/>" %}

## Security Model

The KeeperAI agent executes on the Keeper Gateway which is hosted by the customer and communicates directly to the customer's preferred AI provider such as OpenAI, Anthropic, AWS Bedrock or any self-hosted LLM. The security model of the KeeperPAM platform preserves zero knowledge while offering oversight of all user interactions with privileged resources.

<figure><img src="/files/xzoDZa8qLcxMFK4YiYJN" alt=""><figcaption><p>KeeperAI Security Model</p></figcaption></figure>

## Supported Protocols

The KeeperAI agent is operates on both visual interaction and text that the user types during a privileged session. All of the KeeperPAM connection protocols are supported, including:

* RDP
* VNC
* SSH
* Databases
* Remote Browser Isolation (RBI)
* Kubernetes
* Telnet

### **Screenshots**

#### **RDP to a Windows Domain Controller**

<figure><img src="/files/CfqxuHfMWUbG9kzbQL6Q" alt=""><figcaption><p>KeeperAI Session Analysis</p></figcaption></figure>

#### **VNC to a Linux Server**

<figure><img src="/files/c8y7ziLB5NWoUAmWtJ6a" alt=""><figcaption></figcaption></figure>

#### **SSH to a Linux Server**

<figure><img src="/files/o2kP9iLk4EIWZZtgASe9" alt=""><figcaption></figcaption></figure>

#### RBI - Loading the AWS Console

<figure><img src="/files/DrACjLO4t5fmngJw8ioD" alt=""><figcaption></figcaption></figure>

#### **KeeperDB - MySQL Session**

<figure><img src="/files/yFvpeSF8fEYifSU6vSuL" alt=""><figcaption></figcaption></figure>

#### KeeperDB - AI Assistant

KeeperAI assists with queries and data science tasks inside KeeperDB. Read-only analysis can run directly, while queries that modify data require human approval. Responses stay grounded in the active schema and session context.

<figure><img src="/files/fel1xe4vOSaaYNFIwFgg" alt=""><figcaption></figcaption></figure>

***

## **KeeperAI Setup**

### Step 1 - Update the Keeper Gateway

The Keeper Gateway works with your AI provider. Ensure that you are running version 1.8.0 or newer. For detailed setup instructions, [follow this guide](/keeperpam/privileged-access-manager/getting-started/gateways.md).

### Step 2 - LLM Integration

KeeperAI leverages Large Language Models (LLMs) to power its threat detection capabilities. The Keeper Gateway communicates with any LLM of your choice to analyze session data and generate intelligent security insights. This integration is fundamental to KeeperAI's ability to detect suspicious patterns and provide detailed session summaries.

{% hint style="warning" %}
**Disclaimer**: AI predictions are inherently probabilistic and may not always be accurate. The selection of LLM providers and models is made at the user's discretion, and KeeperAI cannot guarantee that the AI will fully understand or correctly interpret tasks. Users are encouraged to exercise caution and validate AI outputs as part of their decision-making processes.
{% endhint %}

KeeperAI is designed to work with multiple LLM providers, giving you flexibility in your deployment. Self-hosted and cloud-based LLMs are compatible.

#### Docker Installation Method

<details>

<summary>OpenAI-Compatible API</summary>

Support for any API providers implementing that use OpenAI’s request and response formats for the `/chat/completions` endpoint.

**Configuration**

1. Ensure your Gateway has the appropriate permissions to access the LLM service
2. Configure the Gateway with the following environment variables for the gateway service in your Docker Compose file:

```yaml
environment:
  KEEPER_GATEWAY_AI_LLM_PROVIDER: "openai-generic"
  KEEPER_GATEWAY_AI_BASE_URL: "<your-base-url>"
  KEEPER_GATEWAY_AI_API_KEY: "<your-api-key>"
  KEEPER_GATEWAY_AI_MODEL: "<your-model-id>"
```

{% hint style="info" %}
The `KEEPER_GATEWAY_AI_BASE_URL` **must** include a valid protocol prefix (`http://` or `https://`). If the protocol is missing, Keeper Gateway will throw a configuration error during startup.

For example:

✅ `https://your-llm-provider.com/v1`\
❌ `your-llm-provider.com/v1`
{% endhint %}

A non-exhaustive list of providers you can use:

<table data-full-width="false"><thead><tr><th>Inference Provider</th><th>Resources</th><th>Infrastructure<select multiple><option value="rGhefSI66jVq" label="SaaS" color="blue"></option><option value="YgGEIZr9Vyx0" label="Self-Hosted" color="blue"></option></select></th></tr></thead><tbody><tr><td>Ask Sage</td><td><a href="https://www.asksage.ai/">Ask Sage</a></td><td><span data-option="rGhefSI66jVq">SaaS, </span><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr><tr><td>Azure AI Foundry</td><td><a href="https://ai.azure.com/">Azure AI Foundry</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Cohere</td><td><a href="https://docs.cohere.com/v2/docs/compatibility-api">Cohere</a></td><td><span data-option="rGhefSI66jVq">SaaS, </span><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr><tr><td>Cerebras</td><td><a href="https://inference-docs.cerebras.ai/resources/openai">Cerebras</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Fireworks AI</td><td><a href="https://docs.fireworks.ai/tools-sdks/openai-compatibility">Fireworks AI</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Featherless AI</td><td><a href="https://featherless.ai/docs/api-reference">Featherless AI</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Groq</td><td><a href="https://console.groq.com/docs/api-reference#chat">Groq</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Grok</td><td><a href="https://docs.x.ai/docs/api-reference#chat-completions">Grok</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Hyperbolic</td><td><a href="https://docs.hyperbolic.xyz/docs/inference-api">Hyperbolic</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Hugging Face</td><td><a href="https://huggingface.co/inference-endpoints/dedicated">Hugging Face</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Keywords AI</td><td><a href="https://docs.keywordsai.co/integration/development-frameworks/llm_framework/openai/openai-sdk">Keywords AI</a></td><td><span data-option="rGhefSI66jVq">SaaS, </span><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr><tr><td>LiteLLM</td><td><a href="https://www.litellm.ai/">LiteLLM</a></td><td><span data-option="rGhefSI66jVq">SaaS, </span><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr><tr><td>LM Studio</td><td><a href="https://lmstudio.ai/docs/app/api/endpoints/openai">LM Studio</a></td><td><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr><tr><td>Nebius</td><td><a href="https://docs.nebius.com/studio/inference/quickstart">Nebius</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Novita</td><td><a href="https://novita.ai/docs/guides/llm-api#api-integration">Novita</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>NScale</td><td><a href="https://docs.nscale.com/api-reference/inferencing/create-chat-completion">NScale</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Ollama</td><td><a href="https://docs.ollama.com/openai">Ollama</a></td><td><span data-option="rGhefSI66jVq">SaaS, </span><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr><tr><td>OpenRouter</td><td><a href="https://openrouter.ai/">OpenRouter</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>SambaNova</td><td><a href="https://docs-legacy.sambanova.ai/sambastudio/latest/open-ai-api.html">SambaNova</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Tinfoil</td><td><a href="https://docs.tinfoil.sh/sdk/overview#direct-api-access">Tinfoil</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>TogetherAI</td><td><a href="https://docs.together.ai/docs/openai-api-compatibility">TogetherAI</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>Unify AI</td><td><a href="https://docs.unify.ai/api-reference/llm_queries/chat_completions">Unify AI</a></td><td><span data-option="rGhefSI66jVq">SaaS, </span><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr><tr><td>Vercel AI Gateway</td><td><a href="https://vercel.com/docs/ai-gateway/openai-compat">Vercel AI Gateway</a></td><td><span data-option="rGhefSI66jVq">SaaS</span></td></tr><tr><td>vLLM</td><td><a href="https://docs.vllm.ai/en/latest/serving/openai_compatible_server.html">vLLM</a></td><td><span data-option="YgGEIZr9Vyx0">Self-Hosted</span></td></tr></tbody></table>

</details>

<details>

<summary>AWS Bedrock</summary>

You can get started quickly, privately customize foundation models with your own data, and easily and securely integrate and deploy them into your applications using AWS tools without having to manage any infrastructure.

**Configuration**

1. Ensure that the IAM role for the Gateway has the `AmazonBedrockFullAccess` policy attached
2. [Request access](https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.html#getting-started-model-access) through AWS Console to an Amazon Bedrock foundation model
3. Select a model from the [supported list](https://docs.aws.amazon.com/bedrock/latest/userguide/models-supported.html) and note the corresponding model ID.
4. Configure the Gateway with the following environment variables for the gateway service in your Docker Compose file:

```yaml
environment:
  KEEPER_GATEWAY_AI_LLM_PROVIDER: "aws-bedrock"
  KEEPER_GATEWAY_AI_MODEL: "<your-model-id>"
  AWS_REGION: "<your-aws-region>"
```

</details>

<details>

<summary>Anthropic</summary>

**Configuration**

Before you begin, [create an API key in the Anthropic Console](https://console.anthropic.com/settings/keys).

1. Configure the Gateway with the following environment variables for the gateway service in your Docker Compose file:

```yaml
environment:
  KEEPER_GATEWAY_AI_LLM_PROVIDER: "anthropic"
  KEEPER_GATEWAY_AI_API_KEY: "<your-api-key>"
  KEEPER_GATEWAY_AI_MODEL: "<your-model-id>"
```

</details>

<details>

<summary>Google AI: Gemini</summary>

**Configuration**

Before you begin, [create an API key in the Google AI dashboard](https://aistudio.google.com/apikey).

1. Configure the Gateway with the following environment variables for the gateway service in your Docker Compose file:

```yaml
environment:
  KEEPER_GATEWAY_AI_LLM_PROVIDER: "google-ai"
  KEEPER_GATEWAY_AI_API_KEY: "<your-api-key>"
  KEEPER_GATEWAY_AI_MODEL: "<your-model-id>"
```

</details>

<details>

<summary>Google: Vertex</summary>

You need to use an account with a `ProjectID` that has been authorized to use Vertex. When administering your Google Cloud account, be sure to enable Vertex, and specify your project’s ID when authenticating with `gcloud auth`:

```sh
gcloud auth application-default login --project MY_PROJECT_ID
```

* If you’re using Google Cloud [application default credentials](https://cloud.google.com/docs/authentication/application-default-credentials), you can expect authentication to work out of the box.
* Setting [`options.credentials`](https://docs.boundaryml.com/ref/llm-client-providers/google-vertex#credentials) will take precedence and force `vertex-ai` to load service account credentials from that file path.

**Configuration**

1. Configure the Gateway with the following environment variables for the gateway service in your Docker Compose file:

```yaml
environment:
  KEEPER_GATEWAY_AI_LLM_PROVIDER: "vertex-ai"
  KEEPER_GATEWAY_AI_MODEL: "<your-model-id>"
  KEEPER_GATEWAY_AI_LOCATION: "<your-location>"
```

</details>

<details>

<summary>OpenAI</summary>

**Configuration**

Before you begin, [create an API key in the Open AI Platform dashboard](https://platform.openai.com/api-keys).

1. Configure the Gateway with the following environment variables for the gateway service in your Docker Compose file:

```yaml
environment:
  KEEPER_GATEWAY_AI_LLM_PROVIDER: "openai"
  KEEPER_GATEWAY_AI_API_KEY: "<your-api-key>"
  KEEPER_GATEWAY_AI_MODEL: "<your-model-id>"
```

</details>

<details>

<summary>Azure OpenAI</summary>

**Configuration**

1. Configure the Gateway with the following environment variables for the gateway service in your Docker Compose file:

```yaml
environment:
  KEEPER_GATEWAY_AI_LLM_PROVIDER: "azure-openai"
  KEEPER_GATEWAY_AI_RESOURCE_NAME: "<your-resource-name>"
  KEEPER_GATEWAY_AI_DEPLOYMENT_ID: "<your-deployment-id>"
  KEEPER_GATEWAY_AI_API_VERSION: "<your-api-version>"
  KEEPER_GATEWAY_AI_API_KEY: "<your-api-key>"
```

</details>

#### Native Installation Method

<details>

<summary>Windows Installation Instructions</summary>

To configure the environment variables for the Keeper Gateway service on Windows, follow these steps:

Open PowerShell as Administrator and Set the variables at the Machine Scope

```sh
setx KEEPER_GATEWAY_AI_LLM_PROVIDER "<your_provider_name>" /M
setx KEEPER_GATEWAY_AI_BASE_URL "<your-base-url>" /M
setx KEEPER_GATEWAY_AI_API_KEY "<your-api-key>" /M
setx KEEPER_GATEWAY_AI_MODEL "<your-model-id>" /M
```

Restart the Gateway service so it picks up the new environment:

```
Restart-Service -DisplayName "Keeper Gateway Service"
```

</details>

<details>

<summary>Linux Installation Instructions</summary>

To configure the environment variables for the Keeper Gateway service on Linux, follow these steps:

Edit the `systemd` service file:

```sh
sudo vi /etc/systemd/system/keeper-gateway.service
```

Extend the `Environment=` line with your required environment variables based on the supported LLM Providers above.

```sh
Environment=KEEPER_GATEWAY_AI_LLM_PROVIDER="<your_provider_name>"
Environment=KEEPER_GATEWAY_AI_BASE_URL="<your-base-url>"
Environment=KEEPER_GATEWAY_AI_API_KEY="<your-api-key>"
Environment=KEEPER_GATEWAY_AI_MODEL="<your-model-id>"
```

Reload the daemon and restart the gateway service

```shell
# reload the daemon
sudo systemctl daemon-reload

# optionally you can validate the environment variables are setup properly
sudo systemctl show keeper-gateway.service | grep Environment=

# restart the keeper gateway service
sudo systemctl restart keeper-gateway.service
```

</details>

### Step 3 - PAM Configuration Settings

* Go to Secrets Manager > PAM Configuration
* Select your resource and scroll to the KeeperAI Features section.
* Toggle the setting to enable.

<figure><img src="/files/8TQpAsHHR3bF4JHdrWkP" alt=""><figcaption></figcaption></figure>

### Step 4 - Activating Threat Detection on a Resource

The PAM Machine and PAM Database records support KeeperAI capabilities.

* **Edit PAM Settings** for your selected resource.
* Go to the **Connections** tab.
* Enable all options under **Session Recording**.

<figure><img src="/files/bNTWLe8Qc04KvZCe50BJ" alt=""><figcaption></figcaption></figure>

* Navigate to the **KeeperAI** tab and switch on the **Enable KeeperAI** toggle.

<figure><img src="/files/YfrcHviDRfzfQcFofZ88" alt=""><figcaption></figcaption></figure>

By default, KeeperAI automatically classifies commands into the appropriate **Risk Level** categories.

To enforce stronger controls, you can enable **Terminate Session** for a given risk level. When active, any command classified at that level will immediately end the session.

### KeeperAI Exceptions & Custom Rules

For terminal-based connections, use the **Exceptions** pop-up to customize how specific keywords or patterns are classified. Add from the provided dropdown examples, or enter your own plain text or regex strings.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FxV680m7ZTsUBAjCMwrCX%2FScreenshot%202025-08-26%20at%2010.53.12%E2%80%AFAM.png?alt=media&#x26;token=023487e4-8f3b-4fcf-b950-451763ff7859" alt=""><figcaption></figcaption></figure>

***

### Reviewing Session Summaries

KeeperAI generates AI-powered summaries for each recorded session, helping security teams quickly review and understand user activity. To view a summary, open the options menu for the monitored resource and select **Session Activity**.

1. Access the Session Recordings section in the Vault UI
   1. Right click on the record or click on the options icon `⋮` and select "Session Activity"
2. Click on a session row with KeeperAI analysis to open the Session Analysis popup for detailed summaries of each command executed during the session
3. Click on the play button to watch the session recording to see session playback in realtime
4. Click on the download button to save the session recording files locally

{% hint style="warning" %}
When downloading session recording files locally, please note that these files will be unencrypted and may contain sensitive information. Ensure you store and handle these files securely according to your organization's data protection policies.
{% endhint %}

<figure><img src="/files/Pf8UEWr8s6Tm0Wf6sNdY" alt=""><figcaption><p>Session Activity</p></figcaption></figure>

<figure><img src="/files/zwv4mCx7RElhEDTgbLGx" alt=""><figcaption><p>KeeperAI Session Analysis</p></figcaption></figure>

<figure><img src="/files/YXH9qsbkyeILUkycy2jd" alt=""><figcaption><p>Session Playback</p></figcaption></figure>

* **Open Analysis**: Click on a session row to launch the Session Analysis popup, showing detailed summaries of each command executed.
* **Playback:** Click the Play button to watch the full session recording in real time.
* **Download:** Use the Download button to save session recording files locally for offline review.

{% hint style="warning" %}
When downloading session recording files locally, please note that these files will be unencrypted and may contain sensitive information. Ensure you store and handle these files securely according to your organization's data protection policies.
{% endhint %}

#### Notes

* By default AI will make its best effort to classify commands into proper Risk Levels categories
* Enable "Terminate Session" for a risk level if you wish to allow classified commands to trigger a session termination for the selected risk level
* If you have specific pattern-matching keywords you may open the Exceptions popup to customize the risk level classification and policy on detection

#### Risk Classifications

KeeperAI will categorize commands into risk levels for threat detection:

* **Critical**: Severe security threats requiring immediate action
* **High**: Significant security concerns that should be addressed promptly
* **Medium**: Potential security issues requiring monitoring
* **Low:** Normal or benign behavior that does not require monitoring

***

### SIEM Integration

KeeperAI automatically generates [ARAM events](/keeperpam/privileged-access-manager/references/event-reporting.md) for detected threats and resource configurations, enabling integration with your existing security workflow.

We recommend the following:

* Set up Alerts to send realtime notifications upon the detection of a threat
* Send all event logs to your connected SIEM provider

***

## FAQ

**Q: Can I use my own LLM model with KeeperAI?**\
A: Yes, KeeperAI supports any provider implementing the OpenAI `/chat/completions` API endpoint

**Q: Does KeeperAI work in real-time?**\
A: Yes, KeeperAI analyzes privileged sessions in real-time after each user entry and saves completed session recordings and analysis in encrypted files for later review.

**Q: How does KeeperAI handle sensitive information?**\
A: KeeperAI stores session recordings and analysis in encrypted files. These files can only be decrypted by the customer who has privilege to view session recordings. In a future release, KeeperAI will include enhanced Personally Identifiable Information (PII) detection with options to remove PII before sending to the LLM or remove PII from LLM responses.

**Q: How does data flow between the Gateway, LLM provider, and Keeper's systems?**\
A: KeeperAI uses a secure, multi-step communication flow to ensure data privacy and security:\
1\. Gateway ↔ LLM Provider: The Keeper Gateway communicates directly with your configured LLM provider via encrypted HTTPS to analyze session commands in real-time\
2\. Gateway → Keeper: After receiving the LLM analysis, the Gateway encrypts all session data and analysis results using a unique record key before transmitting to Keeper's endpoint for storage.

**Q: Can I run KeeperAI in air-gapped environments?**\
A: Yes, using on-premises LLM deployment, you can interact with a local service instead of third-party or internet-accessible services.

**Q: What's the expected cost per session analysis?**\
A: To help calculate costs, our risk analysis prompts used for each command are approximately 550 tokens and final summary prompts that summarize all commands are around 400 tokens, excluding user input command context. Additional tokens will be used depending on the context and length of the input commands.

**Q: What data is sent to third-party LLM providers, and how is it protected?**\
A: Command text is sent via encrypted HTTPS to your configured LLM provider. The LLM response is then encrypted before being saved to Keeper's cloud. All traffic occurs directly from the Gateway to the LLM provider. To maintain zero-knowledge and zero-trust no traffic is ever sent to Keeper without first being encrypted by your private key.

**Q: Can I export threat detection data for compliance reporting?**\
A: Yes, session analysis data can be exported in JSON format from the Session Analysis popup for compliance reporting purposes.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.keeper.io/keeperpam/privileged-access-manager/keeperai.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
