---
title: Action Configuration
sidebar:
  order: 58
---
`action.json` is the configuration file that defines a Roboto Action. The Roboto CLI consumes it when creating or updating actions:

```bash
roboto actions create --from-file action.json
```

`roboto actions init` generates one when scaffolding a new action project.

Write new files in schema version 2, which is described first. A file without `schema_version` uses the [legacy (v1) schema](#legacy-v1-schema), which still works and creates the action it always has; `roboto actions create` prints a notice when it reads one.

## Top-level fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `schema_version` | integer | Yes | `2`. |
| `name` | string | Yes | Unique identifier for the action within your organization. Conventionally `kebab-cased`. |
| `description` | string | No | Full description of what the action does. |
| `short_description` | string | No | One-line summary shown in listings and the Action Hub. At most 140 characters. |
| `tags` | list of strings | No | Free-form labels for filtering and discovery. Defaults to `[]`. |
| `metadata` | object | No | Arbitrary key/value metadata attached to the action. Defaults to `{}`. |
| `release` | [Release](#release) | Yes | What the action runs, on which compute, and what it may do. |

## Release

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `substrate` | string | Yes | The [runner](/docs/learn/python-actions#runners) the release runs on: `microvm` is the fast runner, which runs a Python file; `fargate` is the advanced runner, which runs a container image, a Python file, or both. |
| `executable` | [Executable](#executable) | Yes, unless given on the command line | The container image or Python file the release runs. May be omitted when `roboto actions create` is given `--image` or `--payload`, which replace it; a template whose image is pushed at deploy time leaves it out. |
| `shape` | [Shape](#shape) | Yes | Resources each invocation gets unless it asks for others. |
| `grants` | list of strings | Yes | What invocations may do in Roboto, as `entity:verb` grants. See [Grants](#grants). |
| `timeout_s_default` | integer | No | Default maximum invocation duration in seconds; an invocation may set its own. If omitted, each invocation gets the longest run its runner allows (50 minutes on `microvm`, 12 hours on `fargate`), or your organization's limit when that is lower, such as 30 minutes on the free tier. An invocation that reaches its timeout is stopped and ends as `Failed` with the status detail `timed_out`. |
| `parameters` | list of [Parameter](#parameter) | No | Runtime parameters that customize action behavior at invocation time. Defaults to `[]`. |
| `substrate_config` | [FargateConfig](#fargateconfig) | No | Container settings for a `fargate` release. |
| `requires_downloaded_inputs` | boolean | No | Whether input files are downloaded into the action's workspace before it starts. Set to `false` if the action reads only ingested topic data. Defaults to `true`, so a `microvm` release must set it to `false`: the fast runner has no disk to download inputs onto, and refuses a release that asks for it. |
| `egress` | string | No | `open` lets invocations reach the public internet; `deny_all` blocks it. Roboto's own services stay reachable either way. If omitted, the runner's default applies: `deny_all` on `microvm`, and `open` on `fargate` where your deployment offers it. |
| `version` | string | No | The version number to publish, such as `1.0.0`. Defaults to `1.0.0` for a new action; when `roboto actions create` publishes a new release of an existing action, it defaults to the next patch number after the highest the action has used. |

## Executable

Set one of the two fields, or both, unless `--image` or `--payload` supplies the code on the command line. Setting both runs the Python file inside that image, which only `fargate` can do.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `image_ref` | string | One of these | A container image in a registry Roboto can access. An image in Roboto's registry is pinned to the digest its tag names when the release is published, so pushing the tag again does not change what the action runs. |
| `python` | string (path) | One of these | A Python file, relative to `action.json`, that the CLI uploads with the release. At most 1 MiB. |

## Shape

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `memory_mib` | integer | Yes | Memory in MiB. On `microvm`, at most `2048`, the fast runner's fixed size. |
| `vcpu` | number | No | vCPUs, such as `0.5`, `1` or `2`. If omitted, it is derived from `memory_mib`. On `fargate`, valid pairings with `memory_mib` are listed under [ComputeRequirements](#computerequirements), where 1024 CPU units are 1 vCPU. |
| `storage_gib` | integer | No | Ephemeral storage in GiB, on `fargate` only: up to `200`, and a smaller value than `21` is raised to `21`. |

## Parameter

Defines a parameter passed to an action at invocation time. Action code reads parameters via [`InvocationContext`](/docs/reference/python-sdk/roboto/action_runtime#roboto.action_runtime.InvocationContext).

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | Parameter name. Used as the key when passing values at invocation time. |
| `description` | string | No | Human-readable description of the parameter's purpose. |
| `required` | boolean | No | Whether the parameter must be provided at invocation time. Defaults to `false`. |
| `default` | any | No | Value used when the parameter is not provided. Stored as a string: a string is kept as given, and any other value is written as JSON, so `false` becomes `"false"`. |

**Example:**

```json
"parameters": [
    {
        "name": "threshold",
        "description": "Alert threshold in meters per second squared",
        "required": false,
        "default": "9.8"
    },
    {
        "name": "topic",
        "description": "Topic name to analyze",
        "required": true
    }
]
```

## FargateConfig

Overrides for a `fargate` release's container. Each field overrides the value baked into the Docker image.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `substrate` | string | Yes | `fargate`. |
| `entry_point` | list of strings | No | Overrides the image `ENTRYPOINT`. |
| `command` | list of strings | No | Overrides the image `CMD`. |
| `env_vars` | object (string → string) | No | Environment variables injected into the container. |
| `workdir` | string | No | Overrides the container's working directory. |

## Grants

A grant is `entity:verb`, where the verb is `read`, `list`, `create`, `add`, `update`, `share` or `delete`. A `read` grant also covers `list`, and an `update` grant also covers `add` and `share`. `*` matches every entity or every verb, except that `*` in place of the entity never covers a privileged operation, such as reading your organization's secrets or invoking an action: a grant must name that entity, as `credential:read` does. For example, `*:read` reads everything and changes nothing, `topic:create` creates topics, `*:*` performs every ordinary operation, and `credential:read` reads your organization's secrets.

## Example

```json
{
    "schema_version": 2,
    "name": "check-magnetometer-norm",
    "short_description": "Flag flights where magnetometer norm deviates from expected range",
    "tags": [
        "diagnostics",
        "magnetometer"
    ],
    "release": {
        "substrate": "fargate",
        "executable": {
            "image_ref": "<registry>/check-magnetometer-norm:latest"
        },
        "shape": {
            "vcpu": 1,
            "memory_mib": 2048
        },
        "grants": [
            "*:read",
            "event:create"
        ],
        "timeout_s_default": 1800,
        "requires_downloaded_inputs": false,
        "parameters": [
            {
                "name": "min_norm",
                "default": "25"
            },
            {
                "name": "max_norm",
                "default": "65"
            }
        ]
    }
}
```

## Legacy (v1) schema

A file without `schema_version` uses the legacy schema below. It still creates the action it always has: a `fargate` release whose invocations may perform every ordinary operation and read your organization's secrets (`["*:*", "credential:read"]`), unless the file sets `grants`.

### Legacy top-level fields

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `name` | string | Yes | Unique identifier for the action within your organization. Conventionally `kebab-cased`. |
| `description` | string | No | Full description of what the action does. |
| `short_description` | string | No | One-line summary shown in listings and the Action Hub. |
| `parameters` | list of [Parameter](#parameter) | No | Runtime parameters that customize action behavior at invocation time. Defaults to `[]`. |
| `requires_downloaded_inputs` | boolean | No | Whether to download input files into the action's workspace before execution. Set to `false` if the action reads only ingested topic data and does not need raw files. Defaults to `true`. |
| `compute_requirements` | [ComputeRequirements](#computerequirements) | No | CPU, memory, and storage to allocate for each invocation. |
| `container_parameters` | [ContainerParameters](#containerparameters) | No | Overrides for the container's entrypoint, command, environment variables, and working directory. |
| `image_uri` | string | No | URI of a pre-built Docker image in a registry the Roboto platform can access. Required unless you pass `--image` to `roboto actions create`. An image in Roboto's registry is pinned to the digest its tag names when the action's release is published, so pushing the tag again does not change what the action runs. |
| `docker_config` | object | No | Not supported: `roboto actions create` refuses a file that sets it. Build the image with `docker`, push it with `roboto images push`, and name it in `image_uri`. |
| `inherits` | object | No | No longer supported: `roboto actions create` refuses a file that sets it. |
| `tags` | list of strings | No | Free-form labels for filtering and discovery. Defaults to `[]`. |
| `metadata` | object | No | Arbitrary key/value metadata attached to the action. Defaults to `{}`. |
| `timeout` | integer | No | Default maximum invocation duration in minutes; an invocation may set its own. If omitted, each invocation gets your organization's default: 30 minutes on the free tier, 12 hours otherwise. An invocation that reaches its timeout is stopped and ends as `Failed` with the status detail `timed_out`. |
| `grants` | list of strings | No | What the action's invocations may do in Roboto, as `entity:verb` grants (see [Grants](#grants)). Defaults to `["*:*", "credential:read"]`: every ordinary operation, plus reading your organization's secrets. |

### ComputeRequirements

Compute resources allocated to each action invocation. Not all vCPU and memory combinations are valid — see the table below for supported pairings, or the [Compute](/docs/learn/compute) page for how usage is measured.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `vCPU` | integer | No | CPU units to allocate; 1024 units = 1 vCPU. Defaults to `512` (0.5 vCPU). |
| `memory` | integer | No | Memory in MiB. Valid values depend on `vCPU` — see the table below. Defaults to `1024` (1 GiB). |
| `storage` | integer | No | Ephemeral storage in GiB. Minimum `21`; maximum `200` (premium-tier orgs). Defaults to `21`. |

**Valid vCPU / memory combinations:**

| `vCPU` | vCPUs | Valid `memory` values (MiB) |
| --- | --- | --- |
| `256` | 0.25 | 512, 1024, 2048 |
| `512` | 0.5 | 1024, 2048, 3072, 4096 |
| `1024` | 1 | 2048 – 8192 (in 1024 MiB increments) |
| `2048` | 2 | 4096 – 16384 (in 1024 MiB increments) |
| `4096` | 4 | 8192 – 30720 (in 1024 MiB increments) |
| `8192` | 8 | 16384 – 61440 (in 4096 MiB increments) |
| `16384` | 16 | 32768 – 122880 (in 8192 MiB increments) |

### ContainerParameters

Overrides for the action container's runtime configuration. Each field overrides the value baked into the Docker image.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `entry_point` | list of strings | No | Overrides the image `ENTRYPOINT`. |
| `command` | list of strings | No | Overrides the image `CMD`. |
| `env_vars` | object (string → string) | No | Environment variables injected into the container. |
| `workdir` | string | No | Overrides the container's working directory. |

### Legacy example

```json
{
    "name": "check-magnetometer-norm",
    "short_description": "Flag flights where magnetometer norm deviates from expected range",
    "description": "Computes the magnetometer vector norm for each flight and creates an event if it falls outside the configured tolerance range.",
    "parameters": [
        {
            "name": "min_norm",
            "description": "Minimum acceptable magnetometer norm (µT)",
            "required": false,
            "default": "25"
        },
        {
            "name": "max_norm",
            "description": "Maximum acceptable magnetometer norm (µT)",
            "required": false,
            "default": "65"
        }
    ],
    "requires_downloaded_inputs": false,
    "compute_requirements": {
        "vCPU": 1024,
        "memory": 2048
    },
    "tags": ["diagnostics", "magnetometer"]
}
```
