Skip to content

Configuration Reference ​

KaaS is configured via a TOML file (default: kaas.toml in the working directory). Each section controls a specific subsystem.

[server] ​

KeyTypeDefaultDescription
hoststring"0.0.0.0"Listen address
portint8080Listen port

[storage] ​

KeyTypeDefaultDescription
driverstring"sqlite"Storage driver: "sqlite" or "mysql"
sqlite_pathstring"./data/kaas.db"SQLite database file path
kb_dirstring"./data"Knowledge base data directory

[worker] ​

KeyTypeDefaultDescription
extract_workersint4Number of parallel extract workers
pipeline_concurrencyint2Concurrent pipeline tasks
poll_interval_msint1000Queue poll interval (milliseconds)
lease_timeout_secint300Worker lease timeout (seconds)
cb_failure_thresholdint5Circuit breaker failure threshold
cb_cooldown_secint30Circuit breaker cooldown (seconds)

[ai] ​

KeyTypeDefaultDescription
mcp_urlstring""Remote MCP upstream URL (deprecated — use [ai.mcp] instead)

[ai.daemon] ​

KeyTypeDefaultDescription
commandstring"uv"Daemon process command
args[]string["run", "--directory", "py", "kb-ai", "daemon"]Daemon command arguments
concurrencyint8Daemon max concurrent workers
warmup_timeout_secint30Startup timeout (seconds)
max_restartsint5Max restart attempts before giving up

[ai.mcp] ​

KeyTypeDefaultDescription
enabledboolfalseEnable native MCP streamable-http endpoint (/mcp)
tokenstring""Bearer token for authentication (empty = no auth)
timeout_secint120Tool call timeout (seconds)

[llm] ​

KeyTypeDefaultDescription
api_keystring""OpenAI-compatible API key
base_urlstring"https://api.openai.com/v1"API endpoint URL
modelstring"gpt-4o-mini"Model name
summarize_modelstring(same as model)Model for summarization tasks

[log] ​

KeyTypeDefaultDescription
levelstring"info"Log level: debug / info / warn / error
formatstring"json"Log format: json / text

[upload] ​

KeyTypeDefaultDescription
max_body_bytesint31457280Max multipart body size (30 MiB)
max_file_sizeint1048576Max per-file size (1 MiB)
max_zip_file_sizeint5242880Max zip archive size (5 MiB)
max_files_per_uploadint20Max files per request
max_zip_entriesint200Max entries extracted from a zip
max_zip_extracted_sizeint31457280Max total extracted size (30 MiB)