AI Assistant Reference

Features marked with EE badge require Enterprise Edition.

This page provides configuration reference for the NetXMS AI assistant.

For setup instructions, see Getting Started with the AI Assistant. For task-oriented guides, see AI Assistant How-to Guides. For architecture and concepts, see AI Assistant Concepts.

Server Configuration

Provider and global AI settings are placed in netxmsd.conf. Runtime limits are set through server configuration variables (see Server Configuration Variables).

Global Settings

The [AI] section supports the following parameters:

Parameter Default Description

DefaultProvider

(auto)

Name of the default provider. If not set, the first provider with the default slot is used automatically.

PromptInjectionGuard

true

Enable or disable the prompt injection guard.

Provider Settings

Each provider is configured in a [AI/Provider/<name>] section.

Parameter Type Default Description

Type

String

openai

Provider type: openai, anthropic, mistral, or ollama. Any unrecognized value is treated as ollama.

URL

String

(varies)

API endpoint URL. Defaults: http://127.0.0.1:11434/api/chat (Ollama), https://api.anthropic.com/v1/messages (Anthropic), https://api.mistral.ai/v1/chat/completions (Mistral). An openai provider without an explicit URL incorrectly falls back to the Ollama URL, so always set URL explicitly for non-Ollama providers.

Model

String

(varies)

Model name. Defaults: llama3.2 (Ollama), claude-sonnet-4-20250514 (Anthropic), mistral-large-latest (Mistral). An openai provider without an explicit model falls back to llama3.2, so always set Model explicitly for non-Ollama providers.

Token

String

(empty)

API authentication token. Sent as a Bearer token in the Authorization header for openai, mistral, and ollama providers. Anthropic providers send it in the x-api-key header together with an anthropic-version header.

Temperature

Integer

-1

Sampling temperature. Set to -1 to use the provider default. In the current implementation the value is parsed as an integer — fractional values are truncated (e.g., 0.7 becomes 0).

TopP

Integer

-1

Nucleus sampling parameter. Set to -1 to use the provider default. Parsed as an integer — fractional values are truncated; values above 1 are clamped to 1.0.

VerifySSL

Boolean

true

Verify the provider’s TLS certificate.

ContextSize

Integer

32768

Provider-specific token limit. For ollama providers, sets the context window size (num_ctx). For anthropic providers, used as the max_tokens output limit (8192 when not set). Not used by openai and mistral providers.

Timeout

Integer

180

HTTP request timeout in seconds.

Slots

String

default

Comma-separated list of slots this provider serves (e.g., default,interactive,analytical).

Provider Slots

Slots route different types of AI requests to appropriate providers. Assign one or more slots to each provider using the Slots parameter.

Slot Description

default

General-purpose slot used when no specific slot is requested. A provider becomes the default when its name matches DefaultProvider in the [AI] section or when its slot list contains default. The AI subsystem fails to initialize only when no default provider can be resolved.

interactive

Used for interactive chat sessions with users.

background

Used for background AI task execution.

analytical

Used for deep analysis tasks such as incident investigation.

delegation

Used when the AI assistant delegates work to a skill (the delegate-to-skill function).

fast

Used for quick operations where low latency is preferred over capability (e.g., prompt injection guard fallback).

guard

Used by the prompt injection guard. If not defined, the fast slot is used as fallback.

A request to a slot with no assigned provider falls back to the default provider (except the prompt injection guard, which falls back to the fast slot as noted above).

Configuration Examples

Single cloud provider:

[AI/Provider/openai]
Type = openai
URL = https://api.openai.com/v1/chat/completions
Model = gpt-4o
Token = sk-your-api-key
Slots = default

Multi-provider setup with slots:

[AI/Provider/claude]
Type = anthropic
Model = claude-sonnet-4-20250514
Token = sk-ant-your-key
Slots = default,analytical

[AI/Provider/ollama-fast]
Type = ollama
Model = mistral
Slots = fast

[AI]
DefaultProvider = claude

