# AI assistant provider

Use **Environment → AI Provider** to define AI assistant configuration for an **environment**

{% hint style="info" %}
This feature is available only in the **Docker / On‑Premise** deployment, and if you are an Environment Manager.
{% endhint %}

If you need access, contact your administrator or our sales team.

### How It Works

* The configuration set on the **Environment level** applies to the entire environment
* It affects all AI Engine applications running in that environment
* It serves as a **fallback** if no higher-level configuration is defined

#### Configuration Priority

AI configuration is resolved in the following order:

1. **Organization level**
2. **Environment level**
3. **AI Engine application level**

This means:

* If **Organization-level** configuration exists, it overrides Environment settings
* If not, the **Environment-level** configuration is used
* If neither is defined, the system falls back to the **AI Engine application level**

### What You Can Configure

The Environment AI Provider configuration uses the same setup as the global configuration.

You will define:

* **Model**
* **Provider**
* **Credentials** (API Key / Endpoint / JSON / Location)

See full setup guide: [Define AI Provider](/doc/ai-assistant/assistant-setup/define-ai-provider.md)

### When to Use Environment-Level Configuration

Use Environment-level configuration when:

* You do not want to define configuration for every Organization

### Notes

* Environment configuration overrides AI Engine configuration
* Organization configuration overrides Environment configuration
* Credentials are stored securely and are not visible after saving
* You can test the connection before saving

***


---

# 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.decisionrules.io/doc/environment/ai-assistant-provider.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.
