# Enabling AI Features in On-Premises

AI assistant functionality is not enabled by default in on-premises deployments. To use AI-powered features, you must configure environment variables in your env file.

### **Requirements**

* Ability to modify environment variables
* Ability to restart or redeploy the application
* Access to external AI provider APIs

{% stepper %}
{% step %}

### Add AI Configuration

Add the following variables to your environment configuration:

```dotenv
#------------------------------------------------------------------------------
# AI parameters (must be configured)
#------------------------------------------------------------------------------
ASSISTANTS_ENABLED=1
OPENAI_API_KEY=your_openai_api_key
OPENAI_MAX_TOKENS=1024
ANTHROPIC_API_KEY=
```

> Enables AI assistant functionality.
>
> * `0` — Disabled (default)
> * `1` — Enabled
>
> You must set this to `1` to activate any AI features.
> {% endstep %}

{% step %}

### Configure Parameters

AI features rely on external AI providers. The provider you configure determines which features are available and how they behave.

{% hint style="info" %}

#### Feature-Based Provider Usage

* Ask AI feature: Requires Anthropic
* Agents: Supports Anthropic and OpenAI

If you are not using one of these providers, you can leave its configuration empty.
{% endhint %}

#### **Anthropic (Required for Ask AI)**

To use the Ask AI feature, you must configure Anthropic:

```
ANTHROPIC_API_KEY=your_anthropic_api_key
```

#### **OpenAI**&#x20;

OpenAI can be used with **Agents**.

```
OPENAI_API_KEY=your_openai_api_key
OPENAI_MAX_TOKENS=1024
```

#### **Using Agents with Multiple Providers**

If both providers are configured:

```
ANTHROPIC_API_KEY=your_anthropic_api_key
OPENAI_API_KEY=your_openai_api_key
```

{% hint style="success" %}
💡 **Flexible Model Selection**\
When both Anthropic and OpenAI are configured, users can choose which provider (model) an Agent uses directly within JetAdmin.
{% endhint %}
{% endstep %}
{% endstepper %}

{% hint style="warning" %}

#### Notes

* At least one AI provider API key must be configured when `ASSISTANTS_ENABLED=1`
* Ensure outbound network access to AI providers (e.g., OpenAI, Anthropic) is allowed
  {% endhint %}


---

# 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.jetadmin.io/jet-bridge-deployment/on-premise/.env-configuration-local-host/enabling-ai-features-in-on-premises.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.
