System Limits 🟑 BETA

Limits the platform enforces, and where each one is defined. Every value on this page is read from the source file named beside it β€” a limit that is not in the code is not on this page.

Verified 2026-09-13. The authority is botlib/src/limits/types.rs, which defines SystemLimits and its defaults. If a number here disagrees with that file, the file is right.

Correction. An earlier revision of this page listed per-operation configuration keys β€” session-timeout, llm-max-tokens, kb-pdf-max-size, upload-max-size, rag-chunk-size and around forty others. None of those keys exist in the code. They have been removed rather than softened. The limits themselves are real, but they are compile-time defaults in SystemLimits, not per-bot settings, and most are not configurable.

Where limits come from

LayerDefined inConfigurable
Platform limits (SystemLimits)botlib/src/limits/types.rsNo β€” compile-time constants
HTTP request ratebotserver/crates/botsecurity-auth/src/rate_limiter.rsNo β€” three fixed profiles
Code sandboxbotserver/crates/botbasic_ai/src/keywords/code_sandbox.rsYes β€” per-bot bot config
Knowledge-base indexingbotserver/crates/botqdrant/src/drive_vectordb.rsNo β€” fixed cap

Platform limits

Defaults from SystemLimits (botlib/src/limits/types.rs).

Execution

LimitDefaultConstant
Loop iterations100,000MAX_LOOP_ITERATIONS
Recursion depth100MAX_RECURSION_DEPTH
Script execution time300 sMAX_SCRIPT_EXECUTION_SECONDS
Pending tasks1,000MAX_PENDING_TASKS
Tools per bot500MAX_TOOLS_PER_BOT

MAX_LOOP_ITERATIONS and MAX_RECURSION_DEPTH exist to stop a runaway script from consuming the process. A script that hits either is terminated, not queued.

Data and memory

LimitDefaultConstant
String length10 MiBMAX_STRING_LENGTH
Array length1,000,000 elementsMAX_ARRAY_LENGTH
Database query results10,000 rowsMAX_DB_QUERY_RESULTS
Database connections per tenant20MAX_DB_CONNECTIONS_PER_TENANT

Files and storage

LimitDefaultConstant
Single file100 MiBMAX_FILE_SIZE_BYTES
Upload50 MiBMAX_UPLOAD_SIZE_BYTES
Request body10 MiBMAX_REQUEST_BODY_BYTES
Drive storage per tenant10 GiBMAX_DRIVE_STORAGE_BYTES

Knowledge base

LimitDefaultConstant
Documents per bot100,000MAX_KB_DOCUMENTS_PER_BOT
Document size50 MiBMAX_KB_DOCUMENT_SIZE_BYTES

Separately, the indexer skips any file larger than 10 MiB regardless of type: drive_vectordb.rs::should_index returns false above that size. The type is matched against an allow-list at the same point, so an unsupported type is skipped rather than truncated.

LLM

LimitDefaultConstant
Tokens per request128,000MAX_LLM_TOKENS_PER_REQUEST
Requests per minute60MAX_LLM_REQUESTS_PER_MINUTE

Concurrency and sessions

LimitDefaultConstant
Concurrent requests per user100MAX_CONCURRENT_REQUESTS_PER_USER
Concurrent requests (global)10,000MAX_CONCURRENT_REQUESTS_GLOBAL
WebSocket connections per user10MAX_WEBSOCKET_CONNECTIONS_PER_USER
WebSocket connections (global)50,000MAX_WEBSOCKET_CONNECTIONS_GLOBAL
Sessions per user10MAX_SESSIONS_PER_USER
Session idle timeout3,600 sMAX_SESSION_IDLE_SECONDS
Bots per tenant100MAX_BOTS_PER_TENANT

API throughput

LimitDefaultConstant
API calls per minute1,000MAX_API_CALLS_PER_MINUTE
API calls per hour10,000MAX_API_CALLS_PER_HOUR

HTTP rate limiting

Three fixed profiles in botsecurity-auth/src/rate_limiter.rs, expressed as requests per second with a burst allowance. CombinedRateLimiter applies these alongside the per-bot limits.

ProfileRequests / secondBurstUsed by
api()100150The API surface, applied at server start
strict()50100Authentication-sensitive routes
relaxed()5001,000High-volume read paths

The window for the platform counters is 60 s with a burst multiplier of 1.5 (RATE_LIMIT_WINDOW_SECONDS, RATE_LIMIT_BURST_MULTIPLIER).

Code sandbox

The only limits on this page that are configurable per bot. They are read from the bot’s configuration, not from config.csv:

KeyDefaultMeaning
sandbox-enabledtrueWhether sandbox execution is permitted
sandbox-runtimeβ€”Runtime selector
sandbox-timeout30 sWall-clock limit for one execution
sandbox-memory-mb (alias sandbox-memory-limit)256 MiBMemory ceiling
sandbox-cpu-percent (alias sandbox-cpu-limit)50%CPU ceiling
sandbox-network (alias sandbox-network-enabled)β€”Whether the sandbox may reach the network
sandbox-python-packagesβ€”Comma-separated packages made available

Source: botserver/crates/botbasic_ai/src/keywords/code_sandbox.rs.

An earlier revision cited this file as botserver/src/basic/keywords/code_sandbox.rs. That path no longer exists β€” the module moved into the botbasic_ai crate. All of the sandbox-* keys above are real; the path was not.

Storage quota

Drive usage against the tenant quota is reported by GET /api/files/quota. The quota ceiling itself is MAX_DRIVE_STORAGE_BYTES β€” it is not set per user or per bot.

What is not configurable

There is no supported way to raise or lower the SystemLimits values at runtime: they are constants compiled into botlib. Changing one requires a code change and a rebuild. If a workload needs a different ceiling, that is a change to botlib/src/limits/types.rs, not a setting.

See Also