> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aseeflow.org/llms.txt
> Use this file to discover all available pages before exploring further.

# AI features

WebAdmin has three AI features:

* **The BPMN editor's AI assistant** (**Modeling › BPMN**): describe a process and have it drawn or changed, and have the editor's lint findings explained and fixed.
* **Ops Chat** (**Admin › Ops Chat**): ask about the running engine in plain language. The model answers through read-only engine queries, and the page shows which ones it used.
* **The MCP server** (`/mcp`): the same read-only queries for MCP clients such as Claude Desktop, Claude Code, or Cursor.

They come with the module `aseeflow-webadmin-ai`, which you add to your own Spring Boot application next to the WebAdmin starter. WebAdmin's WAR, ASEE Flow Run, the Tomcat and WildFly distributions, and the Docker images do not have them. Without the module, the BPMN editor is a plain modeler and Ops Chat is not in the menu.

## Requirements

* Spring Boot 4.1.2 or later, on Java 17 or later, with the WebAdmin starter 2.0.
* Access to the `aseeflow-webadmin-ai` repository. The module is available to customers entitled to the AI features, with the credentials they receive for it.
* An Anthropic API key. WebAdmin 2.0 supports Claude only.

## Add the module

The module is in its own repository. Add it next to the WebAdmin repository in your `pom.xml`:

```xml theme={null}
<repositories>
  <repository>
    <id>aseeflow-webadmin-ai</id>
    <url>https://repository.asseco-see.hr/artifactory/aseeflow-webadmin-ai/</url>
  </repository>
</repositories>

<dependency>
  <groupId>org.aseeflow.webadmin</groupId>
  <artifactId>aseeflow-webadmin-ai</artifactId>
  <version>2.1.0</version>
</dependency>
```

Add the credentials to your Maven `settings.xml`, under the same `id`:

```xml theme={null}
<server>
  <id>aseeflow-webadmin-ai</id>
  <username>YOUR_USERNAME</username>
  <password>YOUR_TOKEN</password>
</server>
```

The module brings Spring AI's Anthropic starter, so you add no Spring AI dependency of your own.

## Configure the BPMN editor's AI

```yaml theme={null}
spring:
  ai:
    anthropic:
      api-key: ${ANTHROPIC_AUTH_TOKEN}
      chat:
        options:
          model: claude-sonnet-5-5   # the default the editor offers
          max-tokens: 16384          # the default budget; the models' thinking counts against it

aseeflow:
  webadmin:
    llm:
      available-models: claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5
```

Keep the key out of `application.yaml`: pass it as an environment variable or through your secret store. Set the default model to one of `available-models`.

| Property | Default | Description |
| - | - | - |
| `spring.ai.anthropic.api-key` | — | The deployment's Anthropic API key. Every signed-in user's AI requests are billed to it. |
| `spring.ai.anthropic.chat.options.model` | Spring AI's | The model the editor offers first. Set it explicitly, to one of `available-models`. |
| `spring.ai.anthropic.chat.options.max-tokens` | Spring AI's | The token budget the editor offers first. 16384 is a good value: the 5.5 models think before they answer, and the thinking counts against it. |
| `aseeflow.webadmin.llm.available-models` | `claude-opus-5-5,claude-sonnet-5-5,claude-haiku-5-5` | The models the editor offers, and the only ones WebAdmin's relay accepts. |
| `aseeflow.webadmin.llm.max-tokens-limit` | `32768` | The largest budget a request may ask for. Above it, the relay answers `400`. `0` removes the ceiling. |
| `aseeflow.webadmin.llm.requests-per-minute` | `60` | How many AI requests one user may make per minute. `0` removes the limit. |

The editor's requests go through WebAdmin (`/webadmin/api/llm`), behind your WebAdmin sign-in. The browser never sees the API key.

## Add Ops Chat and the MCP server

Ops Chat answers with the MCP server's engine queries, so the two come together. Add Spring AI's MCP server starter:

```xml theme={null}
<dependency>
  <groupId>org.springframework.ai</groupId>
  <artifactId>spring-ai-starter-mcp-server-webmvc</artifactId>
</dependency>
```

Switch the MCP server on:

```yaml theme={null}
aseeflow:
  webadmin:
    mcp:
      enabled: true

spring:
  ai:
    mcp:
      server:
        protocol: STREAMABLE   # what MCP clients speak, and what WebAdmin protects
```

