Automatic Initialization
Configure BioFlow AI, start services, and initialize data with the interactive wizard
From your deployment directory, run:
uv run bioflow-ai auto-initauto-init is the recommended entry point for new deployments. Whether you installed BioFlow AI with uv add bioflow-ai or run from a source checkout, it sets up config.toml, copies bundled deployment resources, starts infrastructure containers, prepares database tables, configures models, and imports preset data.
The wizard does not keep the Python backend running. After initialization finishes, start uv run bioflow-ai api, uv run bioflow-ai execution-worker --concurrency 4, and uv run bioflow-ai agent-worker in separate terminals from the same deployment directory.
Workflow
The wizard runs through the following stages in order:
| Stage | What it does | Notes |
|---|---|---|
| Configuration & Port Preflight | Creates config.toml in the deployment directory and shifts occupied default ports | Existing config.toml can be kept |
| Deployment Presets | Copies editable Skills to presets/skills/ and SQL init scripts to presets/sql/ | Fills missing files and preserves existing copies |
| Project Containers | Generates docker-compose.yml from the bundled template, prepares volumes, starts services, and waits for readiness | Optional |
| Database Preparation | Creates any missing database tables | Stops the wizard if containers or table creation fail |
| Model Configuration | Configures the embedding model and chat/agent models together, then assigns system roles | Existing complete settings can be kept |
| Data Initialization | Runs System Preset Data (admin account, preset catalog, vector indexes) and optional Test Data download | Both steps can be skipped |
Skipping an optional step does not abort the wizard. If an attempted step fails, the summary screen indicates that initialization is incomplete—fix the reported issue and rerun auto-init.
Configuration prompts
Prompts are displayed in English and match the tables below. Press Enter to accept any shown default.
Existing config.toml
When config.toml already exists in the deployment directory, the wizard asks config.toml already exists. Overwrite it?:
| Answer | Result |
|---|---|
No (default) | Keeps the existing file, skips configuration prompts and Port Preflight, and continues with the remaining stages |
Yes | Collects all configuration prompts again and overwrites the file |
Overwriting replaces the entire config.toml. Back up any custom passwords, external service URLs, or security settings before choosing Yes.
Network Configuration
| TUI prompt | Accepted value and default | What it sets |
|---|---|---|
Use a network proxy? | Yes or No; default No | Enables the system proxy for outbound requests and downloads |
Proxy type | http or socks5; default http | Proxy protocol |
Proxy host | Hostname or IP without a URL scheme; default localhost | Proxy server host |
Proxy port | Positive integer; default 7890 | Proxy server port |
The last three prompts appear only when you answer Yes to Use a network proxy?.
Storage Paths
Paths can be absolute or relative to the deployment directory. Choose a volume with enough free space for input datasets and workflow outputs.
| TUI prompt | Default | What it stores |
|---|---|---|
Runtime data path (storage_path) | ./storage | General runtime data and analysis outputs |
Biological database path (bio_db_path) | ./storage/bio_dbs | Downloaded biological databases |
Reference genome path (genome_path) | ./storage/genome | Reference genomes |
Test data path (test_data_path) | ./testdata | Optional example dataset |
Resource Limits
Default compute limits for analysis tasks (not reserved upfront during initialization):
| TUI prompt | Accepted value and default | What it sets |
|---|---|---|
Maximum threads (max_thread) | Positive integer; default 8 | Default CPU thread limit per analysis task |
Maximum memory (max_mem, e.g. 4G) | Memory string such as 4G, 16G, or 512M; default 4G | Default memory limit per analysis task |
Container Runtime
| TUI prompt | Accepted value and default | What it sets |
|---|---|---|
Container runtime | docker or podman; default docker | Runtime for infrastructure and bioinformatics tool containers |
docker.io username (optional) | Username or blank | Registry username for image pulls |
docker.io password (optional) | Password, access token, or blank | Registry credential saved to config.toml |
Select a runtime whose Compose integration is installed. When using Podman, include --extra podman during installation (uv add --extra podman bioflow-ai, or uv sync --extra podman from source).
PDF Parser
| TUI prompt | Accepted value and default | What it sets |
|---|---|---|
PDF parser engine | local, open_mineru, mineru, doc2x, or grobid; default local | Parser used when ingesting PDFs into the knowledge base |
Batch size (batch_size) | Positive integer; default 5 | PDF parsing batch size |
Engine-specific prompts:
| Engine | TUI prompt | Accepted value and default |
|---|---|---|
open_mineru | Open MinerU API URL | Service root; default http://localhost:8000 |
open_mineru | Request timeout (seconds) | Positive integer; default 600 |
mineru | MinerU API URL | Service root; default https://api.mineru.app |
mineru | MinerU API Key | MinerU credential |
mineru | Request timeout (seconds) | Positive integer; default 600 |
The runtime currently implements local and open_mineru. The default local engine uses firecrawl-anydoc with no external service or API key and works well for text-based PDFs; scanned PDFs require an OCR-capable engine such as open_mineru. Other listed engines remain accepted in configuration for compatibility. See PDF Parser for details.
Port Preflight
After collecting configuration, the wizard checks the host ports below. Any occupied port is shifted to the next available port and synchronized across config.toml and docker-compose.yml:
| Service | Default port |
|---|---|
| FastAPI | 8000 |
| PostgreSQL | 5432 |
| Redis | 6379 |
| RabbitMQ | 5672 |
| RustFS | 9000 |
| Milvus | 19530 |
| Web UI | 3000 |
Project Containers and Database Preparation
After copying bundled deployment resources (presets/skills/ and presets/sql/), the wizard asks Start project containers with docker? (or podman), defaulting to Yes.
When accepted, the wizard:
- Verifies the selected container runtime and its Compose command.
- Generates
docker-compose.ymlin the deployment directory from the bundled Docker or Podman template, syncing shifted ports and the Web UIBACKEND_API_URL. - Initializes volume permissions and starts services:
- Docker: Runs
docker compose -f docker-compose.yml up -d, which executesrustfs-volume-initandmilvus-volume-initbefore starting RustFS and Milvus. - Podman: Runs
milvus-volume-initandrustfs-volume-initexplicitly with--profile volume-init run --rm -T --no-deps, then runsup -dfor the long-running services.
- Docker: Runs
- Waits until PostgreSQL, RustFS, and Milvus pass health checks.
- Runs
Database Preparationto create any missing tables.
If container startup or database preparation fails, the wizard stops with an error notice so you can fix the issue and rerun auto-init.
Model Configuration
Once the database tables are ready, the wizard configures all models in one place.
Embedding Model
Used to build and search Milvus knowledge-base vectors, independent of the chat and agent models below:
| TUI prompt | Accepted value and default | What it sets |
|---|---|---|
Embedding model name | Model ID offered by the endpoint; default Qwen/Qwen3-Embedding-4B | Embedding model name |
Embedding API base URL | OpenAI-compatible API root; default https://api.siliconflow.cn/v1/ | Embedding service endpoint |
Embedding API key | API key for the endpoint | Credential for embedding requests (leave blank when updating to keep the current key) |
If an embedding API key is already saved in config.toml, the wizard asks Update the saved embedding model (<model>)? (default No) so you can keep it with a single Enter.
Chat Models
When reusing an existing config.toml where all system model roles already point to active models, the wizard displays the current assignments and asks Update the saved chat models and role assignments? (default No).
To configure or update providers, select at least one option at Select AI providers to enable (Space to select, Enter to confirm):
| Choice | Built-in model presets | Required fields |
|---|---|---|
DeepSeek | deepseek-flash, deepseek-v4-pro | API key, proxy preference, enabled models, and display names |
OpenAI | gpt-6-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6-luna | API key, proxy preference, enabled models, and display names |
Custom (OpenAI-compatible) | User-defined | Provider name, full base URL (http:// or https://), optional API key, proxy preference, and one or more model API names |
Next, assign a configured model to each of the 7 system roles using Select a role to change, then choose Done to save:
Long-context modelAgent modelCoding modelSimple-task modelHigh-performance modelChat modelVision model
Pricing for recognized models is filled automatically. Unrecognized models default to 0 and can be updated later in the Web UI model settings.
Data Initialization
The final stage populates system presets and optionally downloads the example dataset.
System Preset Data
Confirm Initialize system preset data and vector indexes? (default Yes) to:
- Create the initial administrator: When the user table is empty, the wizard prompts for an administrator email, username (default
admin), and password (required, up to 128 UTF-8 bytes). If a user already exists, this prompt is skipped. - Import system presets: Imports built-in container images, tool documentation, tool definitions, and tool memories. Missing preset files are downloaded automatically from the
Aye10032/bioflow-ai-prebuildHugging Face bucket. - Build vector indexes: Rebuilds the Milvus indexes for images, tools, and auxiliary nodes.
Test Data
The wizard displays Test data path and Download proxy, then asks:
- When the directory is empty:
Download the test dataset?(defaultYes) - When files already exist:
The test data directory is not empty. Synchronize or update it?(defaultNo)
Answering Yes runs uvx hf sync against hf://buckets/Aye10032/bioflow-ai-testdata. This dataset is optional and meant for trying out the platform after deployment.
Rerunning the wizard
You can rerun uv run bioflow-ai auto-init anytime from the deployment directory to fill in missing files, start containers, update models, or sync test data. Keep in mind:
- Answering
Notoconfig.toml already exists. Overwrite it?skips Port Preflight. - Deployment preset copying (
presets/skills/andpresets/sql/) only adds missing files and preserves any local edits. - Rerunning
System Preset Datarebuilds the preset records and vector indexes. - When updating
Chat Models, any provider left unselected in the current run is deactivated.
If you only need to maintain database records or rebuild vector indexes, use the bioflow-ai init subcommands directly.