Configuration Reference
KaaS is configured via a TOML file (default: kaas.toml in the working directory). Each section controls a specific subsystem.
[server]
| Key | Type | Default | Description |
|---|---|---|---|
host | string | "0.0.0.0" | Listen address |
port | int | 8080 | Listen port |
[storage]
| Key | Type | Default | Description |
|---|---|---|---|
driver | string | "sqlite" | Storage driver: "sqlite" or "mysql" |
sqlite_path | string | "./data/kaas.db" | SQLite database file path |
kb_dir | string | "./data" | Knowledge base data directory |
[worker]
| Key | Type | Default | Description |
|---|---|---|---|
extract_workers | int | 4 | Number of parallel extract workers |
pipeline_concurrency | int | 2 | Concurrent pipeline tasks |
poll_interval_ms | int | 1000 | Queue poll interval (milliseconds) |
lease_timeout_sec | int | 300 | Worker lease timeout (seconds) |
cb_failure_threshold | int | 5 | Circuit breaker failure threshold |
cb_cooldown_sec | int | 30 | Circuit breaker cooldown (seconds) |
[ai]
| Key | Type | Default | Description |
|---|---|---|---|
mcp_url | string | "" | Remote MCP upstream URL (deprecated — use [ai.mcp] instead) |
[ai.daemon]
| Key | Type | Default | Description |
|---|---|---|---|
command | string | "uv" | Daemon process command |
args | []string | ["run", "--directory", "py", "kb-ai", "daemon"] | Daemon command arguments |
concurrency | int | 8 | Daemon max concurrent workers |
warmup_timeout_sec | int | 30 | Startup timeout (seconds) |
max_restarts | int | 5 | Max restart attempts before giving up |
[ai.mcp]
| Key | Type | Default | Description |
|---|---|---|---|
enabled | bool | false | Enable native MCP streamable-http endpoint (/mcp) |
token | string | "" | Bearer token for authentication (empty = no auth) |
timeout_sec | int | 120 | Tool call timeout (seconds) |
[llm]
| Key | Type | Default | Description |
|---|---|---|---|
api_key | string | "" | OpenAI-compatible API key |
base_url | string | "https://api.openai.com/v1" | API endpoint URL |
model | string | "gpt-4o-mini" | Model name |
summarize_model | string | (same as model) | Model for summarization tasks |
[log]
| Key | Type | Default | Description |
|---|---|---|---|
level | string | "info" | Log level: debug / info / warn / error |
format | string | "json" | Log format: json / text |
[upload]
| Key | Type | Default | Description |
|---|---|---|---|
max_body_bytes | int | 31457280 | Max multipart body size (30 MiB) |
max_file_size | int | 1048576 | Max per-file size (1 MiB) |
max_zip_file_size | int | 5242880 | Max zip archive size (5 MiB) |
max_files_per_upload | int | 20 | Max files per request |
max_zip_entries | int | 200 | Max entries extracted from a zip |
max_zip_extracted_size | int | 31457280 | Max total extracted size (30 MiB) |