Skip to content

Administer Tocharian AI

For administrators of a self-managed Kibana. This guide gets Tocharian AI installed, connected to a model and set up for your users, and it lists every setting with its default and effect.

Tasks come first; each one links to the reference tables at the end of its section. For why the plugin works the way it does (data flow, masking, privileges), read Security and privacy.

RequirementDetail
KibanaSelf-managed, 8.17.0 to 9.5.7: tarball, package, Docker image or ECK. Elastic Cloud Hosted and Serverless do not allow installing Kibana plugins.
Plugin zipOne per Kibana version. A Kibana plugin only loads into the exact version it was built for: tocharianAi-<plugin version>-kibana-<Kibana version>.zip. Differences between versions: Kibana versions.
Elasticsearch securityRecommended. With security on, queries and changes run with each user’s own privileges.
Encryption keyxpack.encryptedSavedObjects.encryptionKey, needed to store model API keys entered in the settings page. ECK sets it for you.
A modelAny endpoint that speaks the OpenAI (/chat/completions) or Anthropic (/messages) API, reachable from the Kibana server.
Elastic Workflows stepKibana 9.5 or later. See API.
FeatureFreeWith a license or the trial
Chat, evidence, charts in answers, data catalog, knowledge, background investigations, automation API, Workflows step✓✓
Read-write mode: confirmed changes to documents, dashboards, cases, alerts, rules and detection rules✓✓
Activity records (Kibana log and data stream), usage report✓✓
Sensitive data masking (masking)✓
Read-write controls: which roles can use read-write mode, and what it can change (rw)✓
Built-in audit and usage dashboards (dashboards)✓

The names in brackets are the feature names a license file lists. Manage the license and the trial says what happens when a license ends.

  1. Download the zip of your Kibana version from the release, and check it against the release’s SHA256SUMS:

    Terminal window
    sha256sum -c SHA256SUMS --ignore-missing
  2. Install it and restart Kibana:

    Terminal window
    cd /path/to/kibana-9.5.7
    bin/kibana-plugin install file:///path/to/tocharianAi-1.0.1-kibana-9.5.7.zip
  3. Open Stack Management → Kibana → Tocharian AI and add a model.

On ECK, install the zip from an init container: Kibana versions.

  1. Remove the installed version: bin/kibana-plugin remove tocharianAi.
  2. Install the zip of the new version and restart Kibana.

Settings, models, API keys, the license, conversations, profiles and activity records stay. The browser loads the new interface after the restart.

When you upgrade Kibana itself, install the plugin zip built for the new Kibana version.

Kibana refuses to start when its .kibana index holds saved objects of a type that no plugin registers. Delete the plugin’s saved objects before you remove it:

  1. As a user with write access to the Kibana system indices (for example elastic), run in Dev Tools → Console:

    POST .kibana*/_delete_by_query
    {
    "query": {
    "terms": {
    "type": ["tocharian-ai-config", "tocharian-ai-secret", "tocharian-ai-license", "tocharian-ai-conversation"]
    }
    }
    }

    This deletes the settings, the model API keys, the license and every user’s conversations. It cannot be undone.

  2. Remove the plugin and restart Kibana:

    Terminal window
    bin/kibana-plugin remove tocharianAi

You can keep or delete the .kibana-tocharian-ai-profiles index, the .kibana-tocharian-ai-audit data stream and its index template .kibana-tocharian-ai-audit-template, and the built-in dashboards. They do not stop Kibana from starting.

Most installations need nothing beyond the encryption key, which is often set already.

  1. Set the encryption key, if it is not set yet. It must be at least 32 characters and the same on every Kibana instance:

    xpack.encryptedSavedObjects.encryptionKey: "<32 or more characters>"
  2. Optional: give the default model’s API key in the Kibana keystore instead of the settings page:

    Terminal window
    bin/kibana-keystore add tocharianAi.modelApiKey
  3. Optional: write the activity log to its own file:

    logging:
    appenders:
    tocharian_ai_audit:
    type: file
    fileName: /var/log/kibana/tocharian-ai-audit.json
    layout:
    type: json
    loggers:
    - name: plugins.tocharianAi.audit
    appenders: [tocharian_ai_audit]
    level: info
  4. Restart Kibana.

