Skip to main content

Overview

When Blocks agents work on your code, they execute in a secure sandbox environment. Each sandbox is based on the Blocks base image, which comes pre-installed with common development tools, programming languages, and CLI utilities. This ensures agents can immediately start working without waiting for basic dependencies.

Sandbox Compute Properties

Each sandbox environment provides the following compute resources:
  • CPU: 2 vCPUs
  • Memory: 4GB RAM
  • Architecture: AMD64 (x86_64)
  • Operating System: Debian Trixie (13.3)
These specifications ensure consistent performance across all Blocks sessions while providing sufficient resources for most development tasks.
If you need a more compute for your workloads, contact us at dev@blocksorg.com.

What’s Included

The Blocks base image includes a comprehensive set of tools organized by category:

Build Tools & Compilers

Essential tools for compiling and building code:
  • build-essential - Meta-package including GCC, G++, Make, and other build tools
  • gcc - GNU C Compiler
  • g++ - GNU C++ Compiler
  • make - Build automation tool
  • pkg-config - Library compilation helper
  • libssl-dev - SSL development libraries

Programming Languages & Runtimes

Pre-installed language toolchains:
  • Node.js - JavaScript runtime with npm package manager
  • Rust - Stable toolchain via rustup (includes cargo, rustc, rustfmt)

Version Control & Collaboration

Tools for working with repositories:
  • git - Distributed version control system
  • gh - Official GitHub CLI for managing issues, PRs, and repositories
  • glab (v1.80.4) - GitLab CLI for GitLab workflows

CLI Utilities

Common command-line tools:
  • curl - Data transfer tool
  • jq - JSON processor
  • unzip - Archive extraction
  • procps - Process monitoring utilities (ps, top, etc.)
  • sudo - Privilege escalation
  • ripgrep - Fast recursive search tool (rg)
  • vim - Text editor
  • direnv - Environment variable manager

Database Tools

  • postgresql-client - PostgreSQL client tools (psql, pg_dump, etc.)

Cloud & Infrastructure

Tools for cloud services and infrastructure:
  • AWS CLI - Amazon Web Services command-line interface (via pip)
  • Pulumi ESC CLI - Pulumi Environments, Secrets, and Configuration

Networking & Remote Access

  • openssh-client - SSH client for secure remote connections

System Libraries

Required libraries for graphical and system operations:
  • ca-certificates - Common CA certificates for SSL/TLS
  • libxcb1 - X11 protocol C-language binding
  • libx11-6 - X11 client library
  • libx11-xcb1 - X11/XCB interop library

When You Need Additional Tools

While the base image includes many common tools, your project may require additional dependencies:
  • Language-specific tools - Python (pip packages), Ruby (gems), Go binaries
  • Database clients - MySQL, MongoDB, Redis clients
  • Build tools - Gradle, Maven, CMake
  • Testing frameworks - pytest, Jest, RSpec
  • Custom binaries - Project-specific CLI tools
  • Cloud provider tools - Google Cloud SDK, Azure CLI, Terraform

Using Post-Clone Scripts

To add custom binaries or install additional tools, use post-clone scripts. These scripts run automatically after Blocks clones your repository and before the agent starts working. Learn more about Post-Clone Scripts.

Creating a Post-Clone Script

  1. Create a .blocks directory in your repository root:
  2. Create a script file named post-clone or post-clone.sh:
  3. Add your installation commands:

Best Practices

Always start your script with set -e to exit immediately if any command fails:
This prevents the agent from starting work with incomplete dependencies.
Design scripts to run safely multiple times:
Use lock files to speed up installation:
Add echo statements to help debug issues:
Only install what you need:

Common Use Cases

Installing Language Runtimes

Installing Build Tools

Setting Up Environment Variables

Troubleshooting

Ensure you’re using set -e at the start of your script. Without it, errors are ignored and the agent continues with incomplete setup.
Make sure binaries are installed in a directory on the PATH (/usr/local/bin, /usr/bin) or export PATH in your script:
Ensure scripts and binaries have execute permissions:
Optimize installation steps:
  • Use apt-get install -y to skip prompts
  • Use npm ci instead of npm install
  • Cache downloads when possible
  • Only install required dependencies

Limitations

Ephemeral Environment: Each Blocks session runs in a fresh sandbox. Changes made during agent execution (installed packages, generated files) are not persisted between sessions. Always use post-clone scripts for reproducible setup.
Root Access: Post-clone scripts run with sudo privileges, allowing installation of system packages. Use this power responsibly and only install trusted software.

Next Steps

Plan Mode

Learn how Plan Mode can help design your post-clone script

Multi-Repo Support

Working across multiple repositories with different dependencies

GitHub Integration

Managing post-clone scripts in GitHub repositories

Skills

Create custom skills for common workflows