Skip to main content

Core Components

Engine

The Engine is the central component that:
  • Manages task execution
  • Coordinates resources
  • Handles caching
  • Controls parallelism

Scheduler

The Scheduler manages task execution:
  • Tracks task states
  • Handles task dependencies
  • Manages execution order
  • Coordinates parallel tasks
Task priorities:
  1. Tasks with cached results
  2. Tasks with cached plans
  3. Subtasks of running tasks
  4. Tasks with paused executors
  5. Remaining tasks (FIFO)
Tasks can be in different states:
  • Scheduled: Task is queued for execution
  • Running: Task is currently executing
  • Completed: Task has finished execution

Resource Manager

Handles system resources:
  • Browser instances
  • Memory usage
  • Cost tracking
  • Resource cleanup

Cache Manager

Manages two types of caches both in memory and on disk:
  • Results cache (task outputs)
  • Plans cache (execution plans generated by LLM)

Planner

Generates natural language execution plans given user-provided task description.

Data Flow

  1. Task Creation
  2. Cache Check
    • Check results cache
    • Check plans cache
    • Return cached result if available
  3. Resource Allocation
    • Wait for prerequisites
    • Allocate browser if needed
    • Assign executor
  4. Execution
    • Run task via executor
    • Stream progress updates
    • Cache results
  5. Cleanup
    • Release resources
    • Update cache
    • Handle errors

Code Structure

Configuration

Settings and constraints control behavior:
Environment variables for API keys:

Error Handling

BLAST handles various error types:
  • Browser errors
  • Resource limits
  • Task failures
  • Cache issues
Error recovery:
  1. Log error details
  2. Clean up resources
  3. Retry if possible
  4. Report to user

Extending BLAST

You can extend BLAST by:
  1. Adding tools for further optimization
  2. Creating custom executors
  3. Tune better scheduling policy

Next Steps