This document provides a comprehensive reference for all system limits, rate limits, package sizes, and configurable parameters in General Bots. Each limit includes the config.csv key, default value, and the source code location where it’s enforced.
Category Limit Default Config Key
Package Size Total package 100 MB package-max-size
Package Size Single file 10 MB user-file-limit
Package Size File count 1,000 user-file-count
Package Size Script size 1 MB script-max-size
Session Message history 50 session-message-history
Session Variable storage 1 MB session-variable-limit
Session Concurrent sessions 1,000 session-max-concurrent
Session Rate limit 60/min session-rate-limit
Session Timeout 30 min session-timeout
Knowledge Base Collections 50 kb-max-collections
Knowledge Base Document size 50 MB kb-doc-max-size
File Upload Per file 10 MB upload-max-size
File Upload Attachment 25 MB attachment-max-size
API Rate limit 100/min api-rate-limit
Loop Safety Max iterations 100,000 loop-max-iterations
GOTO Safety Max iterations 1,000,000 goto-max-iterations
Controls the size and composition of .gbai packages.
Property Value
Config Key package-max-size
Default 104,857,600 (100 MB)
Unit Bytes
Source botserver/src/core/package_manager/mod.rs
name,value
package-max-size,209715200
Property Value
Config Key user-file-limit
Default 10,485,760 (10 MB)
Unit Bytes
Source botserver/src/core/package_manager/mod.rs
Property Value
Config Key user-file-count
Default 1,000
Unit Files
Source botserver/src/core/package_manager/mod.rs
Property Value
Config Key script-max-size
Default 1,048,576 (1 MB)
Unit Bytes
Source botserver/src/basic/compiler/mod.rs
Controls resource usage per user session.
Property Value
Config Key session-message-history
Default 50
Unit Messages
Source botserver/src/core/session/mod.rs
Notes Messages kept in LLM context window
Property Value
Config Key session-variable-limit
Default 1,048,576 (1 MB)
Unit Bytes
Source botserver/src/core/session/mod.rs
Notes Total size of all session variables
Property Value
Config Key session-max-concurrent
Default 1,000
Unit Sessions
Source botserver/src/core/session/mod.rs
Notes Per server instance
Property Value
Config Key session-rate-limit
Default 60
Unit Messages per minute
Source botserver/src/core/session/mod.rs
Property Value
Config Key session-timeout
Default 1,800 (30 minutes)
Unit Seconds
Source botserver/src/core/session/mod.rs
Controls document ingestion and vector storage.
Property Value
Config Key kb-max-collections
Default 50
Unit Collections
Source botserver/src/basic/keywords/kb.rs
File Type Max Size Config Key
PDF 50 MB kb-pdf-max-size
Word (.docx) 25 MB kb-word-max-size
Excel (.xlsx) 25 MB kb-excel-max-size
Text/Markdown 10 MB kb-text-max-size
Images 10 MB kb-image-max-size
Config Key Default Description
rag-top-k10 Number of chunks to retrieve
rag-chunk-size512 Tokens per chunk
rag-chunk-overlap50 Overlap between chunks
rag-hybrid-enabledtrue Enable hybrid search
rag-rerank-enabledfalse Enable reranking
Controls file upload operations.
Property Value
Config Key upload-max-size
Default 10,485,760 (10 MB)
Unit Bytes
Source botserver/src/api/upload.rs
Property Value
Config Key attachment-max-size
Default 26,214,400 (25 MB)
Unit Bytes
Source botserver/src/basic/keywords/send_mail.rs
Limit Default Config Key
Archive size 100 MB extract-archive-max-size
Extracted size 500 MB extract-output-max-size
Files in archive 10,000 extract-max-files
Path depth 10 extract-max-depth
Controls API request rates.
Property Value
Config Key api-rate-limit
Default 100
Unit Requests per minute
Source botserver/src/api/middleware/rate_limit.rs
Endpoint Category Limit Config Key
Standard endpoints 100/min api-rate-limit
Compliance scans 5/hour api-scan-rate-limit
Report generation 10/hour api-report-rate-limit
LLM inference 20/min llm-rate-limit
Embedding 100/min embedding-rate-limit
All API responses include rate limit headers:
Header Description
X-RateLimit-LimitMaximum requests allowed
X-RateLimit-RemainingRequests remaining in window
X-RateLimit-ResetUnix timestamp when limit resets
Prevents infinite loops in BASIC scripts.
Property Value
Config Key loop-max-iterations
Default 100,000
Unit Iterations
Source botserver/src/basic/keywords/procedures.rs
Property Value
Config Key goto-max-iterations
Default 1,000,000
Unit Iterations
Source botserver/src/basic/compiler/goto_transform.rs
Controls code execution sandbox resources.
Property Value
Config Key sandbox-memory-mb
Default 256
Unit Megabytes
Source botserver/src/basic/keywords/code_sandbox.rs
Property Value
Config Key sandbox-cpu-percent
Default 50
Unit Percent
Source botserver/src/basic/keywords/code_sandbox.rs
Property Value
Config Key sandbox-timeout
Default 30
Unit Seconds
Source botserver/src/basic/keywords/code_sandbox.rs
Limit Default Config Key
Messages per second 10 whatsapp-rate-limit
Broadcast recipients 1,000 whatsapp-broadcast-max
Template message size 1,024 whatsapp-template-max-size
Limit Default Config Key
Recipients per email 50 email-max-recipients
Emails per hour 100 email-rate-limit
Attachment size 25 MB email-attachment-max-size
Property Value
Config Key delegate-message-max-size
Default 1,048,576 (1 MB)
Unit Bytes
Source botserver/src/basic/keywords/delegate_to_bot.rs
Property Value
Config Key delegate-timeout
Default 300
Unit Seconds
Source botserver/src/basic/keywords/delegate_to_bot.rs
Property Value
Config Key user-storage-quota
Default 104,857,600 (100 MB)
Unit Bytes
Source botserver/src/basic/keywords/drive.rs
Property Value
Config Key download-link-expiry
Default 86,400 (24 hours)
Unit Seconds
Source botserver/src/basic/keywords/download.rs
Config Key Default Description
llm-max-tokens4,096 Max output tokens
llm-context-window8,192 Context window size
llm-temperature0.7 Default temperature
Property Value
Config Key llm-tpm-limit
Default 20,000
Unit Tokens per minute
Source botcoder/src/main.rs
Env Var LLM_TPM
Property Value
Config Key a2a-max-hops
Default 5
Unit Hops
Source botserver/src/basic/keywords/a2a_protocol.rs
Notes Prevents infinite delegation chains
Config Key Default Description
player-max-file-size-mb100 Max video file size
player-default-volume80 Default volume (0-100)
player-preloadmetadata Preload strategy
Add entries to your bot’s config.csv file:
name,value
package-max-size,209715200
session-rate-limit,120
api-rate-limit,200
llm-max-tokens,8192
Some limits can be set via environment variables (overrides config.csv):
Environment Variable Config Key
LLM_TPMllm-tpm-limit
SESSION_TIMEOUTsession-timeout
API_RATE_LIMITapi-rate-limit
Update limits programmatically:
SET CONFIG "session-rate-limit" TO "120"
SET CONFIG "api-rate-limit" TO "200"
config = GET CONFIG "api-rate-limit"
TALK "Current API rate limit: " + config
When limits are exceeded, the system returns:
HTTP Status Error Code Description
429 RATE_LIMITEDToo many requests
413 PAYLOAD_TOO_LARGEFile/request too large
507 INSUFFICIENT_STORAGEStorage quota exceeded
Start Conservative : Begin with default limits and increase as needed
Monitor Usage : Track rate limit headers to understand usage patterns
Plan for Scale : Increase limits gradually as traffic grows
Document Changes : Track limit changes in your bot’s changelog
Test Limits : Verify your application handles limit errors gracefully