Quickstart

# config.yaml
constraints:
  max_concurrent_browsers: 4    # Limit concurrent browsers
  max_memory: "4GB"            # Limit memory usage
  allow_parallelism:
    task: true                 # Enable parallel tasks
    data: true                 # Enable parallel data processing

# Start the BLAST server with your config
blastai serve --config config.yaml

Resources

Memory Usage

constraints:
  max_memory: "4GB"  # Accepts B, KB, MB, GB, TB units

Browser Instances

constraints:
  max_concurrent_browsers: 4  # Maximum concurrent browsers
  share_browser_process: true  # Share browser process between contexts

Cost Limits

constraints:
  max_cost_per_minute: 0.10  # $0.10 per minute
  max_cost_per_hour: 5.00    # $5.00 per hour

Parallelism

BLAST supports different types of parallelism:

constraints:
  allow_parallelism:
    task: true        # Enable parallel subtasks
    data: true        # Enable parallel web browser content extraction
    first_of_n: false # Disable first-result parallelism
  max_parallelism_nesting_depth: 1  # Maximum depth of nested parallel tasks

LLM

constraints:
  llm_model: "gpt-4.1"         # Primary model
  llm_model_mini: "gpt-4.1-mini"  # Model for parallel processing
  allow_vision: true           # Enable vision capabilities

Browser

constraints:
  require_headless: true        # Force headless mode
  share_browser_process: true   # Share browser process

Programmatic Configuration

While YAML configuration is recommended, you can also set constraints programmatically using the Engine API (see Engine API for details):

from blastai import Engine, Constraints

engine = await Engine.create(
    constraints=Constraints(
        max_memory="4GB",
        max_concurrent_browsers=4,
        allow_parallelism={"task": True, "data": True}
    )
)

Next Steps