Local-only deployment with Ollama:

[AI/Provider/local]
Type = ollama
URL = http://127.0.0.1:11434/api/chat
Model = llama3.2
ContextSize = 32768
Slots = default

Server Configuration Variables

The following server configuration variables (stored in the database, changed at runtime from the management client) control the AI subsystem:

Variable Default Description

AI.MaxInteractiveIterations

30

Number of LLM iterations in an interactive chat request after which the user is asked whether to continue. Continuing grants a fresh iteration budget, so this is not a hard cap. Changes take effect without server restart.

AI.MaxBackgroundIterations

64

Maximum number of LLM iterations per background task execution. Changes take effect without server restart.

Expired AI messages are cleaned up at the interval given by AI.MessageCleanupInterval (default: 60 minutes). This variable is read directly at runtime and is not visible in the Server Configuration view.

Background AI tasks run in the AITasks thread pool, sized by the ThreadPool.AITasks.BaseSize (default: 4) and ThreadPool.AITasks.MaxSize (default: 16) server configuration variables. AI operators run in the dedicated AIOperator thread pool, sized by ThreadPool.AIOperator.BaseSize (default: 4) and ThreadPool.AIOperator.MaxSize (default: 16).

nxai Command-Line Reference

nxai [options]

Connection options:

Option Description

-s, --server HOST

Server hostname or URL (e.g., netxms.local or https://netxms.local:8443). Include a non-default port in the URL.

-u, --user USER

Username for authentication.

-p, --password PASS

Password. Prefer using the NETXMS_PASSWORD environment variable.

--no-verify-ssl

Disable SSL certificate verification.

--no-save-session

Do not save the session token for reuse.

--clear-session

Clear saved session token and exit.

Context options (mutually exclusive):

Option Description

-n, --node NAME

Bind the chat session to a node by name.

-o, --object ID

Bind the chat session to an object by ID.

-i, --incident ID

Bind the chat session to an incident.

Display options:

Option Description

--plain

Force plain text output (no colors or formatting).

General options:

Option Description

-h, --help

Show usage information and exit.

-V, --version

Show version information and exit.

Environment variables:

Variable Description

NETXMS_SERVER

Default server hostname.

NETXMS_USER

Default username.

NETXMS_PASSWORD

Password (avoids passing on command line).

Session tokens are saved to sessions.json in the nxai configuration directory for automatic reconnection: $XDG_CONFIG_HOME/nxai if XDG_CONFIG_HOME is set, otherwise ~/.config/nxai (%APPDATA%\nxai on Windows). Saved sessions expire after 4 hours. Command history is stored in the history file in the same directory. Use --clear-session to remove saved tokens.

Debug Tags

The following debug tags can be used for troubleshooting the AI subsystem:

Tag Description

ai.assistant

General AI assistant operations (chat, function calls, incident analysis).

ai.chat

Low-level message assembly traces (debug level 8), for both interactive and background chats.

ai.provider

LLM provider base class (HTTP requests, response parsing).

ai.prov.openai

OpenAI-compatible provider operations.

ai.prov.anthropic

Anthropic provider operations.

ai.prov.ollama

Ollama provider operations.

ai.prov.mistral

Mistral provider operations.

ai.operator

AI operator management and execution.

ai.skills

Skill loading and management.

ai.tasks

Background task scheduling and execution.

ai.messages

AI message lifecycle and cleanup.

ai.anomaly

Anomaly detection profile generation.

ai.tools

AI assistant function handlers (data collection, logs, objects).

webapi.ai

Web API endpoints for AI chat sessions.

ai.extensions EE

Operations of the aiext module.

ai.extensions.filemgr EE

File management skill operations.

ai.ssh EE

SSH command execution skill operations.

On the agent side, the aifileops debug tag in nxagentd covers file operations performed on behalf of the file management skill.

Enable debug output by adding the DebugTags parameter to the global section of netxmsd.conf (before any named section):

DebugTags = ai.*:6