---
sidebar:
  hidden: true
title: roboto.domain.actions.action_config
---
## Module Contents

### ActionConfig

```python
class roboto.domain.actions.action_config.ActionConfig(/, **data: Any)
```

`from roboto.domain.actions import ActionConfig`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action_config.py#L27-L101)

Bases: `pydantic.BaseModel`

User-facing model for Action configuration used when creating or updating Actions.

This model defines the structure of the "action.json" file accepted by `roboto actions create --from-file` and templated for new Roboto Actions created by `roboto actions init`.

ActionConfig intentionally differs from [`roboto.domain.actions.action_record.ActionRecord`](/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord) by providing a simplified interface that: - Omits platform-managed fields (e.g., `created`, `modified`, `org_id`, `digest`) - Omits post-creation fields (e.g., `published`, `accessibility`) - Focuses on user-configurable options relevant at creation time

**Structure:**

- Required: `name`
- Optional: Most configuration options (compute requirements, parameters, metadata, etc.)

> **See also**
>
> [`roboto.domain.actions.action_record.ActionRecord`](/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionRecord): The complete action representation [`roboto.domain.actions.action_record.ActionParameter`](/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ActionParameter): Parameter configuration [`roboto.domain.actions.action_record.ComputeRequirements`](/reference/python-sdk/roboto/domain/actions/action_record#roboto.domain.actions.action_record.ComputeRequirements): Compute resource configuration

**Parameters**

- **data** (`Any`)

**Attributes**

- **ActionConfig.compute_requirements** (`roboto.domain.actions.action_record.ComputeRequirements | None`) = `None`
- **ActionConfig.container_parameters** (`roboto.domain.actions.action_record.ContainerParameters | None`) = `None`
- **ActionConfig.description** (`str | None`) = `None`
- **ActionConfig.docker_config** (`DockerImageConfig | None`) = `None`: Configuration with which to build a Docker image for the Action.
- **ActionConfig.image_uri** (`str | None`) = `None`: URI to a non-local Docker image. Must already be pushed a registry accessible by the Roboto Platform.
- **ActionConfig.inherits** (`roboto.domain.actions.action_record.ActionReference | None`) = `None`
- **ActionConfig.metadata** (`dict[str, Any]`) = `None`
- **ActionConfig.model_config**: Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- **ActionConfig.name** (`str`)
- **ActionConfig.parameters** (`list[roboto.domain.actions.action_record.ActionParameter]`) = `None`
- **ActionConfig.requires_downloaded_inputs** (`bool | None`) = `None`
- **ActionConfig.short_description** (`str | None`) = `None`
- **ActionConfig.tags** (`list[str]`) = `None`
- **ActionConfig.timeout** (`int | None`) = `None`

#### ActionConfig.enforce_invariants()

```python
def enforce_invariants(values: dict) -> dict
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action_config.py#L91-L99)

**Parameters**

- **values** (`dict`)

**Returns**

- `dict`

#### ActionConfig.from_file()

```python
@classmethod
def from_file(path: pathlib.Path) -> ActionConfig
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action_config.py#L73-L88)

Load ActionConfig from a JSON file.

**Parameters**

- **path** (`pathlib.Path`): Path to the JSON file containing action configuration

**Returns**

- `ActionConfig`: Parsed ActionConfig instance

**Raises**

- `FileNotFoundError`: If the file doesn't exist
- `pydantic.ValidationError`: If the JSON is invalid or doesn't match the schema

### DockerImageConfig

```python
class roboto.domain.actions.action_config.DockerImageConfig(/, **data: Any)
```

`from roboto.domain.actions.action_config import DockerImageConfig`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/domain/actions/action_config.py#L21-L24)

Bases: `pydantic.BaseModel`

**!!! abstract "Usage Documentation"**

\[Models\](../concepts/models.md)

A base class for creating Pydantic models.

**Parameters**

- **data** (`Any`)

**Attributes**

- **`DockerImageConfig.__class_vars__`**: The names of the class variables defined on the model.
- **`DockerImageConfig.__private_attributes__`**: Metadata about the private attributes of the model.
- **`DockerImageConfig.__signature__`**: The synthesized \_\_init\_\_ [Signature][inspect.Signature] of the model.
- **`DockerImageConfig.__pydantic_complete__`**: Whether model building is completed, or if there are still undefined fields.
- **`DockerImageConfig.__pydantic_core_schema__`**: The core schema of the model.
- **`DockerImageConfig.__pydantic_custom_init__`**: Whether the model has a custom \_\_init\_\_ function.
- **`DockerImageConfig.__pydantic_decorators__`**: Metadata containing the decorators defined on the model. This replaces Model.\_\_validators\_\_ and Model.\_\_root_validators\_\_ from Pydantic V1.
- **`DockerImageConfig.__pydantic_generic_metadata__`**: A dictionary containing metadata about generic Pydantic models. The origin and args items map to the [\_\_origin\_\_][genericalias.\_\_origin\_\_] and [\_\_args\_\_][genericalias.\_\_args\_\_] attributes of [generic aliases][types-genericalias], and the parameter item maps to the \_\_parameter\_\_ attribute of generic classes.
- **`DockerImageConfig.__pydantic_parent_namespace__`**: Parent namespace of the model, used for automatic rebuilding of models.
- **`DockerImageConfig.__pydantic_post_init__`**: The name of the post-init method for the model, if defined.
- **`DockerImageConfig.__pydantic_root_model__`**: Whether the model is a [RootModel][pydantic.root_model.RootModel].
- **`DockerImageConfig.__pydantic_serializer__`**: The pydantic-core SchemaSerializer used to dump instances of the model.
- **`DockerImageConfig.__pydantic_validator__`**: The pydantic-core SchemaValidator used to validate instances of the model.
- **`DockerImageConfig.__pydantic_fields__`**: A dictionary of field names and their corresponding [FieldInfo][pydantic.fields.FieldInfo] objects.
- **`DockerImageConfig.__pydantic_computed_fields__`**: A dictionary of computed field names and their corresponding [ComputedFieldInfo][pydantic.fields.ComputedFieldInfo] objects.
- **`DockerImageConfig.__pydantic_extra__`**: A dictionary containing extra values, if [extra][pydantic.config.ConfigDict.extra] is set to 'allow'.
- **`DockerImageConfig.__pydantic_fields_set__`**: The names of fields explicitly set during instantiation.
- **`DockerImageConfig.__pydantic_private__`**: Values of private attributes set on the model instance.
- **DockerImageConfig.build_args** (`dict[str, str]`) = `None`
- **DockerImageConfig.context** (`pathlib.Path`)
- **DockerImageConfig.dockerfile** (`pathlib.Path`)
