Bioflow AI

Automatic Initialization

Configure BioFlow AI, start services, and initialize data with the interactive wizard

From your deployment directory, run:

uv run bioflow-ai auto-init

auto-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:

StageWhat it doesNotes
Configuration & Port PreflightCreates config.toml in the deployment directory and shifts occupied default portsExisting config.toml can be kept
Deployment PresetsCopies editable Skills to presets/skills/ and SQL init scripts to presets/sql/Fills missing files and preserves existing copies
Project ContainersGenerates docker-compose.yml from the bundled template, prepares volumes, starts services, and waits for readinessOptional
Database PreparationCreates any missing database tablesStops the wizard if containers or table creation fail
Model ConfigurationConfigures the embedding model and chat/agent models together, then assigns system rolesExisting complete settings can be kept
Data InitializationRuns System Preset Data (admin account, preset catalog, vector indexes) and optional Test Data downloadBoth 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?:

AnswerResult
No (default)Keeps the existing file, skips configuration prompts and Port Preflight, and continues with the remaining stages
YesCollects 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 promptAccepted value and defaultWhat it sets
Use a network proxy?Yes or No; default NoEnables the system proxy for outbound requests and downloads
Proxy typehttp or socks5; default httpProxy protocol
Proxy hostHostname or IP without a URL scheme; default localhostProxy server host
Proxy portPositive integer; default 7890Proxy 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 promptDefaultWhat it stores
Runtime data path (storage_path)./storageGeneral runtime data and analysis outputs
Biological database path (bio_db_path)./storage/bio_dbsDownloaded biological databases
Reference genome path (genome_path)./storage/genomeReference genomes
Test data path (test_data_path)./testdataOptional example dataset

Resource Limits

Default compute limits for analysis tasks (not reserved upfront during initialization):

TUI promptAccepted value and defaultWhat it sets
Maximum threads (max_thread)Positive integer; default 8Default CPU thread limit per analysis task
Maximum memory (max_mem, e.g. 4G)Memory string such as 4G, 16G, or 512M; default 4GDefault memory limit per analysis task

Container Runtime

TUI promptAccepted value and defaultWhat it sets
Container runtimedocker or podman; default dockerRuntime for infrastructure and bioinformatics tool containers
docker.io username (optional)Username or blankRegistry username for image pulls
docker.io password (optional)Password, access token, or blankRegistry 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 promptAccepted value and defaultWhat it sets
PDF parser enginelocal, open_mineru, mineru, doc2x, or grobid; default localParser used when ingesting PDFs into the knowledge base
Batch size (batch_size)Positive integer; default 5PDF parsing batch size

Engine-specific prompts:

EngineTUI promptAccepted value and default
open_mineruOpen MinerU API URLService root; default http://localhost:8000
open_mineruRequest timeout (seconds)Positive integer; default 600
mineruMinerU API URLService root; default https://api.mineru.app
mineruMinerU API KeyMinerU credential
mineruRequest 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:

ServiceDefault port
FastAPI8000
PostgreSQL5432
Redis6379
RabbitMQ5672
RustFS9000
Milvus19530
Web UI3000

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:

  1. Verifies the selected container runtime and its Compose command.
  2. Generates docker-compose.yml in the deployment directory from the bundled Docker or Podman template, syncing shifted ports and the Web UI BACKEND_API_URL.
  3. Initializes volume permissions and starts services:
    • Docker: Runs docker compose -f docker-compose.yml up -d, which executes rustfs-volume-init and milvus-volume-init before starting RustFS and Milvus.
    • Podman: Runs milvus-volume-init and rustfs-volume-init explicitly with --profile volume-init run --rm -T --no-deps, then runs up -d for the long-running services.
  4. Waits until PostgreSQL, RustFS, and Milvus pass health checks.
  5. Runs Database Preparation to 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 promptAccepted value and defaultWhat it sets
Embedding model nameModel ID offered by the endpoint; default Qwen/Qwen3-Embedding-4BEmbedding model name
Embedding API base URLOpenAI-compatible API root; default https://api.siliconflow.cn/v1/Embedding service endpoint
Embedding API keyAPI key for the endpointCredential 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):

ChoiceBuilt-in model presetsRequired fields
DeepSeekdeepseek-flash, deepseek-v4-proAPI key, proxy preference, enabled models, and display names
OpenAIgpt-6-astra, gpt-6.1-sol, gpt-6.1-terra, gpt-6-lunaAPI key, proxy preference, enabled models, and display names
Custom (OpenAI-compatible)User-definedProvider 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 model
  • Agent model
  • Coding model
  • Simple-task model
  • High-performance model
  • Chat model
  • Vision 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:

  1. 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.
  2. 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-prebuild Hugging Face bucket.
  3. 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? (default Yes)
  • When files already exist: The test data directory is not empty. Synchronize or update it? (default No)

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 No to config.toml already exists. Overwrite it? skips Port Preflight.
  • Deployment preset copying (presets/skills/ and presets/sql/) only adds missing files and preserves any local edits.
  • Rerunning System Preset Data rebuilds 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.

On this page