Skip to content

Get started with Tocharian AI

For administrators who install Tocharian AI for the first time.

In this tutorial we install Tocharian AI into a self-managed Kibana, connect it to a model, and ask a first question about Kibana’s sample web logs. At the end you have a working assistant that answers with evidence: the query it ran, the hit count and the result table. It takes about 15 minutes.

The pictures show Kibana 9.5. Kibana 8.x looks slightly different and works the same.

You need:

  • A self-managed Kibana between 8.17.0 and 9.5.7 (tarball, package, Docker image or ECK). Elastic Cloud Hosted and Serverless do not allow Kibana plugins.
  • Shell access to the Kibana host and permission to restart Kibana.
  • A Kibana user with the superuser role, such as elastic.
  • A model endpoint that speaks the OpenAI (/chat/completions) or Anthropic (/messages) API, and its API key if it needs one. Hosted services (OpenAI, Anthropic, OpenRouter) and local servers (vLLM, Ollama) both work.

Step 1: Download the zip for your Kibana version

Section titled “Step 1: Download the zip for your Kibana version”

A Kibana plugin only loads into the exact Kibana version it was built for, so there is one zip per Kibana version.

  1. In the Kibana home directory (for a .deb or .rpm package, /usr/share/kibana), print the version:

    Terminal window
    bin/kibana --version

    The output is a single version number, for example 9.5.7. We use 9.5.7 in the rest of this tutorial; use your own version wherever it appears.

  2. From the repository’s Releases page, download tocharianAi-1.0.1-kibana-9.5.7.zip and SHA256SUMS into the same folder.

  3. Check the download:

    Terminal window
    sha256sum --check --ignore-missing SHA256SUMS

    On macOS, use shasum -a 256 --check --ignore-missing SHA256SUMS.

    You should see tocharianAi-1.0.1-kibana-9.5.7.zip: OK.

  1. From the Kibana home directory, install the zip:

    Terminal window
    bin/kibana-plugin install file:///path/to/tocharianAi-1.0.1-kibana-9.5.7.zip

    The last line of the output is Plugin installation complete.

    If you see Plugin tocharianAi [<version>] is incompatible with Kibana [<version>], the zip is for another Kibana version. Download the zip that matches the output of bin/kibana --version.

Tocharian AI stores model API keys encrypted with Kibana’s own encryption key. Many installations already have one.

  1. Open config/kibana.yml and look for xpack.encryptedSavedObjects.encryptionKey. If it is there, go to step 4.

  2. If it is missing, generate a key:

    Terminal window
    bin/kibana-encryption-keys generate
  3. Copy the xpack.encryptedSavedObjects.encryptionKey line from the output into config/kibana.yml:

    xpack.encryptedSavedObjects.encryptionKey: "<32 or more characters>"

    Keep this key the same from now on. If it changes, Kibana can no longer read the stored API keys.

Restart Kibana the way you normally do, for example sudo systemctl restart kibana.

When Kibana is back, sign in as a superuser. Notice the Tocharian AI button in the header, on the right. That button tells you the plugin is loaded.

  1. Go to Stack Management → Kibana → Tocharian AI. The page title is Tocharian AI settings.

  2. Under Models, select Add model. A form opens for the new model, marked Default.

  3. Fill in the form:

    FieldValue
    Display name<a name your users will recognise>
    API formatOpenAI (chat/completions) or Anthropic (messages), whichever your endpoint speaks
    Base URLfor example https://api.openai.com/v1, https://api.anthropic.com/v1, or http://localhost:11434/v1 for a local Ollama
    Model name<model name>, as your endpoint knows it
  4. Next to API key, select Replace, paste <API key> and select Save API key. The badge changes to Set. A local model without a key can skip this.

  5. Select Test connection.

After a few seconds you should see Connected · <n> ms. The settings are saved automatically when you save the key or test the connection; the bar at the bottom says Saved.

The Models section of Tocharian AI settings with one default model: display name, API format, base URL, model name and a stored API key

If the test shows an error instead, find the message in Troubleshooting.

  1. Open http://localhost:5601/app/home#/tutorial_directory/sampleData (replace localhost:5601 with your Kibana address).
  2. Find Sample web logs and select Add data.

Kibana creates the kibana_sample_data_logs index, a data view and the [Logs] Web Traffic dashboard.

  1. Open the Tocharian AI app: in the main menu, select Tocharian AI, or open http://localhost:5601/app/tocharianAi. Notice the title Ask your data and, on the left, New conversation and Data catalog.

  2. In the box that says Ask a question about your data, type:

    In kibana_sample_data_logs, how many requests returned response code 404 in the last 7 days, and which 5 URLs caused most of them?
  3. Press Enter.

Watch the steps appear while the question runs: Reading context and data profiles, then Profiling dataset: kibana_sample_data_logs the first time the dataset is used, Understanding the question, one or more Running ES|QL: … steps, and Writing the answer.

The answer leads with the count, then lists the URLs. Notice the evidence ids such as [E1] in the text and the badges under the answer, for example E1 · 5: the id and the number of hits.

The Tocharian AI app with the first question about 404 responses and an answer that cites evidence E1
  1. Select an evidence id, for example E1.

A panel opens beside the answer with Hits, Dataset and Took, the Executed query (ES|QL), the Automatic time range if Tocharian AI added one, and the Result table. These are the rows the answer relies on.

  1. Select Open in Discover. Discover opens with the same ES|QL query, so you can see the same rows in Kibana itself.

Under the answer, the line <n> model call(s) · <n> quer(ies) · <n>s tells you how much work the question took.

You installed Tocharian AI for your Kibana version, gave Kibana an encryption key, connected a model, and asked a question that came back with the exact query and data behind it. Tocharian AI also created a profile of kibana_sample_data_logs, which you can open in Data catalog.

  • Let other people use it: give their roles the Tocharian AI feature privilege (read to chat, all to manage settings). See Give users access.
  • Ask from any Kibana page, read dashboards, show charts and confirm changes: user guide.
  • What leaves the cluster and how masking works: security and privacy.
  • Start investigations from alerting rules, Workflows or scripts: API.
  • What the assistant reads on each Kibana page: page awareness.
  • Something does not work: troubleshooting.