> For the complete documentation index, see [llms.txt](https://docs.openiam.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.openiam.com/administration-guide/platform/turn-on-the-ai-assistant.md).

# Turn on the AI assistant

Turn the SelfService AI assistant on by giving its AI Assistant agent record a model connection and activating it, choose who is offered it through the AI\_ASSISTANT menu entitlement, and know what peo

**Applies to:** OpenIAM 2026.11.2

## What this is, and when you need it

The AI assistant in the new SelfService interface is off until you turn it on. Three things decide whether a person is offered it, and all three must hold: the assistant's agent record, **AI Assistant** (`AI_ASSISTANT_AGENT`), is Active and holds a model connection; the AI assistant service is running and healthy; and the person holds the `AI_ASSISTANT` menu entitlement. Read this page to turn the assistant on for the first time, to roll it out to a first group of people, to rotate its model key, to take it away again, or to find out why someone cannot see it.

The agent record is a non-human identity (NHI), governed like any other: it has an owner, a sponsor, an expiry date and an audit trail. How such a record works in general is on [Govern AI agents as non-human identities](https://docs.openiam.com/administration-guide/federation/mcp-server/mcp-agents.md). What people are told about the model is on [Where the AI assistant sends people's data](https://docs.openiam.com/administration-guide/federation/mcp-server/ai-assistant-model-and-data-location.md), how long conversations are kept is on [AI assistant conversation history](https://docs.openiam.com/administration-guide/platform/ai-assistant-conversation-history.md), and the model the assistant runs on is on [Supported model for the AI assistant](https://docs.openiam.com/administration-guide/platform/ai-assistant-supported-models.md).

## At a glance

|                           |                                                                                                                                                                                                                                                            |
| ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Deployment switch**     | The **AI Assistant** agent record, `AI_ASSISTANT_AGENT`, under **Webconsole → Non-Human Identities → Inventory**. The assistant is on only while the record is **Active**, its expiry date has not passed, and it holds a model connection with an API key |
| **Shipped state**         | **Draft**, with no model connection, so the assistant is off on a fresh installation and after the upgrade to 2026.11.2                                                                                                                                    |
| **Model connection**      | The **Model connection** section of the record's **Agent** tab: provider, base URL, model and API key. Oracle Cloud Infrastructure (OCI) Generative AI is the only provider                                                                                |
| **Where the key is kept** | Vault, at `vault.secret.nhi.AI_ASSISTANT_AGENT.AI_ASSISTANT_MODEL`. No screen, API, health report, log or audit record ever shows it                                                                                                                       |
| **Who is offered it**     | Holders of the `AI_ASSISTANT` menu entitlement, a `MENU_ITEM` at the top level of the SelfService v2 menu tree. It is not public                                                                                                                           |
| **Granted by default to** | Super Security Admin (role `9`) only. No end-user role holds it until you grant it                                                                                                                                                                         |
| **Service health**        | The AI assistant service must answer its health check and must not report itself `degraded`. See [When the model stops answering](#when-the-model-stops-answering)                                                                                         |
| **What people see**       | An **Assistant** entry with a sparkle icon and a **Beta** label, at the top of the SelfService menu, above the menu groups                                                                                                                                 |
| **When a change shows**   | On the person's next page load. While a page shows the assistant, SelfService re-reads the service's health every 60 seconds, and every 30 seconds while it is degraded                                                                                    |

The system property `org.openiam.ai.assistant.enabled`, which switched the assistant on in 2026.11.1, is gone. The 2026.11.2 migration deletes it, and setting it again has no effect.

## Before you begin

* Administrator access to the Webconsole, with the **Non-Human Identities** and **Access Control → Role** menus, and the right to change and activate non-human identities.
* The `2026.11.1.0` and `2026.11.2.0` schema scripts applied. The first adds the `AI_ASSISTANT` entitlement and the agent record; the second adds the record's model-connection credential and moves the record to Draft, as described in [What the upgrade does](#what-the-upgrade-does).
* The authorization graph rebuilt once after those scripts, so the role grant they add takes effect. See [Rebuild the authorization graph](https://docs.openiam.com/administration-guide/operations/rebuild-the-authorization-graph.md).
* The AI assistant service deployed and reachable from SelfService, with a Vault identity that may **read** `secret/openiam/vault.secret.nhi.AI_ASSISTANT_AGENT.AI_ASSISTANT_MODEL`. Without that read, the service has no model and reports itself `degraded`.
* The service able to sign in to Vault. By default it signs in the way the other OpenIAM modules do, with the key store and password that `vault.ssl.key-store` and `vault.ssl.key-store-password` name in `${confpath}/conf/properties/vault.properties`, so a standard install needs no extra setting. The service must be able to read that key store file. A Vault token (`VAULT_TOKEN`) or a PEM client certificate and key (`vault.ssl.client-cert` and `vault.ssl.client-key`, or `VAULT_CLIENT_CERT` and `VAULT_CLIENT_KEY`) takes precedence when one is set.
* The service able to trust the Vault server. Without `vault.ssl.ca-cert`, it trusts a Vault server that presents the certificate held in its own key store, which is how the OpenIAM installers set up Vault. A Vault server with another certificate needs `vault.ssl.ca-cert` set to the CA that signed it.
* The service's SelfService URL and MCP server URL set, as described in [Settings the service needs to start](#settings-the-service-needs-to-start). Without them it does not start.
* An OCI Generative AI API key for [the supported model](https://docs.openiam.com/administration-guide/platform/ai-assistant-supported-models.md), created in the region whose endpoint you will enter: `us-chicago-1` for the United States or `eu-frankfurt-1` for the European Union. It is a Generative AI API key, not an OCI API signing key, and it works only in the region it was created in.
* A person to name as the record's sponsor, the human answerable for the assistant. You can name yourself.

## What the upgrade does

The 2026.11.2 migration moves the **AI Assistant** record from **Active** to **Draft**, but only while it is still as the 2026.11.1 migration seeded it: Active, with no expiry date, no sponsor and no stored secret. A record an administrator already changed, for example by giving it an expiry date, keeps its status. The record's **Audit Trail** tab records the change as an `UPDATED` lifecycle event with the comment `The assistant is off until an administrator adds its model connection and activates this agent (OE-6251).`

So, after the upgrade, the assistant is off for everyone until you complete the two procedures below.

## Settings the service needs to start

The AI assistant service reads its settings from `${confpath}/conf/properties/ai-assistant.properties`. The environment variable beside each setting overrides the file. Two settings have no default, and the service does not start while either is unset:

| Property                                    | Environment variable | What it is                                                                                                                                                                                                                                                                    |
| ------------------------------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `org.openiam.ai.assistant.openiam.api-base` | `OPENIAM_API_BASE`   | The SelfService URL, context path included, for example `https://iam.example.com/selfservice`. The service checks each person's sign-in there                                                                                                                                 |
| `org.openiam.ai.assistant.mcp.base-url`     | `MCP_BASE_URL`       | The root URL of the Model Context Protocol (MCP) server the assistant reads OpenIAM data through, or `off`. See [How the SelfService AI assistant reads OpenIAM data](https://docs.openiam.com/administration-guide/federation/mcp-server/ai-assistant-mcp-reads.md#settings) |

When one is missing, the service stops at startup and its log names what to set:

{% code overflow="wrap" %}

```
startup refused: MCP_BASE_URL (property org.openiam.ai.assistant.mcp.base-url; `off` switches MCP off) is not set.
```

{% endcode %}

### Development settings the service refuses

The environment variables `MODEL_PROVIDER`, `MODEL`, `OCI_GENAI_BASE_URL`, `OCI_GENAI_MODEL` and `OCI_GENAI_API_KEY` are a development override of the model connection, for developers and automated tests. The service honours them only while the environment variable `ALLOW_DEV_MODEL_OVERRIDE` is `true`, and never while `NODE_ENV` is `production`, which the container image and the systemd unit shipped with the service bundle set. Otherwise the service refuses them:

* It ignores them, and runs on the **AI Assistant** record's model connection, or on none.
* Its startup log names them after `dev override refused`, never with their values.
* Its health report lists them as `refusedOverride` under `connection`, led by `ALLOW_DEV_MODEL_OVERRIDE` itself when `NODE_ENV=production` refused it.
* The **Model connection** section of the record's **Agent** tab shows `The assistant service refuses development settings in its environment` and the names.

Remove them from the service's environment and its `.env` file, then restart the service. Do not set `ALLOW_DEV_MODEL_OVERRIDE` on a server people use: with it, any of those variables replaces the record's connection, with its owner, expiry and audit trail, by one that has none.

## Add the model connection

You can add the connection while the record is still a Draft, and check that it works before anyone sees the assistant.

{% stepper %}
{% step %}
Go to **Webconsole → Non-Human Identities → Inventory**.
{% endstep %}

{% step %}
Open **AI Assistant**.
{% endstep %}

{% step %}
Open the **Agent** tab. The **Model connection** section is at the top.
{% endstep %}

{% step %}
In **Provider**, keep **Oracle Cloud Infrastructure (OCI) Generative AI**, the only choice.
{% endstep %}

{% step %}
In **Base URL**, keep `https://inference.generativeai.us-chicago-1.oci.oraclecloud.com/openai/v1` for the United States, or enter `https://inference.generativeai.eu-frankfurt-1.oci.oraclecloud.com/openai/v1` for the European Union. See [Choose the region](https://docs.openiam.com/administration-guide/platform/ai-assistant-supported-models.md#choose-the-region).
{% endstep %}

{% step %}
In **Model**, select `openai.gpt-oss-120b`, the one supported model. The list comes from the AI assistant service; when the service does not answer, it cannot be read, and only a model already stored is shown.
{% endstep %}

{% step %}
In **API key**, paste the OCI Generative AI API key.
{% endstep %}

{% step %}
Optionally, set **Expiry** to the date the key expires. A later save that leaves it empty keeps the expiry already stored.
{% endstep %}

{% step %}
Click **Save**. The section reports `Model connection saved.`
{% endstep %}
{% endstepper %}

The key is stored in Vault and cannot be read back. From then on the section shows `A key is stored.` and a **Replace key** button instead of the key. The record's **Credentials** tab lists the connection as a credential, read-only, marked `Managed on the Agent tab`.

The AI assistant service reads the connection at startup and then every `org.openiam.ai.assistant.connection.refresh-seconds` (60 seconds by default), whatever the record's status. Nothing needs a restart. Watch **Status** in the section:

| Status                                                       | Meaning                                                                                                     |
| ------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- |
| `No model connection yet`                                    | Nothing has been saved                                                                                      |
| `Waiting for the assistant service to load the new settings` | The service still runs on an earlier connection, or none. It catches up within its refresh interval         |
| `Connected`                                                  | The service runs on the saved connection, and its model answers                                             |
| `The model endpoint is failing`                              | The service loaded the connection, but the model does not answer. Check the base URL, the model and the key |
| `Assistant service unreachable`                              | SelfService cannot read the service's health report                                                         |

If the section also shows `The assistant service ignores this connection`, the service runs on a development override set in its environment variables, and the connection stored here is not used. If it shows `The assistant service refuses development settings in its environment`, the service ignores the variables it names and uses the connection stored here. See [Development settings the service refuses](#development-settings-the-service-refuses).

## Activate the agent record

The record activates under the normal rules for an AI Agent identity, listed in [Lifecycle and status](https://docs.openiam.com/administration-guide/nhi/lifecycle.md#activation-requirements), plus one more: it must hold a model connection with an API key.

{% stepper %}
{% step %}
On the **AI Assistant** record, choose **Edit**.
{% endstep %}

{% step %}
Set the **AI Agent Sponsor**, the human answerable for the assistant.
{% endstep %}

{% step %}
Set the **Expiry Date**. When it passes, the record is suspended automatically and the assistant goes off, so renew it before then. The owner is warned 30, 14 and 7 days ahead.
{% endstep %}

{% step %}
If you set the environment to Prod, or the risk classification to High or Critical, set a backup owner too.
{% endstep %}

{% step %}
Click **Activate**. If your tenant routes activations through approval, or **Activate** is not offered to you, click **Request Approval** instead: the record becomes Active once the request is approved.
{% endstep %}
{% endstepper %}

**Activate** and **Request Approval** stay disabled until a key is saved, with the reason `Add a model connection with an API key on the Agent tab first.` The server refuses the activation too, directly or on approval, with `A model connection with an API key is required before this agent can be activated`. If the status is not `Connected` when you activate, a `Continue without a confirmed model connection?` dialog asks first: the assistant does not answer until the service reports the connection as connected.

The **Assistant** entry then appears, for people who hold the entitlement, on their next page load within about 30 seconds.

## Rotate the model key

Saving a new key is a rotation. Nothing has to be restarted, and the record can stay Active.

{% stepper %}
{% step %}
On the record's **Agent** tab, click **Replace key** in the **Model connection** section.
{% endstep %}

{% step %}
Paste the new key in **API key**.
{% endstep %}

{% step %}
Click **Save**.
{% endstep %}
{% endstepper %}

Until you click **Save**, **Cancel** keeps the stored key. Changing the base URL, the model or the expiry without a new key keeps the stored key too, and a save with **Expiry** empty keeps the stored expiry.

The service picks the new connection up at its next refresh, and the next question uses it. The credential's rotated-on date is set, and the **Audit Trail** tab records a `CREDENTIAL_ROTATED` event with the comment `Model connection`. A save that keeps the key records `CREDENTIAL_UPDATED` instead.

## Choose who is offered the assistant

Grant `AI_ASSISTANT` to the roles that should have the assistant. You can also entitle a group or a single user to it through the access model, as with any other menu item.

{% stepper %}
{% step %}
Go to Webconsole → **Access Control → Role** and open the role.
{% endstep %}

{% step %}
Open the role's **Menus** tab.
{% endstep %}

{% step %}
Find **Assistant** (`AI_ASSISTANT`) at the top level of the SelfService v2 menu tree.
{% endstep %}

{% step %}
Select it to grant the entitlement, or clear it to revoke it.
{% endstep %}

{% step %}
Save the menu tree.
{% endstep %}
{% endstepper %}

Which audience gets the assistant is your decision. A small pilot group first lets you check the answers, the model and the data location before everyone sees it.

## When a change takes effect on the server

SelfService and the AI assistant service both check the agent record and the `AI_ASSISTANT` menu entitlement, and refuse a question or a conversation history call from a person who fails either. Neither check reads the database directly, so a change takes effect only once it has passed the caches in front of it. The worst case, with the shipped settings:

| Change                                                                                                                                                                                | Takes effect on the server within                                                                                     | What sets the delay                                                                                                                                                                                                                                                                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Activating, suspending, decommissioning or the expiry of the **AI Assistant** record                                                                                                  | 30 seconds for conversation history calls; 1 minute for questions                                                     | SelfService reads the record from its copy of the agent records, refreshed at least every 30 seconds. The AI assistant service also keeps the answer with the person's sign-in for up to 30 seconds, its `AUTH_CACHE_TTL_MS` setting, which cannot be set higher                                                                              |
| Saving or rotating the model connection                                                                                                                                               | `org.openiam.ai.assistant.connection.refresh-seconds`, 60 seconds by default                                          | The AI assistant service reads the connection from Vault on that interval. Until then it keeps calling the model with the connection it has                                                                                                                                                                                                   |
| Granting or revoking `AI_ASSISTANT` on the person's own user record, or adding the person to or removing them from a role, group or organization that holds it                        | 30 seconds; up to 60 seconds if the AI assistant service is set to keep its answers longer                            | The change clears the person's cached entitlements at once. SelfService then keeps its answer for 30 seconds, which cannot be changed, and the AI assistant service for its `ASSISTANT_GATE_CACHE_TTL_MS` setting                                                                                                                             |
| Granting or revoking `AI_ASSISTANT` on a role, group or organization the person already belongs to, as in [Choose who is offered the assistant](#choose-who-is-offered-the-assistant) | About an hour, and up to 90 minutes when more than one authorization service instance runs, plus the 30 seconds above | This change does not clear the members' cached entitlements. They expire after `org.openiam.authorization.manager.cache.remote.ttl.minutes` (shipped `60`) in Redis and `org.openiam.authorization.manager.cache.local.ttl.minutes` (shipped `30`) in each authorization service instance. A person's copy is also cleared when they sign out |

The menu sweep, `org.openiam.authorization.manager.menu.threadsweep` (five minutes), does not delay a grant or a revocation. It matters only when the `AI_ASSISTANT` menu item itself is added to the menu tree, as the schema scripts do.

To take the assistant away from one person at once, remove them from the role, group or organization that gives it to them, or revoke it on their user record if that is where they hold it. To take it away from everyone quickly, suspend the **AI Assistant** record.

How long the AI assistant service keeps a person's entitlement is its `ASSISTANT_GATE_CACHE_TTL_MS` setting, `org.openiam.ai.assistant.gate.cache-ttl-ms` in its properties file. It is 30 seconds by default and cannot be set above 60 seconds.

When the agent record or the entitlement cannot be checked, for example because the authorization service does not answer, the request is refused rather than allowed, and the assistant reads as off. The person sees an error and can try again.

## What people see

* **With all three conditions met**, the **Assistant** entry sits at the top of the SelfService menu. It opens the assistant on a page of its own, which is the only place people use it.
* **With any of them missing**, the entry is not there. If the AI assistant service reports itself degraded, the entry goes without a page reload, and comes back the same way once the service recovers; see [When the model stops answering](#when-the-model-stops-answering). If the service stops answering its health check altogether, the entry is gone at the next health check and returns on a page load after the service is back.
* **Opening the assistant's address directly while it is unavailable** keeps the SelfService header and shows `The assistant is unavailable`. While the agent record is not Active with a model connection, or for a person without the entitlement, it adds `The assistant has not been enabled for your organisation. Contact your administrator.` When the service reports its model as unreachable, it adds `The assistant is temporarily degraded. We're working on it, please try again later.`
* **A person who still has the assistant open when it is taken away** sees the same `The assistant is unavailable` page as soon as their next question or history call is refused, and the **Assistant** entry disappears until the next page load.

### The first-use disclaimer

The first time a person sends a question, a `Before you start` dialog opens instead. It tells them:

* that the assistant only sees what they are allowed to see in OpenIAM;
* which model it uses, and that their questions and the data needed to answer them are sent to the model provider, outside your network. Both come from the AI assistant service's health report, as described on [Where the AI assistant sends people's data](https://docs.openiam.com/administration-guide/federation/mcp-server/ai-assistant-model-and-data-location.md). When the service does not say where the model runs, the dialog asks the person to check with their administrator;
* that the assistant never changes anything on its own, and every action asks for confirmation;
* how long conversations are kept, from the `org.openiam.ai.assistant.retention.days` system property. `0` reads as kept until the person deletes them.

When the person clicks **Got it**, or closes the dialog, the question they typed is sent. The dialog does not open again on its own. People can reopen it from **More options → Disclaimer & privacy** at the top of the assistant, or from the **Disclaimer** link under the message box.

The acceptance is kept in the person's browser, not in OpenIAM. A new browser, another device, or cleared site data shows the dialog once more.

## When the model stops answering

The AI assistant service takes the assistant out of service on its own while its model endpoint cannot answer, and puts it back once the model answers again. Nobody has to restart anything, and people do not have to reload their pages.

### What counts as a failure

Every call the service makes to the model counts: each question a person asks, and each health probe the service sends to the model endpoint on a timer.

* **A failure** is a question whose model could not be reached (a refused connection, a name that does not resolve, or a `5xx` answer), a question whose model did not answer in time, or a health probe that finds the model endpoint down.
* **A success** is a question the model started to answer, even if something else then went wrong, or a health probe that finds the model endpoint up.
* **Neither** is a question refused before the model was called, a question the model provider rejects with a `4xx` answer (rate limiting included), or a failure of an OpenIAM lookup or of the conversation history. These say nothing about whether the model works.

A rate-limited question never counts as one the model did not answer in time. While OCI answers `429`, the service retries the question for at most 10 seconds, half the time the model has to start answering (`FIRST_TOKEN_TIMEOUT_MS`, 20 seconds), so it gives up and reports the rate limit before that time runs out.

When the number of failures **in a row** reaches `MODEL_DEGRADE_AFTER_FAILURES` (3 by default), the service reports itself `degraded`. A single failure between two successes never does, so one dropped connection does not hide the assistant. If the model endpoint cannot be reached when the service starts, the service reports `degraded` at once, because nothing has worked yet. With no model connection at all, because none is saved or the service cannot read it from Vault, the service also reports `degraded`, and a question is refused before any model is called.

The first success after that reports the service healthy again. Each health probe asks the model for a one-word answer, because OCI Generative AI publishes no list of its models, so a probe that succeeds proves that the endpoint, the application programming interface (API) key and the model all work. A probe that OCI answers with `429`, its rate limit, counts as up: the endpoint and the key work, and the tenancy is only over its request limit.

A probe is a call OCI bills, so the service does not send one while a question's model answered within the last `HEALTH_PROBE_INTERVAL_MS`, with no failed call since: that answer proved the same thing. The next probe then comes one interval after that answer, so the service never relies on anything older than one interval, and after a failed question the next probe is always sent. Until then, `components.model` in the health report reads `up` as of that answer, with no `latencyMs`. A new model connection is always probed at once.

### What people see while it is degraded

* The **Assistant** menu entry disappears without a page reload.
* A conversation that is already open on the assistant's page stays open. Each question sent in it shows its own error until the model answers again, and an action the person is confirming is not interrupted.
* Opening the assistant's page while it is degraded shows `The assistant is unavailable` with `The assistant is temporarily degraded. We're working on it, please try again later.`
* Everything comes back on its own once the service is healthy again.

SelfService re-reads the service's health every 60 seconds while it is healthy and every 30 seconds while it is degraded, and not at all while the browser tab is in the background. The service probes its model every `HEALTH_PROBE_INTERVAL_MS` (30 seconds by default). With the defaults and nobody asking questions, the assistant disappears within about two and a half minutes of the model going down, and comes back within about a minute of it answering again. Failed questions shorten the first delay.

### Settings

Set these in `${confpath}/conf/properties/ai-assistant.properties`, then restart the AI assistant service. The environment variable beside each one overrides the file.

| Property                                                 | Environment variable               | Default                                                  | What it does                                                                                                                                                                                    |
| -------------------------------------------------------- | ---------------------------------- | -------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `org.openiam.ai.assistant.connection.vault-key`          | `MODEL_CONNECTION_VAULT_KEY`       | `vault.secret.nhi.AI_ASSISTANT_AGENT.AI_ASSISTANT_MODEL` | The Vault key of the agent record's model connection, relative to `vault.path` in `vault.properties`, field `secret`. Change it only if your Vault layout differs                               |
| `org.openiam.ai.assistant.connection.refresh-seconds`    | `MODEL_CONNECTION_REFRESH_SECONDS` | `60`                                                     | How often, in seconds, the service reads the model connection again. A rotated key or a new model is used from the next question after that                                                     |
| `org.openiam.ai.assistant.health.degrade-after-failures` | `MODEL_DEGRADE_AFTER_FAILURES`     | `3`                                                      | How many model calls in a row, questions and health probes alike, must fail before the service reports itself `degraded`. Anything other than a positive whole number reads as `3`              |
| `org.openiam.ai.assistant.health.probe-interval-ms`      | `HEALTH_PROBE_INTERVAL_MS`         | `30000`                                                  | How often, in milliseconds, the service probes its model endpoint and the Model Context Protocol (MCP) server. The model probe is skipped while a question's model answered within the interval |

A higher `MODEL_DEGRADE_AFTER_FAILURES` keeps the assistant on screen through longer outages, at the cost of more people seeing an error on their question first.

The output cap and the reasoning effort of the calls the service makes for an answer are described in [Settings for the model calls](https://docs.openiam.com/administration-guide/platform/ai-assistant-supported-models.md#settings-for-the-model-calls).

The provider, the model and the key are not settings of the service any more. The properties `org.openiam.ai.assistant.model.provider`, `org.openiam.ai.assistant.model`, `org.openiam.ai.assistant.gateway.api-key` and every `org.openiam.ai.assistant.oci.*`, `org.openiam.ai.assistant.ollama.*` and `org.openiam.ai.assistant.mock.*` property are removed. A properties file that still sets one is reported at startup with `removed properties ignored:` and the names, and the values have no effect. The Vault entries `vault.secret.org.openiam.ai.assistant.oci.api-key` and `vault.secret.org.openiam.ai.assistant.gateway.api-key` are no longer read, and you can delete them.

### Read the health report

On the host that runs the AI assistant service:

{% code overflow="wrap" %}

```bash
curl -s http://localhost:8790/api/health
```

{% endcode %}

`connection` says where the service's model connection comes from: `agent` for the record's, `none` when it has none. `revision` is the time of the save it runs on, which the **Agent** tab compares with the one it saved. `refusedOverride` appears only while the service refuses development settings, as described in [Development settings the service refuses](#development-settings-the-service-refuses). The report never carries the key or the base URL.

{% code overflow="wrap" %}

```json
"connection": { "source": "agent", "revision": "2026-11-10T16:00:00Z", "provider": "oci", "model": "openai.gpt-oss-120b" }
```

{% endcode %}

While the service is degraded, `ok` is `false` and `status` is `degraded`. Under `components`, `model` shows the result of the last probe and where the count stands:

{% code overflow="wrap" %}

```json
"model": { "status": "down", "checkedAt": "2026-11-07T15:40:12.000Z", "error": "unreachable", "consecutiveFailures": 3, "degraded": true }
```

{% endcode %}

`consecutiveFailures` is the number of model calls that failed in a row since the last success, and `degraded` says whether they, or an endpoint unreachable at startup, have taken the assistant out of service. One failed probe shows `down` while `degraded` is still `false`. With no model connection, `error` is `no_model_connection`.

## Verification

Sign in to the new SelfService interface as a member of the role you granted. Sign out and back in first, so the cached menu entitlements are refreshed.

| Evidence                                                                                 | Meaning                                                                                                                            |
| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| **Status** on the record's **Agent** tab reads `Connected`                               | The AI assistant service runs on the saved connection, and its model answers                                                       |
| The **Assistant** entry with a **Beta** label is at the top of the menu                  | All three conditions hold for this person                                                                                          |
| No entry, and the assistant's address shows `has not been enabled for your organisation` | The **AI Assistant** record is not Active with a model connection, or the person does not hold `AI_ASSISTANT`                      |
| No entry, and the assistant's address shows `temporarily degraded`                       | The record and the entitlement are in place; the AI assistant service reports itself `degraded` because its model is not answering |
| The first question opens `Before you start`                                              | The disclaimer works, and names the model the service reports                                                                      |

Check a person outside the granted roles as well: they must not see the entry.

## When it goes wrong

| Symptom                                                                                                                                                                                                                                                                    | Likely cause                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               | Resolution                                                                                                                                                                                                                                                                                                                 |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Nobody sees the assistant after the upgrade, including Super Security Admin                                                                                                                                                                                                | The migration moved the **AI Assistant** record to Draft, and it has no model connection yet                                                                                                                                                                                                                                                                                                                                                                                                                               | [Add the model connection](#add-the-model-connection), then [activate the record](#activate-the-agent-record)                                                                                                                                                                                                              |
| Nobody sees the assistant any more, after it worked                                                                                                                                                                                                                        | The **AI Assistant** record was suspended, by hand, at its expiry date or because its sponsor left                                                                                                                                                                                                                                                                                                                                                                                                                         | Read the record's **Audit Trail** tab for the reason. Set a new expiry date or sponsor where needed, then **Activate** it                                                                                                                                                                                                  |
| **Activate** and **Request Approval** are disabled, with `Add a model connection with an API key on the Agent tab first.`                                                                                                                                                  | No key is saved on the record                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              | [Add the model connection](#add-the-model-connection)                                                                                                                                                                                                                                                                      |
| **Activate** reports a missing owner, expiry, related human or backup owner                                                                                                                                                                                                | The record does not meet the activation requirements for an AI Agent                                                                                                                                                                                                                                                                                                                                                                                                                                                       | Fill in the field and try again. See [Lifecycle and status](https://docs.openiam.com/administration-guide/nhi/lifecycle.md#activation-requirements)                                                                                                                                                                        |
| **Status** stays at `Waiting for the assistant service to load the new settings` longer than a minute                                                                                                                                                                      | The AI assistant service cannot read the connection from Vault: its Vault identity may not read `secret/openiam/vault.secret.nhi.AI_ASSISTANT_AGENT.AI_ASSISTANT_MODEL`                                                                                                                                                                                                                                                                                                                                                    | Allow that read. The service log names the reason, for example `unreadable:forbidden`, never the key                                                                                                                                                                                                                       |
| **Status** stays at `Waiting for the assistant service to load the new settings`, and the service log names `unreadable:not_configured`                                                                                                                                    | The service has no way to sign in to Vault: `vault.properties` names no key store, and no token or PEM client certificate is set                                                                                                                                                                                                                                                                                                                                                                                           | Set `vault.ssl.key-store` and `vault.ssl.key-store-password` as the other modules have them, or set a token or a PEM client certificate, then restart the service                                                                                                                                                          |
| The service log names `unreadable:keystore_unreadable`                                                                                                                                                                                                                     | The service cannot read the key store file, because the file is missing or its user may not read it                                                                                                                                                                                                                                                                                                                                                                                                                        | Make the file readable for the service's user. For a container, mount the directory that holds the key store                                                                                                                                                                                                               |
| The service log names `unreadable:keystore_bad_password`                                                                                                                                                                                                                   | `vault.ssl.key-store-password` does not open the key store                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | Correct the password                                                                                                                                                                                                                                                                                                       |
| The service log names `unreadable:keystore_invalid`                                                                                                                                                                                                                        | The file is not a PKCS#12 key store. The OpenIAM installers create a PKCS#12 file named `vault.jks`, but a key store made with the Java `keytool` is a true JKS file, which the service cannot open                                                                                                                                                                                                                                                                                                                        | Export the key store as PKCS#12, or give the service the PEM client certificate and key                                                                                                                                                                                                                                    |
| The service log names `unreadable:keystore_legacy`                                                                                                                                                                                                                         | The key store uses RC2 or 3DES encryption from an older OpenSSL, which the service's OpenSSL 3 no longer opens                                                                                                                                                                                                                                                                                                                                                                                                             | Re-export it with the same password: `openssl pkcs12 -in vault.jks -nodes -legacy -out vault.pem && openssl pkcs12 -export -in vault.pem -out vault.jks.new && rm vault.pem`, then replace `vault.jks` with `vault.jks.new`. The Java modules open the new file too                                                        |
| The service log names `unreadable:unreachable`                                                                                                                                                                                                                             | Vault does not answer at `vault.uri`, or its server certificate is neither the one in the key store nor signed by `vault.ssl.ca-cert`                                                                                                                                                                                                                                                                                                                                                                                      | Check `vault.uri`. If Vault has its own certificate, set `vault.ssl.ca-cert` to the CA that signed it                                                                                                                                                                                                                      |
| **Status** reads `The model endpoint is failing`                                                                                                                                                                                                                           | The base URL, the model or the key is wrong. An OCI key created in another region than the base URL's fails with `401`                                                                                                                                                                                                                                                                                                                                                                                                     | Correct the connection, or [rotate the key](#rotate-the-model-key) with one from the base URL's region                                                                                                                                                                                                                     |
| **Status** reads `Assistant service unreachable`                                                                                                                                                                                                                           | The AI assistant service is stopped, or SelfService cannot reach it                                                                                                                                                                                                                                                                                                                                                                                                                                                        | Start the service and check its log. The model list then fills again                                                                                                                                                                                                                                                       |
| The **Agent** tab shows `The assistant service ignores this connection`                                                                                                                                                                                                    | The service runs on a development override: `ALLOW_DEV_MODEL_OVERRIDE` is `true` and one of the environment variables `MODEL_PROVIDER`, `MODEL`, `OCI_GENAI_BASE_URL`, `OCI_GENAI_MODEL` or `OCI_GENAI_API_KEY` is set, in its environment or its `.env` file. `AI_GATEWAY_API_KEY` alone is not an override. Its health report says `"source": "override"`, and its startup log names the variables                                                                                                                       | Remove the variables and `ALLOW_DEV_MODEL_OVERRIDE`, then restart the service. The override is for development and testing only, and it never turns the assistant on by itself                                                                                                                                             |
| The **Agent** tab shows `The assistant service refuses development settings in its environment`                                                                                                                                                                            | Development variables are left in the service's environment or `.env` file without `ALLOW_DEV_MODEL_OVERRIDE`, or with it under `NODE_ENV=production`. The service ignores them and uses the stored connection                                                                                                                                                                                                                                                                                                             | Remove the variables the warning names, then restart the service. See [Development settings the service refuses](#development-settings-the-service-refuses)                                                                                                                                                                |
| The AI assistant service stops at startup, and its log shows `startup refused:` and `is not set`                                                                                                                                                                           | `org.openiam.ai.assistant.openiam.api-base` or `org.openiam.ai.assistant.mcp.base-url` is not set                                                                                                                                                                                                                                                                                                                                                                                                                          | Set the setting the log names, then start the service. See [Settings the service needs to start](#settings-the-service-needs-to-start)                                                                                                                                                                                     |
| A granted person sees no entry and the address says `has not been enabled`                                                                                                                                                                                                 | The menu tree and the person's entitlements are cached, or the graph was not rebuilt after the schema scripts                                                                                                                                                                                                                                                                                                                                                                                                              | Wait for the menu sweep (five minutes by default), then have the person sign out and back in. If it still fails, [rebuild the authorization graph](https://docs.openiam.com/administration-guide/operations/rebuild-the-authorization-graph.md)                                                                            |
| The entry disappeared for everyone, and the health report says `degraded`                                                                                                                                                                                                  | The model endpoint failed `MODEL_DEGRADE_AFTER_FAILURES` calls in a row, could not be reached when the service started, or the service has no model connection                                                                                                                                                                                                                                                                                                                                                             | Check **Status** on the **Agent** tab and the model provider. The entry returns on its own, without a page reload, once the model answers again. See [When the model stops answering](#when-the-model-stops-answering)                                                                                                     |
| The entry disappeared for everyone, and the health report does not answer                                                                                                                                                                                                  | The AI assistant service stopped or cannot be reached from SelfService                                                                                                                                                                                                                                                                                                                                                                                                                                                     | Start the service and check its log. The entry returns on the person's next page load once the service answers                                                                                                                                                                                                             |
| A question gets a box titled `The assistant ran into a problem` that says `Something went wrong. Please try again.`, while SelfService restarts or the proxy in front of it answers `502` or `503`                                                                         | The AI assistant service could not check the person's sign-in with SelfService: SelfService could not be reached, or answered with a server error or `429`. The service refuses the question with HTTP `503` and error `openiam_unreachable`, and does not remember the failure, so nobody is asked to sign in again because of it. If SelfService does not answer in time, the box is titled `The answer took too long` instead                                                                                           | Bring SelfService back. The first question after it answers again goes through, so the person only has to click **Retry**. The AI assistant service log names the cause, for example `Bearer validation: OpenIAM answered 503; the caller is told to retry` or `Bearer validation could not reach OpenIAM (network error)` |
| The address says `temporarily degraded`                                                                                                                                                                                                                                    | The AI assistant service is running but its model is not answering                                                                                                                                                                                                                                                                                                                                                                                                                                                         | Check the model connection on the **Agent** tab. See [How the SelfService AI assistant reads OpenIAM data](https://docs.openiam.com/administration-guide/federation/mcp-server/ai-assistant-mcp-reads.md) for the service's other settings                                                                                 |
| The assistant stays hidden, and `components.model` in the health report is `down` with `http_401` or `http_404`                                                                                                                                                            | OCI refuses the probe: the API key and the base URL name different regions, the base URL's region does not serve the model, or the model ID is wrong                                                                                                                                                                                                                                                                                                                                                                       | See [Supported model for the AI assistant](https://docs.openiam.com/administration-guide/platform/ai-assistant-supported-models.md#when-it-goes-wrong). `consecutiveFailures` under `components.model` keeps rising until the model answers                                                                                |
| The assistant disappears and reappears several times an hour                                                                                                                                                                                                               | The model endpoint has repeated outages of `MODEL_DEGRADE_AFTER_FAILURES` failed calls or more                                                                                                                                                                                                                                                                                                                                                                                                                             | Check OCI Generative AI for outages in the base URL's region. To ride out longer outages without hiding the assistant, raise `MODEL_DEGRADE_AFTER_FAILURES`                                                                                                                                                                |
| Questions end in an error box titled `Too many requests`, with `The assistant is handling too many requests right now. Wait a moment, then try again.` and **Retry** counting down `Try again in N s`. Answers that do arrive meanwhile may have no suggestions under them | OCI Generative AI is rate-limiting the tenancy: it answered `429`. The AI assistant service retried for up to 10 seconds, then holds every question back for `MODEL_THROTTLE_COOLOFF_MS` (15 seconds by default) or as long as OCI asked, so that new questions do not prolong the limit. It sends no [side calls](https://docs.openiam.com/administration-guide/platform/ai-assistant-conversation-history.md#follow-up-suggestions-and-conversation-titles) meanwhile. These questions do not count toward degraded mode | Expected during a burst of questions: **Retry** works once the wait is over. If it happens often, the tenancy's request limit for the model is too low for your load. Check the limits of OCI Generative AI in the base URL's region                                                                                       |
| An answer stops mid-sentence, followed by `The assistant could not put together an answer. Please try again.`                                                                                                                                                              | The answer reached the output cap, `MODEL_MAX_OUTPUT_TOKENS`                                                                                                                                                                                                                                                                                                                                                                                                                                                               | **Retry**, or ask a narrower question. See [When an answer reaches the output cap](https://docs.openiam.com/administration-guide/platform/ai-assistant-supported-models.md#when-an-answer-reaches-the-output-cap)                                                                                                          |
| The service log shows `removed properties ignored:` at startup                                                                                                                                                                                                             | Its properties file still sets a property this release removed                                                                                                                                                                                                                                                                                                                                                                                                                                                             | Delete the lines it names. The model connection comes from the **AI Assistant** record                                                                                                                                                                                                                                     |
| The disclaimer says to ask the administrator where the model runs                                                                                                                                                                                                          | The AI assistant service does not report where its model runs                                                                                                                                                                                                                                                                                                                                                                                                                                                              | See [Where the AI assistant sends people's data](https://docs.openiam.com/administration-guide/federation/mcp-server/ai-assistant-model-and-data-location.md)                                                                                                                                                              |

## Roll it back

To take the assistant away from everyone, choose **Suspend** on the **AI Assistant** record; the server refuses people within a minute, and the entry disappears on their next page load. **Activate** brings it back with the same model connection. Do not decommission the record to turn the assistant off: a decommission cannot be undone, it deletes the model connection from Vault, and no other record can take its place, so the assistant cannot be turned on again.

To take it away from some people, revoke `AI_ASSISTANT` from their roles, groups or user records. A revocation on a role or group can take about an hour to reach its members; see [When a change takes effect on the server](#when-a-change-takes-effect-on-the-server). Conversations already kept are not deleted; they expire under the retention setting. While the assistant is off for a person, they cannot list, open or delete their conversations either.

## Related

* [Your AI assistant conversations](https://docs.openiam.com/end-user-guide-for-selfservice/ai-assistant-conversations.md): the assistant from the person's side
* [Govern AI agents as non-human identities](https://docs.openiam.com/administration-guide/federation/mcp-server/mcp-agents.md): the assistant's client and agent record, and what suspending a record does
* [Lifecycle and status](https://docs.openiam.com/administration-guide/nhi/lifecycle.md): the statuses of a non-human identity, and what it needs before it can be activated
* [Where the AI assistant sends people's data](https://docs.openiam.com/administration-guide/federation/mcp-server/ai-assistant-model-and-data-location.md): the model and data line people see in the menu and the disclaimer
* [AI assistant conversation history](https://docs.openiam.com/administration-guide/platform/ai-assistant-conversation-history.md): how long conversations are kept
* [Supported model for the AI assistant](https://docs.openiam.com/administration-guide/platform/ai-assistant-supported-models.md): the model the assistant runs on, and the regions to connect it in
* [System configuration](https://docs.openiam.com/administration-guide/platform/system-configuration.md): where system properties are set
* [Rebuild the authorization graph](https://docs.openiam.com/administration-guide/operations/rebuild-the-authorization-graph.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.openiam.com/administration-guide/platform/turn-on-the-ai-assistant.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