SettingTypeDefaultEffect
tocharianAi.enabledbooleantruefalse turns the plugin off. Kibana then no longer knows the plugin’s saved object types and may refuse to start while they exist; to stop using the plugin, remove it instead.
tocharianAi.modelApiKeystring (keystore)not setAPI key of the default model. Overrides the key entered in the settings page, and the settings page shows it as preconfigured. It applies to the default model only.
tocharianAi.profileIndexstring.kibana-tocharian-ai-profilesIndex for dataset profiles, sensitivity rules, knowledge and the trial record.
tocharianAi.auditDataStreamstring.kibana-tocharian-ai-auditData stream for activity records, the source of the built-in dashboards and the usage report.
tocharianAi.serviceApiKeystring (keystore)not setBase64 id:api_key of an Elasticsearch API key that may write the profile index and the activity data stream. Needed only when you move them outside .kibana-*, where Kibana’s own system user cannot write. When set, it is used instead of Kibana’s own identity for both.

Kibana settings the plugin follows:

SettingEffect on Tocharian AI
xpack.encryptedSavedObjects.encryptionKeyWithout it, model API keys cannot be saved in the settings page. tocharianAi.modelApiKey still works.
xpack.actions.allowedHostsHosts the model URL may use. Default: any host.
xpack.actions.proxyUrl, xpack.actions.proxyBypassHosts, xpack.actions.proxyOnlyHostsProxy for model calls, unless a model sets its own proxy.
server.publicBaseUrlWhen set, the Workflows step returns full links to investigations; otherwise paths.
Logger plugins.tocharianAi.auditActivity records in the Kibana log, level info.

Who may use Tocharian AI is set in Stack Management → Roles, with the Kibana feature privilege Tocharian AI (category Kibana) of each space.

  1. Give regular users read.
  2. Give the people who set up the plugin all.
  3. Give users Elasticsearch read and view_index_metadata on the datasets they should ask about. The data catalog lists only datasets a user can read.
  4. For the built-in dashboards, give viewers read on .kibana-tocharian-ai-audit. Superusers have it.

What a user can query or change always follows their own Elasticsearch and Kibana privileges, whatever the feature privilege.

Actionreadall
Use the app, the header button and flyout, the dashboard panel action, the Discover document tab and the Index Management tab✓✓
Ask questions, run background investigations, use the automation API and the Workflows step✓✓
Pick a model that is shared with users✓✓
Pick a model that is not shared (to try it out)✓
Browse the data catalog and profile datasets✓✓
Suggest a field meaning (stored as learned)✓✓
Confirm a field meaning, write a dataset description✓
Add personal notes, save knowledge for yourself✓✓
Add notes for everyone or a space, share knowledge with everyone, edit notes✓
Delete a noteauthor✓
Confirm proposed changes in read-write mode✓✓
Open the settings page; change settings, models and API keys; test a connection✓
Mark fields as sensitive✓
Install a license, start the trial, remove the license, export the usage report✓
Install the built-in dashboards✓

Reference: privileges that come from Elasticsearch and Kibana

Section titled “Reference: privileges that come from Elasticsearch and Kibana”
WhatNeeds
Querying a datasetElasticsearch read on it. Document and field level security apply to queries and to the sample values in profiles.
Seeing a dataset in the catalogElasticsearch read; listing uses view_index_metadata.
Data behind a page (rules, cases, ML jobs, Fleet and more)The user’s own privileges for that page. A missing privilege is reported to the model, not guessed.
Writing documents after confirmingElasticsearch index or write on the target index.
Dashboards, cases, alerts, rules, detection rules after confirmingThe Kibana feature privileges for that object in the current space.
Pushing a case to an external systemAn existing connector. Users create connectors in Stack Management; the plugin never creates them.
  1. Open Stack Management → Kibana → Tocharian AI.
  2. Under Models, select Add model.
  3. Fill in the fields (see the reference below) and select Save settings.
  4. Enter the API key and select Save API key.
  5. Select Test connection. A working model shows Connected and the time it took.
  6. Choose the Default model and, optionally, a Fallback model.

Users ask the default model, or pick another shared model in chat. The automation API and the Workflows step use the default model unless a request names another one. When the chosen model fails or times out, the fallback model finishes the answer, and the answer says so.

The API key is encrypted with Kibana’s encryption key, cannot be viewed after saving, and is bound to the model’s API format and base URL. When you change the base URL or the API format, enter the key again. Removing a model removes its key.

