Bioflow AI

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-init

Without config.toml, the API, workers, and management commands that depend on global settings will not start. See Automatic Initialization for every stage and prompt.

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"
KeyDefaultDescription
secret_keyRandomly generatedKey used to protect stored application secrets; do not rotate it casually after deployment.
session_idle_timeout_hours24Redis session idle timeout, extended by valid requests.
session_absolute_timeout_days7Maximum session lifetime, regardless of activity.
login_max_failures10Failed logins allowed per normalized email in one window.
login_failure_window_minutes15Failed-login rate-limit window.
user_cache_ttl_seconds300User permission cache lifetime in seconds.
cookie_securefalseSet to true for HTTPS deployments.
cookie_domainUnsetOptional cookie domain.
cookie_samesitelaxOne 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
KeyDescription
hostAPI listen address. The default binds all interfaces so the containerised Web UI can reach the host API.
portAPI port; the wizard changes it automatically when occupied.
cors_originsBrowser origins allowed to call the API.
use_proxyEnables the proxy for test-data downloads and supported external requests.
proxy_typehttp or socks5.
proxy_host / proxy_portProxy 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"
KeyDescription
storage_pathLocal root for uploaded files and analysis data.
genome_pathReference genome directory.
bio_db_pathBioinformatics database directory.
test_data_pathDestination 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"
KeyDescription
containerdocker or podman. The wizard uses it to select the Compose template and tool-container backend.
username / passworddocker.io pull credentials; usually blank for public images.
enable_gpuPass GPUs to tool containers.
gpu_devicesall 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

SectionPurpose
[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 = 60

These 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.

On this page