Completing Plugin Configuration Information
Modifying the Manifest File
The manifest.yaml file in the plugin directory declares the basic information about the plugin, which will be displayed in the LangBot UI or plugin marketplace interfaces.
The plugin-level spec.permissions lists the capabilities and Workspace operations the plugin needs. A Workspace member confirms them after installation; see Plugin permissions.
apiVersion: v1 # Do not modify
kind: Plugin # Do not modify
metadata:
author: RockChinQ # Author, must match regex ^[a-zA-Z0-9_-]+$
name: HelloPlugin # Plugin name, used to distinguish plugins, must match regex ^[a-zA-Z0-9-]+$
repository: 'https://github.com/langbot-app/HelloPlugin' # Plugin repository URL
version: 0.1.0 # Plugin version
description:
en_US: 'Hello LangBot Plugin' # Plugin description, multilingual
zh_Hans: 'Hello LangBot Plugin'
label:
en_US: HelloPlugin # Plugin label, displayed in the interface, multilingual
zh_Hans: HelloPlugin
icon: assets/icon.svg # Plugin icon, defaults to assets/icon.svg, can be replaced with various image formats
spec:
permissions: # Capabilities and Workspace operations the plugin needs; see Plugin permissions
capabilities: []
workspace_operations: []
config: [] # Plugin configuration item format
components: {} # Plugin component list, no need to modify manually
execution:
python:
path: main.py # Do not modify
attr: HelloPlugin # Do not modifyTo certify your plugin and let several installations share one runtime, also declare sharedRuntime and componentModel under execution; see Certified plugins and shared runtime.
Plugin multilingual support follows the RFC 4646 standard. Currently supported languages include:
en_USEnglish (required)zh_HansSimplified Chinesezh_HantTraditional Chineseja_JPJapanesevi_VNVietnameseth_THThaies_ESSpanish
LangBot Version Compatibility
Plugins can declare their compatible LangBot version range under metadata.compatibility.langbot in manifest.yaml:
metadata:
compatibility:
langbot:
min: "4.12.0" # Optional, inclusive
max: "4.x" # Optional, inclusiveFields and Shorthand Rules
- Optional & Omission:
compatibilityorlangbotcan be omitted or set tonull(equivalent to undeclared). To leaveminormaxunrestricted, omit that key—settingmin: nullormax: nullis treated as a non-string value and rejected as an invalid declaration. If no compatibility range is declared, the plugin is treated as compatible with all LangBot versions. - Inclusive Bounds: Both
minandmaxare inclusive (min <= Core version <= max). An optionalvprefix is allowed (e.g.,"v4.12.0"). minShorthand: Supports4,4.12, and4.12.3. Missing segments are zero-padded (e.g.,"4"equals4.0.0,"4.12"equals4.12.0). Wildcards (xor*) are not allowed inmin.maxShorthand: Supports4,4.x,4.x.x,4.*,4.12,4.12.x, and4.12.3. Missing segments orx/*mean that segment has no upper limit (e.g.,"4"and"4.x"both equal4.∞.∞;"4.12"and"4.12.x"both equal4.12.∞). A wildcard must follow a numeric segment and cannot be followed by further numbers (e.g.,"4.x.5"is invalid).
Quotes Are Required
Both min and max values must be strings—always wrap version numbers in quotes (e.g., "4.10"). Without quotes, YAML parses 4.10 as the float 4.1 and 4 as the integer 4, which alters the version or fails validation.
Version Comparison & Marketplace Selection
- Core Prerelease Comparison: When comparing against the LangBot Core version, only the first three numeric segments
X.Y.Zare used (stripping anyvprefix and ignoring prerelease or dev suffixes). For example,4.12.0b1,4.12.0rc1, and4.12.0.dev0+g123are all treated as4.12.0, so prerelease builds satisfymin: "4.12.0". - Selecting the Latest Compatible Release: When the plugin marketplace selects the "latest compatible version" (
compatible_version) for the current LangBot, it orders compatible releases by semver descending:- Plugin version parsing accepts an optional
vprefix, pads1.2to1.2.0, and supports both SemVer prereleases (e.g.,1.2.0-beta.1) and PEP 440 style prereleases (e.g.,1.2.0a1,1.2.0b1,1.2.0rc1). - Stable releases first: If any compatible stable release exists, the highest stable release is selected; prereleases are only selected when no compatible stable release is available.
- Unparseable version strings rank after all parseable versions in reverse publication order; versions with equal semver (such as
1.2and1.2.0) also fall back to reverse publication order.
- Plugin version parsing accepts an optional
Validation & Error Examples
If the declaration is invalid (non-string value, malformed version, or min > max), lbp build exits with status 1 and prints an error:
$ lbp build
metadata.compatibility.langbot.min: 请用引号包住版本号(YAML 解析值为 4.1)$ lbp build
metadata.compatibility.langbot.min: '4.12' exceeds max '4.11'$ lbp build
metadata.compatibility.langbot.min: invalid version '4.x'Invalid declarations are also rejected during plugin submission to the marketplace (Space). During non-marketplace installation in LangBot Core (local upload or GitHub), an invalid declaration is treated as invalid and requires explicit user confirmation.
Recommended Configuration
Declare only the tested minimum version min, and omit max unless you have confirmed that a future LangBot release breaks compatibility:
metadata:
compatibility:
langbot:
min: "4.12.0"Plugin Configuration Item Format
In the manifest.yaml file, fields declared in spec.config will be rendered by LangBot as configuration item forms for users to fill out. Plugins can retrieve user-filled configuration items through APIs provided by the SDK (see later sections).
For example:
spec:
config:
- name: github_token # Required; configuration item name, used for retrieval in the plugin
type: string # Required; configuration item type, supports string, integer, float, boolean, select, prompt-editor, llm-model-selector, bot-selector, tools-selector, etc.
label: # Required; configuration item display name, supports multilingual. Language codes follow RFC 4646 standard.
en_US: Github Token
zh_Hans: Github Token
description: # Configuration item description, supports multilingual. Optional.
en_US: Image downloading requires a Github token
zh_Hans: 如果不填的话,图片可能会下载失败
default: '' # Configuration item default value, optional.
required: false # Whether the configuration item is required, optional.
show_if: # Conditional rendering (shows when conditions are met), optional.
field: mode
operator: eq
value: mode1
- name: mode
type: select
...The supported types and fields for configuration items are as follows:
Conditional Rendering (show_if)
All types of configuration items support conditional rendering using the show_if field. You can decide whether the current field is rendered based on the value of another field in the same (or an associated) form.
- name: advanced_setting
type: string
show_if:
field: mode # The name of the dependent field
operator: eq # The operator, supports 'eq' (equals), 'neq' (not equals), 'in' (in a list)
value: advanced # The value to check againstNote: Cross-form cascading relationships (e.g.
creation_schemavalues reading fromretrieval_schemavalues and vice versa in a Knowledge Engine) are supported in the latest LangBot frontend.
type: string
String type. Optionally supports options for preset values — when provided, a dropdown button appears next to the input allowing users to quickly fill in a preset value. Users can still type freely.
- name: api_key
type: string
...With preset options:
- name: api_url
type: string
options: # Optional preset values, displayed as a dropdown button next to the input.
- name: "https://api.openai.com/v1" # The value to fill in when selected.
label: # Display name, supports multilingual.
en_US: OpenAI Official
zh_Hans: OpenAI 官方
- name: "https://api.deepseek.com/v1"
label:
en_US: DeepSeek
zh_Hans: DeepSeek
...type: array[string]
String array.
- name: tags
type: array[string]
...type: integer
Integer type.
- name: progress
type: integer
...type: float
Float type.
- name: temperature
type: float
...type: boolean
Boolean type.
- name: is_enabled
type: boolean
...type: select
Dropdown menu. Requires configuring options, which represents the dropdown menu options. Each option displays its label as the primary text, with the name (value) shown in smaller text below.
- name: mode
type: select
allow_custom: true
options: # Dropdown options, supports multilingual.
- name: mode1 # Value, displayed as secondary text in the dropdown.
label: # Display name, supports multilingual.
en_US: Mode 1
zh_Hans: 模式 1
- name: mode2
label: # Display name, supports multilingual.
en_US: Mode 2
zh_Hans: 模式 2
...Set allow_custom: true to add a Custom option alongside the presets. A text input appears only when Custom is selected. The saved value is the selected name or the custom string, never a Custom marker. This also applies to a runner’s spec.config.
type: prompt-editor
Prompt editor. Displays a prompt editor from the Chat configuration page, with the final result represented in OpenAI's messages format.
- name: prompt
type: prompt-editor
...type: text
Large text input. Rendered as a textarea in the frontend for user input, and passed to the plugin as a string.
- name: prompt
type: text
...type: file
File upload. Supports file uploads up to 10MB, passed to the plugin in the format {"file_key": "xxxxx.xxx", "mimetype": "xxxxx"}. The plugin can use the get_config_file API to retrieve the file content.
- name: config_file
type: file
accept: 'application/json' # Optional, specify accepted file MIME types
...Retrieving the file in the plugin:
# Get file information from config
file_config = self.get_config()['config_file']
file_key = file_config['file_key']
mimetype = file_config['mimetype']
# Example output: {'file_input': {'file_key': 'plugin_config_d2234fd802054faf80babe0679a97fa9.json', 'mimetype': 'application/json'}}
print(file_config)
# Get file content
file_bytes = await self.get_config_file(file_key)Common MIME type and file extension reference: MDN Documentation
type: array[file]
Multiple file upload. Similar to the file type, but supports uploading multiple files, passed to the plugin in the format [{"file_key": "xxxxx.xxx", "mimetype": "xxxxx"}].
- name: resource_files
type: array[file]
accept: 'image/*' # Optional, specify accepted file MIME types
...Retrieving files in the plugin:
# Get file list from config
files_config = self.get_config()['resource_files']
for file_config in files_config:
file_key = file_config['file_key']
mimetype = file_config['mimetype']
# Get file content
file_bytes = await self.get_config_file(file_key)type: llm-model-selector
LLM model selector. Displays an LLM model selector where you can choose configured LLM models, with the final result represented as the LLM model UUID.
- name: model
type: llm-model-selector
...type: bot-selector
Bot selector. Displays a Bot selector where you can choose configured Bots, with the final result represented as the Bot UUID.
- name: bot
type: bot-selector
...Using the Bot UUID in the plugin:
# Get Bot UUID from config
bot_uuid = self.get_config()['bot']
print(bot_uuid) # Output: '550e8400-e29b-41d4-a716-446655440000'type: tools-selector
Tool selector. Displays a multi-select tool selector where you can choose registered tools (plugin tools and MCP tools), with the final result represented as an array of tool names.
- name: selected_tools
type: tools-selector
...Using the selected tool names in the plugin:
# Get selected tool names from config
selected_tools = self.get_config()['selected_tools']
print(selected_tools) # Output: ['get_weather_alerts', 'web_search']
# Call selected tools
for tool_name in selected_tools:
result = await self.plugin.call_tool(
tool_name=tool_name,
parameters={"query": "hello"},
session={},
query_id=0,
)What's Next
This tutorial will guide you through step-by-step completion of plugin functionality.
- Adding Components: Plugin components are the core functional units of plugins. You can add components based on your needs.