FieldTypeDefaultEffect
Display namestringthe model nameShown in the chat model picker.
API formatopenai or anthropicopenaiOpenAI (/chat/completions) or Anthropic (/messages) request format.
Base URLURLhttps://api.openai.com/v1Endpoint without the path of the call, for example https://api.anthropic.com/v1 or http://localhost:11434/v1.
Model namestringemptyThe model id the endpoint expects. A model without a name cannot answer.
API keysecretnot setStored encrypted. Not needed for endpoints without authentication.
ProxyURLemptyProxy for this model only, for example http://<user>:<password>@proxy.example.com:3128. Empty uses Kibana’s xpack.actions.proxyUrl.
Verify TLS certificatesbooleanonTurn off only for a model server with a self-signed or mismatched certificate.
Extra headerstextemptyOne Header: value per line, sent with every call. Do not put secrets here: only the API key is encrypted.
Input price, output pricenumber, USD per million tokens0Used for cost in answers and on the usage dashboard. 0 hides cost.
Users can pick this modelbooleanonOff: only users with all can pick it. The default model is always available.
Default modelmodelthe first modelUsed when nobody picks a model, and by the API and Workflows step.
Fallback modelmodel or nonenoneFinishes an answer when the chosen model fails or times out.

The model endpoint is the only host the plugin calls. Model calls follow the outbound rules of Kibana’s own connectors:

  • xpack.actions.allowedHosts must allow the model host. Its default allows any host. A blocked host fails with Host <host> is not allowed by xpack.actions.allowedHosts in kibana.yml.
  • A model without its own proxy uses xpack.actions.proxyUrl, honouring xpack.actions.proxyBypassHosts and xpack.actions.proxyOnlyHosts.
xpack.actions.allowedHosts: ["api.openai.com", "localhost"]
xpack.actions.proxyUrl: "http://proxy.example.com:3128"

Read-write mode lets Tocharian AI propose changes. Nothing changes until the user confirms a card, and every change runs with that user’s own privileges: a user who cannot write to an index, or edit a dashboard, cannot do it through Tocharian AI either.

Available in every edition.

  1. In the settings page, under Writes, turn on Allow read-write mode.
  2. Select Save settings.

Users then switch a conversation to read-write. While the switch is off, every conversation is read-only. The automation API and the Workflows step are always read-only.

Limit who can use it and what it can change

Section titled “Limit who can use it and what it can change”

Edition: needs rw.

Without limits, everyone who can use Tocharian AI can switch to read-write, and it can propose every kind of change. To narrow this, under Writes:

  1. In Roles that can use read-write mode, add the Elasticsearch roles. A user needs one of them. Roles are listed if you can manage security; otherwise type the names.
  2. Under Changes it can propose, clear what it must not change: Documents (write to an index), Dashboards, Cases, Alerts (status, tags, assignees), Alerting and detection rules.
  3. Select Save settings.
The Writes settings: Allow read-write mode on, read-write limited to the soc_analyst role, and only dashboards, cases and alerts allowed

Users without one of the roles see the Read-write switch greyed out. Changes of a cleared kind are not offered to the model, and a card proposed before the change is refused when it is confirmed.

These limits decide who may use Tocharian AI to make changes. They do not replace Elasticsearch and Kibana privileges, which still apply to every change.

When the license ends, the limits stay in force and can no longer be changed. Remove the read-write restrictions lifts them.

Masking replaces sensitive values with code names, such as EMAIL_3fa2c1d0, before anything reaches the model. Rules decide, not AI. How it works: Security and privacy.

Edition: needs masking. Without it, the model sees values as they are.

  1. In the settings page, under Sensitive data masking, check that Enable masking is on. It is on by default.
  2. Leave Scan all text values on to replace e-mail addresses, phone numbers and similar content in any field.
  3. Open the Tocharian AI app, then Data catalog, and open a dataset.
  4. In the field table, review the Sensitive column. Fields suggested by the rules show the reason. Set each field to one of the options below.
  5. Select Save settings for the two switches. Field choices are saved when you change them.
The field table of a dataset profile with the Sensitive column and its options

A field marked sensitive is masked in every dataset that has a field of that name. Its values are no longer sampled for profiles.

OptionStored asWhat the model gets
Not sensitivenoneThe value. Overrides a suggestion.
Code namepseudonymizeA code name that stays the same within a conversation, so the model can count and compare. Code names in the model’s queries become the real values before the query runs.
Partly hiddenpartialPart of the value: j***@example.com, ***1234 for numbers, the first two characters otherwise.
Not provideddropNothing: the field is removed from results.