| Property | Default | Description |
| - | - | - |
| `aseeflow.webadmin.mcp.enabled` | `false` | The MCP server at `/mcp` and Ops Chat's engine queries. |
| `aseeflow.webadmin.mcp.allow-writes` | `false` | Reserved for write queries. WebAdmin 2.0 has only read-only ones. |
| `aseeflow.webadmin.mcp.allowed-origins` | empty | Since 2.1.0. Origins a browser may call `/mcp` from (CORS), exact, with scheme and port. Empty allows none. `*` and `null` stop WebAdmin from starting. |
| `aseeflow.webadmin.ops-chat.enabled` | `true` | `false` leaves Ops Chat out while the MCP server stays on. |
| `aseeflow.webadmin.ops-chat.system-prompt` | WebAdmin's own | Replaces Ops Chat's instructions to the model. |
| `spring.ai.mcp.server.protocol` | Spring AI's (SSE) | Set `STREAMABLE`. |

Ops Chat is behind your WebAdmin sign-in. The MCP server always asks for HTTP Basic with an engine user, whatever WebAdmin's [authentication mode](https://docs.aseeflow.org/webadmin/authentication) is. Either way, the queries run as that user, with the user's engine authorizations and tenants.

Since 2.1.0, `/mcp` sends no CORS headers unless `aseeflow.webadmin.mcp.allowed-origins` lists origins. Claude Desktop and Code, Cursor, `mcp-remote` and `curl` are not browsers and are not affected. A client that runs in a browser is: the MCP Inspector in direct mode needs `http://localhost:6274` in the list, while its default proxy mode does not. `/mcp` also refuses state-changing requests from another origin, as WebAdmin does ([CSRF and cross-site requests](https://docs.aseeflow.org/webadmin/security.md#csrf-and-cross-site-requests)); origins in either list are trusted. Its Basic realm is `aseeflow-mcp`.

> [!WARNING]
>
> Answers from Ops Chat and from MCP clients come from an AI model and can be wrong. Check them against the engine queries the answer names. Ops Chat says so under its input.

While `aseeflow.webadmin.mcp.enabled` is `false`, the module keeps Spring AI's MCP server switched off too, so `/mcp` does not exist. If you set `spring.ai.mcp.server.enabled: true` yourself without WebAdmin's MCP, Spring AI serves `/mcp` without WebAdmin's sign-in, and the log warns about it at startup.

## Check that it works

Signed in, `GET /webadmin/api/config` reports what the server has:

```json theme={null}
{ "...": "...", "llmAvailable": true, "opsChatAvailable": true }
```

`llmAvailable` is the BPMN editor's AI, and `opsChatAvailable` is Ops Chat. `GET /webadmin/api/llm/config` lists the models and budgets the editor offers. An MCP client connects to `/mcp` on your application's address, with an engine user's name and password.

## Connect an MCP client

Every client sends HTTP Basic on each request: `Authorization: Basic` followed by the base64 of `user:password`, for the engine user the queries run as. In PowerShell:

```powershell theme={null}
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('user:password'))
```

**Claude Code** speaks HTTP to `/mcp` directly:

```bash theme={null}
claude mcp add --transport http --scope user aseeflow https://flow.example.com/mcp --header "Authorization: Basic <base64>"
```

**Claude Desktop** starts a local command for each server, so it reaches `/mcp` through `mcp-remote`. Add to `mcpServers` in `claude_desktop_config.json`:

```json theme={null}
{
  "mcpServers": {
    "aseeflow": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://flow.example.com/mcp",
               "--header", "Authorization:${AUTH_HEADER}"],
      "env": { "AUTH_HEADER": "Basic <base64>" }
    }
  }
}
```

* Write `Authorization:${AUTH_HEADER}` with no space after the colon, and put the value in `env`. Claude Desktop on Windows breaks arguments that contain spaces.
* For plain `http` to a host other than `localhost`, add `--allow-http` after the URL.
* Open the file from Claude Desktop's **Settings → Developer → Edit Config**. On Windows it is `%APPDATA%\Claude\` for the standard installer, but `%LOCALAPPDATA%\Claude-Data\<package id>\` for the packaged install, and Claude Desktop ignores the other one.
* Quit Claude Desktop completely and start it again after the change.

> [!WARNING]
>
> The config file holds the engine user's password in base64, which anyone who can read the file can decode. Use a personal engine user with only the authorizations it needs, not a shared administrator.

If `mcp-remote` stops with `Dynamic Client Registration rejected (HTTP 404)` and `"path":"/register"`, the `Authorization` header did not reach WebAdmin. `/mcp` accepts HTTP Basic only. Without credentials it answers 401, `mcp-remote` then takes it for an OAuth server and tries to register, and that path does not exist. Check the header as above, in the file Claude Desktop actually reads.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.