-
Notifications
You must be signed in to change notification settings - Fork 1.5k
en deploy settings
Configure system runtime settings in data/config.yaml.
Generally, no modification is needed.
admins: []
api:
port: 5300
webhook_prefix: 'http://127.0.0.1:5300'
extra_webhook_prefix: ''
global_api_key: '' # Global API key. When non-empty, it is accepted for both the HTTP API and the MCP server (/mcp) with no login session, no database record, and no lbk_ prefix required. Empty = disabled. Stored in plaintext — enable only on trusted/internal deployments and serve over HTTPS.
command:
enable: true
prefix:
- '!'
- !
privilege: {}
concurrency:
pipeline: 20
session: 1
proxy:
http: ''
https: ''
system:
instance_id: ''
edition: community
recovery_key: ''
allow_modify_login_info: true
disabled_adapters: []
limitation:
max_bots: -1
max_pipelines: -1
max_extensions: -1
task_retention:
# Keep at most this many completed async task records in memory
completed_limit: 200
jwt:
expire: 604800
secret: ''
database:
use: sqlite
sqlite:
path: 'data/langbot.db'
postgresql:
host: '127.0.0.1'
port: 5432
user: 'postgres'
password: 'postgres'
database: 'postgres'
vdb:
use: chroma
qdrant:
url: ''
host: localhost
port: 6333
api_key: ''
seekdb:
mode: embedded # 'embedded' or 'server'
# Embedded mode options:
path: './data/seekdb'
database: 'langbot'
# Server mode options (used when mode='server'):
host: 'localhost'
port: 2881
user: 'root'
password: ''
tenant: '' # Optional, for OceanBase server
milvus:
uri: 'http://127.0.0.1:19530'
token: ''
db_name: ''
pgvector:
host: '127.0.0.1'
port: 5433
database: 'langbot'
user: 'postgres'
password: 'postgres'
valkey_search:
host: 'localhost'
port: 6379
db: 0
username: '' # Optional (ACL user)
password: '' # Optional (ACL / requirepass), never logged
tls: false # Optional, for toB/SaaS deployments
index_algorithm: 'HNSW' # HNSW (approximate) or FLAT (exact)
distance_metric: 'COSINE' # COSINE, L2, or IP
request_timeout: 5000 # Per-request timeout in ms
storage:
use: local
cleanup:
# Enable periodic cleanup of local/S3 uploaded files and old log files
enabled: true
# Cleanup check interval in hours
check_interval_hours: 1
# Root-level uploaded files older than this will be deleted
uploaded_file_retention_days: 7
# LangBot log files older than this many days will be deleted
log_retention_days: 3
s3:
endpoint_url: ''
access_key_id: ''
secret_access_key: ''
region: 'us-east-1'
bucket: 'langbot-storage'
plugin:
enable: true
runtime_ws_url: 'ws://langbot_plugin_runtime:5400/control/ws'
enable_marketplace: true
display_plugin_debug_url: 'ws://localhost:5401/plugin/debug/ws'
binary_storage:
# Max bytes for a single plugin binary storage value
max_value_bytes: 10485760
monitoring:
auto_cleanup:
# Enable automatic cleanup of expired monitoring records
enabled: true
# Retention period in days, records older than this will be deleted
retention_days: 30
# Cleanup check interval in hours
check_interval_hours: 1
# Number of expired rows to delete per table batch
delete_batch_size: 1000
box:
enabled: true # Master switch for Box Runtime. When false, Box-dependent features such as sandbox tools, Skill add/edit, and stdio MCP are disabled.
backend: 'local' # 'local' (Docker/nsjail), 'docker', 'nsjail', or 'e2b'. Can be written via BOX__BACKEND.
runtime:
endpoint: '' # External Box Runtime base URL, e.g. 'ws://127.0.0.1:5410'. When empty, non-Docker deployments use a locally managed Runtime; Docker deployments connect to langbot_box:5410 on the Compose network.
local:
profile: 'default'
image: '' # Custom local sandbox image. Leave empty to use the profile default.
host_root: './data/box' # Base host directory for local workspace mounts. Docker deployments should use an absolute host path mounted by langbot_box.
default_workspace: '' # Defaults to '<host_root>/default'.
skills_root: 'skills' # Box-owned Skill package directory. Relative paths are resolved under host_root.
allowed_mount_roots: # Defaults to ['<host_root>'] when left empty.
- './data/box'
- '/tmp'
workspace_quota_mb: null # Optional disk quota override (>= 0). null = profile default.
default_memory_mb: 1536 # Default nsjail cgroup memory limit per MCP stdio process (MB). Node.js MCP servers (npx/bunx) need more than Python ones due to V8 + WASM overhead. Too low = return_code=137 (OOM). Override per-server with box.memory_mb. Env: BOX__DEFAULT_MEMORY_MB.
docker:
cpu_limit_enabled: true # When false, Docker sandbox containers are started without --cpus. Memory and PID limits still apply.
e2b:
api_key: '' # Can also be set via E2B_API_KEY env var.
api_url: '' # Custom API URL for self-hosted deployments.
template: '' # Default template ID (e.g. 'base', 'python-3.11').
space:
# Space service URL for OAuth and API
url: 'https://space.langbot.app'
# Space API URL for model requests (MaaS)
models_gateway_api_url: 'https://api.langbot.cloud/v1'
# OAuth authorization page URL
oauth_authorize_url: 'https://space.langbot.app/auth/authorize'
disable_models_service: false
disable_telemetry: false-
storage.cleanup.uploaded_file_retention_daysonly cleans temporary uploaded files at the storage root. It does not delete plugin configuration files or internal objects stored under directories. -
storage.cleanup.log_retention_dayscleans old log files by the date in their file names. The default keeps at most 3 days of logs. - When SQLite is used as the database, automatic monitoring cleanup directly releases database file space after deleting expired records.
-
plugin.binary_storage.max_value_byteslimits the size of a single plugin binary storage value. The default is 10 MiB. - The WebUI sidebar includes a “Storage Analysis” page for viewing database, logs, uploaded files, vector store, plugins, MCP, temporary files, and cleanup candidates.
-
vdb.valkey_searchuses the Valkey Search module via the official asyncvalkey-glideclient and supports vector, full-text, and hybrid search. Run a server with the module loaded, e.g.valkey/valkey-bundle:9.1.0(docker run -d -p 6379:6379 valkey/valkey-bundle:9.1.0). Note: hybrid search follows a filter-then-KNN model, so thevector_weightparameter is accepted but not honored (a native Valkey Search limitation). The connection is lazy, so a down or misconfigured server does not block startup. See the Valkey Search integration doc for details. -
api.global_api_keyis a global API key for agents / automation: once set, calls to the HTTP API or the built-in MCP server (/mcp) authenticate by sendingX-API-Key: <key>orAuthorization: Bearer *** — no login session and no database-storedlbk_key required. It is stored in plaintext inconfig.yaml`, so enable it only on trusted / internal deployments and serve it over HTTPS. See API Key Authentication.
The configuration in config.yaml can be set via environment variables. Environment variable names use uppercase letters and double underscores, for example: API__PORT represents api.port.
-
API__PORTrepresentsapi.port -
CONCURRENCY__PIPELINErepresentsconcurrency.pipeline -
DATABASE__SQLITE__PATHrepresentsdatabase.sqlite.path -
STORAGE__CLEANUP__UPLOADED_FILE_RETENTION_DAYSrepresentsstorage.cleanup.uploaded_file_retention_days -
STORAGE__CLEANUP__LOG_RETENTION_DAYSrepresentsstorage.cleanup.log_retention_days -
MONITORING__AUTO_CLEANUP__RETENTION_DAYSrepresentsmonitoring.auto_cleanup.retention_days -
PLUGIN__BINARY_STORAGE__MAX_VALUE_BYTESrepresentsplugin.binary_storage.max_value_bytes -
BOX__BACKENDrepresentsbox.backend -
BOX__LOCAL__HOST_ROOTrepresentsbox.local.host_root -
BOX__LOCAL__SKILLS_ROOTrepresentsbox.local.skills_root
On startup, LangBot reads all environment variables, applies the corresponding configuration to config.yaml, and writes it to data/config.yaml.
Note
Set Box-related configuration on the langbot service with the unified BOX__* environment variables. LangBot applies them to data/config.yaml on startup and sends the Box configuration to langbot_box through INIT RPC. Do not set LANGBOT_BOX_* or BOX__* on the langbot_box service; they are not read directly there.
Automatically synchronized from langbot-app/langbot-wiki.
简体中文
指南
开发者
- 插件开发
- 插件 SDK API
- 核心开发
API 参考
- Service API
English
Guides
Developers
-
Plugin Development
- Plugin Development Tutorial
- Completing Plugin Configuration Information
- Plugin Directory Structure
- Component Development
- Code Style Guide
- Migration Guide
- Publish Plugin
- Plugin SDK API
- Core Development
API Reference
- Service API