Suggestions come from the field name, the ECS fields that usually hold personal data (such as user.email, url.password, http.request.body.content) and the format of sample values. Names that look like passwords, secrets, tokens, keys, credentials, cookies or sessions get Not provided; other suggestions get Code name. An administrator’s choice always wins.

With Scan all text values on, these patterns are replaced in any text value, also in fields not marked sensitive, in page text and in questions:

Code name prefixMatches
EMAIL_E-mail addresses
PHONE_Phone numbers in international or bracketed format
CARD_Card numbers that pass the Luhn check
IBAN_IBANs with a valid check sum
SECRET_JWTs, private keys, API keys of common providers, and the value of password=, secret=, token=, api_key= and similar pairs
VALUE_Values of sensitive fields that match none of the above

When the license ends, masking keeps applying its last rules, and they can no longer be changed.

In the settings page, under Query limits:

SettingDefaultRangeEffect
Query timeout (seconds)305–600Time limit of each Elasticsearch query. The connection test waits four times this, at least 10 seconds.
Maximum rows50010–10000Highest LIMIT of an ES|QL query; larger limits are lowered. Query DSL searches return at most 100 documents.
Default time range cap (days)901–3650When the user’s page has no time range and the query sets none, queries on a dataset with recent data cover the last this many days. Datasets whose newest data is older are not capped.

Fixed limits: a question may take up to 5 minutes, a background investigation or a deep API investigation up to 15 minutes. A question takes up to 8 model steps, a background or deep investigation up to 16.

In the settings page, under Profile sync:

SettingDefaultEffect
Write data view field descriptionsonConfirmed field meanings are written to the matching data views, so Discover shows them.
Write mapping _meta.descriptionoffDataset descriptions are also written to the dataset’s mapping, as the user who writes them, so other tools can read them.

The plugin also reads both: data view field descriptions and mapping _meta.description become field meanings and dataset descriptions in profiles.

In the settings page, under Activity log, set Keep conversations (days). Default 90. 0 keeps conversations forever.

Conversations not updated for that many days are deleted once a day, in every space, starting a minute after Kibana starts. Each daily run deletes up to 500. Retention does not apply to activity records, profiles or knowledge.

Record activity and install the dashboards

Section titled “Record activity and install the dashboards”

Every question, tool call, confirmed or cancelled change and setting change is recorded:

  • in the Kibana log, logger plugins.tocharianAi.audit, always on;
  • in the data stream .kibana-tocharian-ai-audit, while Also write activity records to a data stream is on (default). Kibana writes it with its own identity, so every user’s activity is recorded whatever their index privileges.

To keep question text out of the records, set Question text to Fingerprint only (default) or Not logged.

Edition: needs dashboards.

  1. In the settings page, under Built-in dashboards, select Install dashboards. They are installed into the current space.
  2. Select Open audit dashboard or Open usage & cost dashboard.

To update them after an upgrade, select Update dashboards. To have them in another space, install them from that space.

The audit dashboard: questions per user, queried datasets and confirmed changes

The audit dashboard shows who uses Tocharian AI, what was queried and which changes were confirmed. The usage & cost dashboard shows tokens, estimated cost and response time. Installing creates the data view tocharian-ai-audit, the dashboards tocharian-ai-audit-dashboard and tocharian-ai-usage-dashboard and one saved search.

SettingDefaultEffect
Also write activity records to a data streamonWrites records to .kibana-tocharian-ai-audit. The dashboards and the usage report read it.
Question textFingerprint onlyFull text, Fingerprint only (sha256: and 16 hex characters) or Not logged. Applies to the log and the data stream.
Keep conversations (days)90See Keep or delete conversations.

event.action is tocharian_ai. followed by:

ActionRecorded when
askA question was answered (chat, background, API or Workflows)
tool_callThe model ran a tool, such as a query
write_confirmed, write_cancelled, write_rejectedA proposed document write was confirmed, cancelled, or refused by the settings
kibana_actionA confirmed change to a dashboard, case, alert or rule ran
profile_updateA field meaning or dataset description was changed
note_updateA note was added, changed or deleted, or knowledge was saved
masking_updateA field’s sensitivity was changed
scanDatasets were profiled
settings_changeSettings were saved
secret_changeA model API key was replaced or removed
license_changeA license was installed or removed, or the trial was started
dashboards_installThe built-in dashboards were installed
FieldContent
@timestamp, event.outcome, event.durationTime, success or failure, duration in nanoseconds
user.name, kibana.space_idWho and in which space
tocharian_ai.conversation_id, run_id, kindThe conversation, the run and its kind (chat, background, api)
tocharian_ai.model, modeModel and ro or rw
tocharian_ai.questionPer the Question text setting
tocharian_ai.tool, query, target, hits, datasetsTool, query (up to 4,000 characters), target, hit count, datasets used
tocharian_ai.detailDetail of the event (up to 2,000 characters)
tocharian_ai.tokens.input, output, total, cost_usd, llm_calls, queries, duration_msUsage of an answer
tocharian_ai.masked_valuesValues masked in an answer

