Skip to main content

Configuration Files and Options

The root directory of a Python Agent project contains two TOML configuration files:

  • agent.toml: Runtime configuration for the Agent's basic information, entry point, and runtime requirements.
  • build.toml: Build configuration for the target platform, Python dependencies, and signing information.

Runtime configuration: agent.toml​

Basic information and runtime requirements​

Option

Description

id

Unique Agent identifier. Reverse-domain notation is recommended, such as com.example.my_agent.

version

Agent version used in the .agent package name and displayed in the App.

name

Display name. Localization is supported, and an English en name is required.

logo

Icon path relative to the project root. The file must exist.

description

Brief Agent description.

entry

Startup entry in file path:class name form. The entry class must inherit from booster_agent_framework.AgentBase.

debuggable

Optional. When true, starting in debug mode enables the Python debugging service.

requirements.min_api_level

Minimum compatible system API level. When using newer interfaces, call get_sys_api_level() and handle older system versions.

requirements.models

List of supported robot models; at least one is required. All selected models must run the same Ubuntu version as the robot connected to Booster Studio. You can combine Booster T1 and Booster K1, or combine Booster T2 and Booster T2 Hand, but not models from both groups.

Component shortcuts (optional)​

Add the following configuration to agent.toml to register a controller shortcut, then reference it with shortcut_id when creating a component in Python code:

[component_shortcuts]
version = "1.0"

[[component_shortcuts.shortcut_list]]
id = "wave"
shortcut = ["A"]
locale_name = { en = "Wave", zh = "挥手" }

Fields in [[component_shortcuts.shortcut_list]]:

Field

Description

id

Unique shortcut configuration identifier, corresponding to shortcut_id in code.

shortcut

List containing 1 to 3 keys. See the key list for valid names.

locale_name

Shortcut display name. An English en name is required.

  • All three fields are required for each shortcut. Repeat [[component_shortcuts.shortcut_list]] to add more entries.
  • version is an optional shortcut-list version and is currently used only as metadata.

Do not use reserved system keys such as BACK, START, LS, or RS. The keys CENTER, LEFT_UP, LEFT_DOWN, RIGHT_UP, and RIGHT_DOWN are not currently supported either.

Build configuration: build.toml​

Platforms and Python dependencies​

Option

Description

platform.supports

Platforms supported by the build. If [platform] is omitted, the current build environment is selected automatically.

python.pip_repos

List of pip sources. The first HTTP or HTTPS URL is the primary index and later URLs are additional indexes; paths beginning with dir: refer to local wheel directories in the project. pip selects suitable packages from all available sources, so list order does not indicate installation priority.

python.obfuscation

Whether to obfuscate Python source. Obfuscation reduces readability but cannot completely prevent reverse engineering.

python.dependencies.common

Dependencies shared by all target platforms, using standard pip requirement syntax such as numpy==1.21.5.

python.dependencies.<platform>

Dependencies installed only on the specified platform, in addition to those in common.

Platform names:

Platform

Environment

sim_x86_64

x86 virtual robots in Booster Studio (Windows / Linux)

sim_aarch64

ARM virtual robots in Booster Studio (macOS)

real_jetson

Booster T1, Booster K1 Education/Professional, Booster T2

real_qcom

Booster K1 Geek

The following example shares the same Python dependency for both the virtual and physical robots.

[platform]
supports = ["sim_x86_64", "sim_aarch64", "real_jetson", "real_qcom"]

[python]
pip_repos = ["https://pypi.org/simple"]
obfuscation = false

[python.dependencies]
common = ["numpy==1.21.5"]

Signing configuration​

Starting with Booster Studio 1.13, configure a signing keystore through [sign]. Without a certificate, generated Agents use a common debug certificate; a dedicated certificate is recommended for production releases.

Option

Description

sign.keystore_path

Keystore file path. Required when [sign] is configured.

sign.keystore_pass

Keystore password. Required when [sign] is configured.

See Signing and Certificates for certificate generation, path rules, and configuration examples.