The @task decorator is used to define automation metadata and information about the runtime environment that will be provisioned to execute it.

@task(
    name="my-automation",
    plugins=["CLAUDE_CODER"],
    required_env_vars=["CLAUDE_API_KEY"]
    runner="small.cpu",
    runtime="python3.10",
)

The only required argument for the @task decorator is the name argument. The name must be unique per workspace; changing the name will create a new automation or overwrite an existing automation if the name already exists.

Arguments

name
string
required

The name of the automation.

plugins
array

The plugins to install in the automation. Supported values: CLAUDE_CODER.

  • CLAUDE_CODER adds Node to your automation’s runtime and installs the Claude CLI.
required_env_vars
array

The environment variables that are required to run your automation. Automations cannot be enabled when these are not defined.

runner
string
default:"small.cpu"

The runner to use for the automation. Supported values: small.cpu, medium.cpu, large.cpu, xlarge.cpu.

GPU runners are available on request. Please reach out to us at support@blocksorg.com to request access.

runtime
string
default:"python3.10"

The runtime to use for the automation. Supported values: python3.9, python3.10, python3.11, python3.12.