Skip to content

Writing Configuration Plugins

Thorsten Sommer edited this page Oct 31, 2026 · 6 revisions

A configuration plugin is a file named plugin.lua, written in the programming language Lua. You don't need to program, though: a configuration is a list of values in Lua's notation. You don't have to write all of it by hand either. Much of it you can set up in AI Studio and export, see Testing and Exporting Configurations.

Start from the example

Our repository contains an example configuration plugin with its icon. It contains every setting, commented out, with an explanation and the allowed values. Copy both files from the tag of the version your devices run, such as v26.10.1, and remove the comment marks -- in front of what you need.

The header

The first lines describe the plugin:

require("icon")

ID = "9072b77d-ca81-40da-be6a-861da525ef7b"
ICON_SVG = SVG
NAME = "Example Organization - Configuration for everybody"
DESCRIPTION = "The AI Studio configuration of Example Organization"
VERSION = "1.4.0"
LAST_CHANGED = "2026-10-30T09:00:00Z"
TYPE = "CONFIGURATION"
DEPLOYED_USING_CONFIG_SERVER = true
PRIORITY = 0
AUTHORS = {"IT department of Example Organization"}
SUPPORT_CONTACT = "IT service desk, phone 1234"
SOURCE_URL = "mailto:servicedesk@example.org?subject=AI%20Studio"
CATEGORIES = { "CORE" }
TARGET_GROUPS = { "EVERYONE" }
IS_MAINTAINED = true
DEPRECATION_MESSAGE = ""
Field Meaning
ID The configuration ID, the same as on the devices. See How Central Configuration Works.
ICON_SVG The icon, here taken from icon.lua. It must be an SVG that brings its own colors.
NAME, DESCRIPTION What users see on the "Plugins" and "Information" pages.
VERSION, LAST_CHANGED Your version number, and optionally when you changed the plugin last, in UTC. Count them up with each change; it helps with support.
TYPE Always "CONFIGURATION".
DEPLOYED_USING_CONFIG_SERVER true for everything you deploy.
PRIORITY Which of several configurations wins, see How Central Configuration Works. Optional, 0 by default.
SUPPORT_CONTACT, SOURCE_URL Where users get help. SOURCE_URL can be a web address or a mailto: link, for example, to your intranet or your service desk.
DEPRECATION_MESSAGE When not empty, AI Studio shows this message to users, for example, when you replace this configuration with another one.

The content

After the header, the table CONFIG holds the content. Each part is optional:

Part What it holds
CONFIG["LLM_PROVIDERS"] LLM providers
CONFIG["EMBEDDING_PROVIDERS"] Embedding providers for data sources
CONFIG["TRANSCRIPTION_PROVIDERS"] Transcription providers for voice input, audio, and video
CONFIG["USER_API_KEY_PROMPT"] A panel on the start page that asks users for their personal API key
CONFIG["DATA_SOURCES"] Data sources on ERI servers
CONFIG["MAILBOX_PROVIDERS"] The mail servers of your organization, for the mailbox prototype
CONFIG["CHAT_TEMPLATES"] Chat templates
CONFIG["PROFILES"] Profiles
CONFIG["DOCUMENT_ANALYSIS_POLICIES"] Policies for the Document Analysis Assistant
CONFIG["INTRODUCTIONS"] Your own introductions on the start page
CONFIG["MANDATORY_INFOS"] Notices users must read and accept
CONFIG["SETTINGS"] Settings that you lock or preset

The topic pages explain each part: Providers and API Keys the providers and the key prompt, Confidence and Data Security the data sources and mail servers, Assistants and Templates the chat templates, profiles, policies, introductions, and notices.

Objects

Providers, chat templates, profiles, and the other objects are entries of a list. Each one has an Id of its own, a GUID:

CONFIG["LLM_PROVIDERS"] = {}

CONFIG["LLM_PROVIDERS"][#CONFIG["LLM_PROVIDERS"]+1] = {
    ["Id"] = "4f6b3a8e-2d4c-4b1a-9e5f-7a8b9c0d1e2f",
    ["InstanceName"] = "Our language model",
    ["UsedLLMProvider"] = "SELF_HOSTED",
    ["Host"] = "VLLM",
    ["Hostname"] = "https://llm.intra.example.org",
    ["AdditionalJsonApiParameters"] = "",
    ["Model"] = {
        ["Id"] = "openai/gpt-oss-120b",
        ["DisplayName"] = "GPT OSS 120B",
    },
}

#CONFIG["LLM_PROVIDERS"]+1 appends the entry to the list, so you can add as many as you like.

Keep the Id of an object the same across all versions of your configuration. AI Studio recognizes the object by it: users who chose your provider for a chat or an assistant keep it after you change its model. With a new Id, AI Studio removes the old object and adds a new one. Create new IDs only for new objects, and never use the same ID twice.

Settings

Each setting is a key of the form <area>.<setting> in CONFIG["SETTINGS"]:

CONFIG["SETTINGS"] = {}

-- A choice, written as text:
CONFIG["SETTINGS"]["DataApp.UpdateInterval"] = "DAILY"

-- A switch:
CONFIG["SETTINGS"]["DataApp.AllowUserToAddProvider"] = false

-- A number:
CONFIG["SETTINGS"]["DataApp.HttpClientTimeoutSeconds"] = 300

-- A list:
CONFIG["SETTINGS"]["DataApp.HiddenAssistants"] = { "BIAS_DAY_ASSISTANT", "JOB_POSTING_ASSISTANT" }

-- A setting offered as a default, which users may change:
CONFIG["SETTINGS"]["DataApp.StartPage"] = "CHAT"
CONFIG["SETTINGS"]["DataApp.StartPage.AllowUserOverride"] = true

The example plugin names the area, the allowed values, and the default of each setting. Settings you leave out stay with the user.

Lua in a nutshell

  • -- starts a comment, which runs to the end of the line.
  • Text goes in quotes: "CHAT". Switches are true and false, in lowercase, without quotes.
  • Lists and tables go in curly braces. A comma after the last entry is allowed.
  • Names are case-sensitive: CONFIG["SETTINGS"] works, Config["Settings"] doesn't.
  • Write each setting once per plugin. A later line with the same key replaces the earlier one.

When something goes wrong

  • A syntax error prevents AI Studio from loading the whole plugin. The log names the error. A configuration that was loaded before stays active until the plugin can be loaded again.
  • A wrong value of a setting, such as a misspelled choice, is skipped with a warning in the log. The other settings still apply.
  • An ID mismatch between the plugin and the device is reported on the "Information" page.

Test every change on one device before you roll it out, see Testing and Exporting Configurations.

Where to go next

Clone this wiki locally