Configuration Overview
The actual config.toml structure, defaults, and override mechanisms
BioFlow AI reads config.toml from your deployment directory. For a new deployment, run the interactive wizard to generate a complete configuration:
uv run bioflow-ai auto-initWithout config.toml, the API, workers, and management commands that depend on global settings will not start. See Automatic Initialization for every stage and prompt.
Automatic Initialization
Review every prompt, default, and initialization stage
Infrastructure Services
PostgreSQL, Redis, RabbitMQ, RustFS, and Milvus
PDF Parser
Configure local PDF parsing or an Open MinerU service
Knowledge Base
Configure Milvus and the embedding model API
Configuration source priority
From highest to lowest priority: environment variables, .env, config.toml, file secrets, and code defaults. Nested environment variables use a double underscore:
NETWORK__PORT=8100
PERSISTENT__DATABASE__DB_URL='postgresql+psycopg://user:pass@host:5432/db'TOML field names are lowercase. Unknown fields are ignored, so remove retired settings when upgrading.
Security [security]
[security]
secret_key = "generated-random-value"
session_idle_timeout_hours = 24
session_absolute_timeout_days = 7
login_max_failures = 10
login_failure_window_minutes = 15
user_cache_ttl_seconds = 300
cookie_secure = false
cookie_samesite = "lax"| Key | Default | Description |
|---|---|---|
secret_key | Randomly generated | Key used to protect stored application secrets; do not rotate it casually after deployment. |
session_idle_timeout_hours | 24 | Redis session idle timeout, extended by valid requests. |
session_absolute_timeout_days | 7 | Maximum session lifetime, regardless of activity. |
login_max_failures | 10 | Failed logins allowed per normalized email in one window. |
login_failure_window_minutes | 15 | Failed-login rate-limit window. |
user_cache_ttl_seconds | 300 | User permission cache lifetime in seconds. |
cookie_secure | false | Set to true for HTTPS deployments. |
cookie_domain | Unset | Optional cookie domain. |
cookie_samesite | lax | One of lax, strict, or none. |
auto-init generates and persists a random secret_key automatically. In production, always serve over HTTPS with cookie_secure = true (SameSite=None also requires secure cookies) and keep production configs and secrets out of version control. See Authentication and Roles.
Network [network]
[network]
host = "0.0.0.0"
port = 8000
cors_origins = ["http://localhost:3000"]
use_proxy = false
proxy_type = "http"
proxy_host = "localhost"
proxy_port = 7890| Key | Description |
|---|---|
host | API listen address. The default binds all interfaces so the containerised Web UI can reach the host API. |
port | API port; the wizard changes it automatically when occupied. |
cors_origins | Browser origins allowed to call the API. |
use_proxy | Enables the proxy for test-data downloads and supported external requests. |
proxy_type | http or socks5. |
proxy_host / proxy_port | Proxy host and port. |
When generating Compose, the wizard synchronises the Web UI BACKEND_API_URL with the actual API port.
Local storage [persistent.storage]
[persistent.storage]
storage_path = "./storage"
genome_path = "./storage/genome"
bio_db_path = "./storage/bio_dbs"
test_data_path = "./testdata"| Key | Description |
|---|---|
storage_path | Local root for uploaded files and analysis data. |
genome_path | Reference genome directory. |
bio_db_path | Bioinformatics database directory. |
test_data_path | Destination for test data downloaded by automatic initialisation. |
Relative paths are resolved from the deployment directory where the command is run. See Infrastructure Services for S3/RustFS settings.
Task resources [persistent.resource]
[persistent.resource]
max_thread = 8
max_mem = "4G"max_thread and max_mem are default workflow-tool limits, not hard limits on the API or worker processes themselves.
Container runtime [docker]
[docker]
container = "docker"
username = ""
password = ""
enable_gpu = false
gpu_devices = "all"| Key | Description |
|---|---|
container | docker or podman. The wizard uses it to select the Compose template and tool-container backend. |
username / password | docker.io pull credentials; usually blank for public images. |
enable_gpu | Pass GPUs to tool containers. |
gpu_devices | all or comma-separated device IDs such as 0,1. |
Podman also needs the optional Python dependency and Podman socket. See Using Podman.
Logging [logger]
[logger]
level = "INFO"
fastapi_level = "INFO"
celery_level = "INFO"
boto3_level = "INFO"
error_level = "ERROR"
log_retention = "1 week"
log_rotation = "10 MB"Log levels accept DEBUG, INFO, WARNING, or ERROR. log_retention and log_rotation control log-file retention and rotation.
Other sections
| Section | Purpose |
|---|---|
[persistent.database] | PostgreSQL connection URL |
[persistent.cache] | LLM, monitor, API, and notification Redis caches |
[persistent.storage.s3] | RustFS or another S3-compatible object store |
[celery] | RabbitMQ broker and Redis result backend |
[knowledge_base] | Milvus and embedding model API |
[pdf_parser] | PDF parser engine and timeout |
[develop] | LangGraph checkpoint Redis URL |
The wizard synchronises these URLs when a default infrastructure port is occupied. When changing infrastructure ports manually, update the Compose host port at the same time.
Built-in coding assistant [code_editing]
[code_editing]
session_ttl_seconds = 1800
turn_timeout_seconds = 900
worker_stale_seconds = 60These control temporary session expiry, per-turn execution and queue timeout, and executing worker heartbeat timeout. The model comes from the Coding role in LLM management. See Built-in coding assistant.