The data stream has no lifecycle policy. To limit how long records are kept, add one to the index template .kibana-tocharian-ai-audit-template or delete old backing indices.

Licenses are files signed by Tocharian OÜ and verified offline inside Kibana. Nothing is sent anywhere.

  1. In the settings page, under License, select Start 30-day trial.
  2. Confirm.

Each Elasticsearch cluster gets one trial, with every licensed feature. A trial has no grace period.

  1. Under License, select or drop the license file (.json), or paste it.
  2. Select Install.
The License block with an active license, its expiry and its enterprise features

A license replaces the trial while it is active. Remove license stops the licensed features at once; the trial record stays.

Select Export usage report and send the file yourself, for example when you renew. It covers the last 30 days: number of questions, active users, spaces, questions by kind, tokens and active days, with the plugin and Elasticsearch versions, the cluster id and the license details. It contains no questions, answers or data. It needs the activity data stream.

StateLicensed featuresMasking
None (free)OffOff
ActiveOn, as listed in the licenseOn, rules can be changed
Grace: up to 14 days after a license expiresOnOn, rules can be changed
Expired, or trial endedOff: the read-write limits keep their last values and can only be removed; the dashboards cannot be installed or updatedKeeps applying its last rules; they cannot be changed
Invalid (signature, or a plugin major version above the license’s)OffOff

Dashboards already installed stay. While the license cannot be read, for example while Elasticsearch restarts, masking stays on with its last rules.

WhatWhere
Settings and modelsSaved object tocharian-ai-config (hidden, all spaces)
Model API keysSaved objects tocharian-ai-secret, one per model, encrypted by Kibana
LicenseSaved object tocharian-ai-license (hidden, all spaces): the license file and the trial record. A second copy of the trial record is kept in the profile index.
Conversations and runs in progressSaved objects tocharian-ai-conversation (hidden, per space, private to their owner). The code names of masked values and their real values are stored with the conversation.
Dataset profiles, sensitivity rules, knowledgeIndex .kibana-tocharian-ai-profiles (hidden, written by Kibana)
Activity recordsKibana log plugins.tocharianAi.audit; data stream .kibana-tocharian-ai-audit (hidden, written by Kibana)
Built-in dashboardsData view tocharian-ai-audit, two dashboards and one saved search in the space where they were installed

The owner of a conversation is a user name in a realm: a native admin and an LDAP admin are different users. A request with an API key belongs to the user who created the key.

Every setting of Stack Management → Kibana → Tocharian AI. Changes need all and take effect within a few seconds, on every Kibana instance.

SectionSettingDefaultEffect
ModelsModels, default model, fallback modelnoneSee Add a model.
WritesAllow read-write modeoffSee Turn on read-write mode.
WritesRoles that can use read-write modeempty: everyone who can use Tocharian AISee Limit who can use it. Needs rw.
WritesChanges it can proposeallSee Limit who can use it. Needs rw.
Sensitive data maskingEnable maskingonSee Mask sensitive fields. Needs masking.
Sensitive data maskingScan all text valuesonSee Reference: content scan.
Query limitsQuery timeout (seconds)30See Set query limits.
Query limitsMaximum rows500See Set query limits.
Query limitsDefault time range cap (days)90See Set query limits.
Profile syncWrite data view field descriptionsonSee Sync profiles.
Profile syncWrite mapping _meta.descriptionoffSee Sync profiles.
Activity logAlso write activity records to a data streamonSee Record activity.
Activity logQuestion textFingerprint onlySee Reference: activity settings.
Activity logKeep conversations (days)90See Keep or delete conversations.
Built-in dashboardsInstall or update dashboardsnot installedSee Install the built-in dashboards.
LicenseLicense file, trial, usage reportnoneSee Manage the license and the trial.
StatusEncryption key, storage, versionread-onlyWhether the encryption key is set, the profile index and data stream in use, and the plugin and Elasticsearch versions.