Skip to content
Roboto
Esc
↑↓navigate↵open⌘Jpreview
On this page

roboto.domain.actions

Actions domain module for the Roboto SDK.

This module provides the core domain entities and operations for working with Actions, Invocations, and Triggers in the Roboto platform. Actions are reusable functions that process, transform, or analyze data. Invocations represent executions of actions, and Triggers automatically invoke actions when specific events or conditions occur.

The main classes in this module are:

  • Action: A reusable function to process data
  • Invocation: An execution instance of an action
  • Trigger and ScheduledTrigger: the legacy trigger model, deprecated. Triggers now live in roboto.domain.triggers; the classes here remain only so existing code keeps working, and read only the triggers the old model can express.

Usage

Basic action invocation:

from roboto.domain.actions import Action, InvocationSource
action = Action.from_name("my_action", owner_org_id="my-org")
invocation = action.invoke(invocation_source=InvocationSource.Manual, parameter_values={"param1": "value1"})
invocation.wait_for_terminal_status()

Creating a trigger:

from roboto.domain.actions import Trigger, TriggerForEachPrimitive
trigger = Trigger.create(
    name="auto_process",
    action_name="my_action",
    required_inputs=["**/*.bag"],
    for_each=TriggerForEachPrimitive.Dataset,
)

Submodules

Package Contents

Accessibility

class roboto.domain.actions.Accessibility#View Source

Bases: roboto.compat.StrEnum

Controls who can query for and invoke an action.

Accessibility levels determine the visibility and usability of actions within the Roboto platform. Actions can be private to an organization or published publicly in the Action Hub.

Future accessibility levels may include: “user” and/or “team”.

Attributes

Accessibility.ActionHub

ActionHub = 'action_hub' #

All users of Roboto can query for and invoke the action.

Accessibility.Organization

Organization = 'organization' #

All members of the organization owning the Action can query for and invoke the action.

Action

class roboto.domain.actions.Action(record, roboto_client=None)#View Source

A reusable function to process, transform or analyze data in Roboto.

Actions are containerized functions that can be invoked to process datasets, files, or other data sources within the Roboto platform. They encapsulate processing logic, dependencies, and compute requirements, making data processing workflows reproducible and scalable.

Actions can be created, updated, invoked, and managed through this class. They support parameterization, inheritance from other actions, and can be triggered automatically based on events or conditions.

An Action consists of:

  • Container image and execution parameters
  • Input/output specifications
  • Compute requirements (CPU, memory, etc.)
  • Parameters that can be customized at invocation time
  • Metadata and tags for organization

Actions are owned by organizations and can have different accessibility levels (private to organization or public in the Action Hub).

Properties

Action.accessibility

The accessibility level of this action (Organization or ActionHub).

Action.compute_requirements

The compute requirements (CPU, memory) for running this action.

Action.container_parameters

The container parameters including image URI and execution settings.

Action.create()

classmethod create(name, compute_requirements=None, container_parameters=None, description=None, inherits=None, metadata=None, parameters=None, requires_downloaded_inputs=None, short_description=None, tags=None, timeout=None, uri=None, caller_org_id=None, roboto_client=None)#View Source

Create a new action in the Roboto platform.

Creates a new action with the specified configuration. The action will be owned by the caller’s organization and can be invoked to process data.

Parameters

name str

Unique name for the action within the organization.

CPU, memory, and other compute specifications.

Container image URI, entrypoint, and environment variables.

description Optional[str]

Detailed description of what the action does.

Reference to another action to inherit configuration from.

metadata Optional[dict[str, Any]]

Custom key-value metadata to associate with the action.

List of parameters that can be provided at invocation time.

requires_downloaded_inputs Optional[bool]

Whether input files should be downloaded before execution.

short_description Optional[str]

Brief description (max 140 characters) for display purposes.

tags Optional[list[str]]

List of tags for categorizing and searching actions.

timeout Optional[int]

Maximum execution time in minutes before the action is terminated.

uri Optional[str]

Container image URI if not inheriting from another action.

caller_org_id Optional[str]

Organization ID to create the action in. Defaults to caller’s org.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. Uses default if not provided.

Returns

The newly created Action instance.

Raises

If short_description exceeds 140 characters or other validation errors occur.

If the request is malformed.

If the caller lacks permission to create actions.

Usage

Create a simple action:

action = Action.create(
    name="hello_world", uri="ubuntu:latest", description="A simple hello world action"
)

Create an action with parameters and compute requirements:

from roboto.domain.actions import ComputeRequirements, ActionParameter
action = Action.create(
    name="data_processor",
    uri="my-registry.com/processor:v1.0",
    description="Processes sensor data with configurable parameters",
    compute_requirements=ComputeRequirements(vCPU=4096, memory=8192),
    parameters=[
        ActionParameter(name="threshold", required=True, description="Processing threshold"),
        ActionParameter(name="output_format", default="json", description="Output format"),
    ],
    tags=["data-processing", "sensors"],
    timeout=60,
)

Create an action that inherits from another:

base_action = Action.from_name("base_processor", owner_org_id="roboto-public")
derived_action = Action.create(
    name="custom_processor",
    inherits=base_action.record.reference,
    description="Custom processor based on base_processor",
    metadata={"version": "2.0", "team": "data-science"},
)

Properties

Action.created

created datetime.datetime #

The timestamp when this action was created.

Return type: datetime.datetime

Action.created_by

created_by str #

The user ID who created this action.

Return type: str

Action.delete()

delete()#View Source

Delete this action from the Roboto platform.

Permanently removes this action and all its versions. This operation cannot be undone.

Raises

If the action is not found.

If the caller lacks permission to delete the action.

Return type

None

Usage

Delete an action:

action = Action.from_name("old_action")
action.delete()

Properties

Action.description

description str | None #

The detailed description of what this action does.

Return type: Optional[str]

Action.digest

digest str #

The unique digest identifying this specific version of the action.

Return type: str

Action.from_name()

classmethod from_name(name, digest=None, owner_org_id=None, roboto_client=None)#View Source

Load an existing action by name.

Retrieves an action from the Roboto platform by its name and optionally a specific version digest. Action names are unique within an organization, so a name + org_id combination always provides a fully qualified reference to a specific action.

Parameters

name str

Name of the action to retrieve. Must be unique within the organization.

digest Optional[str]

Specific version digest of the action. If not provided, returns the latest version.

owner_org_id Optional[str]

Organization ID that owns the action. If not provided, searches in the caller’s organization.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. Uses default if not provided.

Returns

The Action instance.

Raises

If the action is not found.

If the caller lacks permission to access the action.

Usage

Load the latest version of an action:

action = Action.from_name("data_processor")

Load a specific version of an action:

action = Action.from_name("data_processor", digest="abc123def456")

Load an action from another organization:

action = Action.from_name("public_processor", owner_org_id="roboto-public")

Properties

Action.inherits_from

Reference to another action this action inherits configuration from.

Action.invoke()

invoke(invocation_source, data_source_id=None, data_source_type=None, input_data=None, upload_destination=None, compute_requirement_overrides=None, container_parameter_overrides=None, idempotency_id=None, invocation_source_id=None, parameter_values=None, timeout=None, caller_org_id=None)#View Source

Invokes this action using any inputs and options provided.

Executes this action with the specified parameters and returns an Invocation object that can be used to track progress and retrieve results.

Parameters

Manual, trigger, etc.

If set, should equal Dataset for backward compatibility.

data_source_id Optional[str]

If set, should be a dataset ID for backward compatibility.

input_data Optional[Union[list[str], roboto.domain.actions.invocation_record.InvocationInput]]

Either a list of file name patterns, or an InvocationInput specification.

Default upload destination (e.g. dataset) for files written to the invocation’s output directory.

compute_requirement_overrides Optional[roboto.domain.actions.action_record.ComputeRequirements]

Overrides for the action’s default compute requirements (e.g. vCPU)

container_parameter_overrides Optional[roboto.domain.actions.action_record.ContainerParameters]

Overrides for the action’s default container parameters (e.g. entrypoint)

idempotency_id Optional[str]

Unique ID to ensure an invocation is run exactly once.

invocation_source_id Optional[str]

ID of the trigger or manual operator performing the invocation.

parameter_values Optional[dict[str, Any]]

Action parameter values.

timeout Optional[int]

Action timeout in minutes.

caller_org_id Optional[str]

Org ID of the caller.

Returns

An Invocation object that can be used to track the invocation’s progress.

Raises

Invalid method parameters or combinations.

Incorrectly formed request.

The caller is not authorized to invoke this action.

Usage

Basic invocation with a dataset:

from roboto import Action, InvocationSource
action = Action.from_name("ros_ingestion", owner_org_id="roboto-public")
iv = action.invoke(
    invocation_source=InvocationSource.Manual,
    data_source_id="ds_12345",
    data_source_type=InvocationDataSourceType.Dataset,
    input_data=["**/*.bag"],
    upload_destination=InvocationUploadDestination.dataset("ds_12345"),
)
iv.wait_for_terminal_status()

Invocation with compute requirement overrides:

from roboto import Action, InvocationSource, ComputeRequirements
action = Action.from_name("image_processing", owner_org_id="roboto-public")
compute_reqs = ComputeRequirements(vCPU=4096, memory=8192)
iv = action.invoke(
    invocation_source=InvocationSource.Manual,
    compute_requirement_overrides=compute_reqs,
    parameter_values={"threshold": 0.75},
)
status = iv.wait_for_terminal_status()
print(status)
# 'COMPLETED'

Properties

Action.metadata

metadata dict[str, Any] #

Custom metadata key-value pairs associated with this action.

Return type: dict[str, Any]

Action.modified

modified datetime.datetime #

The timestamp when this action was last modified.

Return type: datetime.datetime

Action.modified_by

modified_by str #

The user ID who last modified this action.

Return type: str

Action.name

name str #

The unique name of this action within its organization.

Return type: str

Action.org_id

org_id str #

The organization ID that owns this action.

Return type: str

Action.parameters

parameters collections.abc.Sequence[roboto.domain.actions.action_record.ActionParameter] #

The list of parameters that can be provided when invoking this action.

Return type: collections.abc.Sequence[roboto.domain.actions.action_record.ActionParameter]

Action.published

published datetime.datetime | None #

The timestamp when this action was published to the Action Hub, if applicable.

Return type: Optional[datetime.datetime]

Action.query()

classmethod query(spec=None, accessibility=Accessibility.Organization, owner_org_id=None, roboto_client=None)#View Source

Query actions with optional filtering and pagination.

Searches for actions based on the provided query specification. Can search within an organization or across the public Action Hub.

Parameters

Query specification with filters, sorting, and pagination. If not provided, returns all accessible actions.

Whether to search organization actions or public Action Hub. Defaults to Organization.

owner_org_id Optional[str]

Organization ID to search within. If not provided, searches in the caller’s organization.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. Uses default if not provided.

Yields

Action instances matching the query criteria.

Raises

ValueError

If the query specification contains unknown fields.

If the caller lacks permission to query actions.

Return type

collections.abc.Generator[Action, None, None]

Usage

Query all actions in your organization:

for action in Action.query():
    print(f"Action: {action.name}")

Query actions with specific tags:

from roboto.query import QuerySpecification
spec = QuerySpecification().where("tags").contains("ml")
for action in Action.query(spec):
    print(f"ML Action: {action.name}")

Query public actions in the Action Hub:

from roboto.domain.actions import Accessibility
spec = QuerySpecification().where("name").contains("ros")
for action in Action.query(spec, accessibility=Accessibility.ActionHub):
    print(f"Public ROS Action: {action.name}")

Query with pagination:

spec = QuerySpecification().limit(10).order_by("created", ascending=False)
recent_actions = list(Action.query(spec))
print(f"Found {len(recent_actions)} recent actions")

Properties

Action.record

The underlying action record containing all action data.

Action.requires_downloaded_inputs

requires_downloaded_inputs bool #

Whether input files should be downloaded before executing this action.

Return type: bool

Action.set_accessibility()

set_accessibility(accessibility)#View Source

Set the accessibility level of this action.

Changes whether this action is private to the organization or published to the public Action Hub.

Parameters

The new accessibility level (Organization or ActionHub).

Returns

This Action instance with updated accessibility.

Raises

If the caller lacks permission to modify the action.

Usage

Make an action public in the Action Hub:

from roboto.domain.actions import Accessibility
action = Action.from_name("my_action")
action.set_accessibility(Accessibility.ActionHub)

Make an action private to the organization:

action.set_accessibility(Accessibility.Organization)

Properties

Action.short_description

short_description str | None #

A brief description of the action (max 140 characters) for display purposes.

Return type: Optional[str]

Action.tags

tags list[str] #

The list of tags associated with this action for categorization.

Return type: list[str]

Action.timeout

timeout int | None #

The maximum execution time in minutes before the action is terminated.

Return type: Optional[int]

Action.to_dict()

to_dict()#View Source

Convert this action to a dictionary representation.

Returns

dict[str, Any]

Dictionary containing all action data in JSON-serializable format.

Usage

Get action as dictionary:

action = Action.from_name("my_action")
action_dict = action.to_dict()
print(action_dict["name"])
# 'my_action'

Action.update()

update(compute_requirements=NotSet, container_parameters=NotSet, description=NotSet, inherits=NotSet, metadata_changeset=NotSet, parameter_changeset=NotSet, short_description=NotSet, timeout=NotSet, uri=NotSet, requires_downloaded_inputs=NotSet)#View Source

Update this action with new configuration.

Updates the action with the provided changes. Only specified parameters will be modified; others remain unchanged. This creates a new version of the action.

Parameters

New compute requirements (CPU, memory).

New container parameters (image, entrypoint, etc.).

description Optional[Union[str, roboto.sentinels.NotSetType]]

New detailed description.

New action reference to inherit from.

Changes to apply to metadata (add, remove, update keys).

Changes to apply to parameters (add, remove, update).

short_description Optional[Union[str, roboto.sentinels.NotSetType]]

New brief description (max 140 characters).

timeout Optional[Union[int, roboto.sentinels.NotSetType]]

New maximum execution time in minutes.

uri Optional[Union[str, roboto.sentinels.NotSetType]]

New container image URI.

requires_downloaded_inputs Union[bool, roboto.sentinels.NotSetType]

Whether to download input files before execution.

Returns

This Action instance with updated configuration.

Raises

If short_description exceeds 140 characters or other validation errors occur.

If the caller lacks permission to update the action.

Usage

Update action description and timeout:

action = Action.from_name("my_action")
action.update(description="Updated description of what this action does", timeout=45)

Update compute requirements:

from roboto.domain.actions import ComputeRequirements
action.update(compute_requirements=ComputeRequirements(vCPU=4096, memory=8192))

Add metadata using changeset:

from roboto.updates import MetadataChangeset
changeset = MetadataChangeset().set("version", "2.0").set("team", "ml")
action.update(metadata_changeset=changeset)

Properties

Action.uri

uri str | None #

The container image URI for this action.

Return type: Optional[str]

ActionConfig

class roboto.domain.actions.ActionConfig(/, **data)#View Source

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 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.)

Parameters

data Any

Attributes

ActionConfig.compute_requirements

ActionConfig.container_parameters

ActionConfig.description

description str | None = None #

ActionConfig.docker_config

docker_config DockerImageConfig | None = None #

Configuration with which to build a Docker image for the Action.

ActionConfig.enforce_invariants()

enforce_invariants(values)#View Source

Parameters

values dict

Return type

dict

ActionConfig.from_file()

classmethod from_file(path)#View Source

Load ActionConfig from a JSON file.

Parameters

path pathlib.Path

Path to the JSON file containing action configuration

Returns

Parsed ActionConfig instance

Raises

FileNotFoundError

If the file doesn’t exist

pydantic.ValidationError

If the JSON is invalid or doesn’t match the schema

Attributes

ActionConfig.image_uri

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

ActionConfig.metadata

metadata dict[str, Any] = None #

ActionConfig.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ActionConfig.name

name str #

ActionConfig.parameters

ActionConfig.requires_downloaded_inputs

requires_downloaded_inputs bool | None = None #

ActionConfig.short_description

short_description str | None = None #

ActionConfig.tags

tags list[str] = None #

ActionConfig.timeout

timeout int | None = None #

ActionParameter

class roboto.domain.actions.ActionParameter(/, **data)#View Source

Bases: pydantic.BaseModel

A parameter that can be provided to an Action at invocation time.

Action parameters allow customization of action behavior without modifying the action itself. Parameters can be required or optional, have default values, and include descriptions for documentation.

Parameters are validated when an action is invoked, ensuring that required parameters are provided and that values conform to expected types.

Parameters

data Any

Attributes

ActionParameter.default

default Any | None = None #

Default value applied for parameter if it is not required and no value is given at invocation.

Accepts any default value, but coerced to a string.

ActionParameter.description

description str | None = None #

Human-readable description of the parameter.

ActionParameter.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ActionParameter.name

name str #

Name of the parameter.

ActionParameter.required

required bool = False #

Whether this parameter is required at invocation time.

ActionParameter.validate_default()

classmethod validate_default(v)#View Source

Parameters

v Optional[Any]

Return type

Optional[str]

ActionParameterChangeset

class roboto.domain.actions.ActionParameterChangeset(/, **data)#View Source

Bases: pydantic.BaseModel

A changeset used to modify Action parameters.

Parameters

data Any

ActionParameterChangeset.Builder

class Builder#View Source
ActionParameterChangeset.Builder.build()
build()#View Source
ActionParameterChangeset.Builder.put_parameter()
put_parameter(parameter)#View Source

Parameters

parameter ActionParameter
ActionParameterChangeset.Builder.remove_parameter()
remove_parameter(parameter_name)#View Source

Parameters

parameter_name str

ActionParameterChangeset.is_empty()

is_empty()#View Source

Return type

bool

Attributes

ActionParameterChangeset.put_parameters

put_parameters list[ActionParameter] = None #

Parameters to add or update.

ActionParameterChangeset.remove_parameters

remove_parameters list[str] = None #

Names of parameters to remove.

ActionProvenance

class roboto.domain.actions.ActionProvenance(/, **data)#View Source

Bases: pydantic.BaseModel

Provenance information for an action

Parameters

data Any

Attributes

ActionProvenance.digest

digest str | None = None #

ActionProvenance.name

name str #

ActionProvenance.org_id

org_id str #

ActionRecord

class roboto.domain.actions.ActionRecord(**kwargs)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of an action.

Attributes

ActionRecord.accessibility

accessibility Accessibility #

ActionRecord.compute_digest()

compute_digest()#View Source

Return type

str

Attributes

ActionRecord.compute_requirements

compute_requirements ComputeRequirements | None = None #

ActionRecord.container_parameters

container_parameters ContainerParameters | None = None #

ActionRecord.created

created datetime.datetime #

ActionRecord.created_by

created_by str #

ActionRecord.description

description str | None = None #

ActionRecord.digest

digest str | None = None #

ActionRecord.inherits

inherits ActionReference | None = None #

ActionRecord.metadata

metadata dict[str, Any] = None #

ActionRecord.modified

modified datetime.datetime #

ActionRecord.modified_by

modified_by str #

ActionRecord.name

name str #

ActionRecord.org_id

org_id str #

ActionRecord.parameters

parameters list[ActionParameter] = None #

ActionRecord.published

published datetime.datetime | None = None #

Properties

ActionRecord.reference

reference ActionReference #
Return type: ActionReference

Attributes

ActionRecord.requires_downloaded_inputs

requires_downloaded_inputs bool | None = None #

ActionRecord.serialize_metadata()

serialize_metadata(metadata)#View Source

Parameters

metadata dict[str, Any]

Attributes

ActionRecord.short_description

short_description str | None = None #

ActionRecord.tags

tags list[str] = None #

ActionRecord.timeout

timeout int | None = None #

ActionRecord.uri

uri str | None = None #

ActionReference

class roboto.domain.actions.ActionReference(/, **data)#View Source

Bases: pydantic.BaseModel

Qualified action reference.

Parameters

data Any

Attributes

ActionReference.digest

digest str | None = None #

ActionReference.name

name str #

ActionReference.owner

owner str | None = None #

ActionStatsRecord

class roboto.domain.actions.ActionStatsRecord(/, **data)#View Source

Bases: pydantic.BaseModel

Statistical summary of action invocations for a specific action within a time period.

This model represents aggregated invocation counts for a single action, broken down by completion status (completed, failed, queued).

Parameters

data Any

Attributes

ActionStatsRecord.action_name

action_name str #

Name of the action. Action names are unique within an organization.

ActionStatsRecord.action_org_id

action_org_id str #

Organization ID that owns the action.

ActionStatsRecord.completed_count

completed_count int #

Number of invocations that completed successfully during the time period.

ActionStatsRecord.fail_count

fail_count int #

Number of invocations that failed during the time period.

ActionStatsRecord.queued_count

queued_count int #

Number of invocations that are currently queued or in progress during the time period.

CancelActiveInvocationsRequest

class roboto.domain.actions.CancelActiveInvocationsRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to bulk cancel all active invocations within an organization.

This operation cancels multiple invocations in a single request, but only affects invocations that are in non-terminal states (Queued, Running, etc.). The operation is limited in the number of invocations it will attempt to cancel in a single call for performance reasons.

For large numbers of active invocations, continue calling this operation until the has_more returned in the response is False.

Parameters

data Any

Attributes

CancelActiveInvocationsRequest.created_before

created_before datetime.datetime | None = None #

Only cancel invocations created before this timestamp.

If not provided, cancels all active invocations regardless of age.

CancelActiveInvocationsResponse

class roboto.domain.actions.CancelActiveInvocationsResponse(/, **data)#View Source

Bases: pydantic.BaseModel

Response payload from bulk cancellation of active invocations.

Contains the results of a bulk cancellation operation, including counts of successful and failed cancellations, and whether there are more active invocations to cancel.

Parameters

data Any

Attributes

CancelActiveInvocationsResponse.failure_count

failure_count int #

Number of invocations that failed to cancel.

CancelActiveInvocationsResponse.has_more

has_more bool #

Whether there are more active invocations to cancel.

CancelActiveInvocationsResponse.success_count

success_count int #

Number of invocations successfully cancelled.

ComputeRequirements

class roboto.domain.actions.ComputeRequirements(/, **data)#View Source

Bases: pydantic.BaseModel

Compute requirements for an action invocation.

Parameters

data Any

Attributes

ComputeRequirements.gpu

gpu Literal[False] = False #

GPU configuration is not yet supported.

ComputeRequirements.memory

memory int = None #

Container memory in MiB. Set to 1024 MiB by default.

The possible values depend on the CPU units chosen, with as little as 512 MiB and as much as 122,800 MiB (120 GiB).

ComputeRequirements.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ComputeRequirements.storage

storage int = None #

Container storage in GiB. Set to 21 GiB by default.

The minimum allowed value is 21 GiB, and the maximum allowed value is 200 GiB (for premium-tier orgs).

ComputeRequirements.vCPU

vCPU int = 512 #

Container CPU units. Set to 512 by default.

1024 CPU units equal 1 vCPU.

Possible values: 256, 512, 1024, 2048, 4096, 8192, 16384.

ComputeRequirements.validate_storage_limit()

validate_storage_limit()#View Source

ComputeRequirements.validate_vcpu_mem_combination()

validate_vcpu_mem_combination()#View Source

ContainerParameters

class roboto.domain.actions.ContainerParameters(/, **data)#View Source

Bases: pydantic.BaseModel

Container parameters for an action invocation.

Parameters

data Any

Attributes

ContainerParameters.command

command list[str] | None = None #

ContainerParameters.entry_point

entry_point list[str] | None = None #

ContainerParameters.env_vars

env_vars dict[str, str] | None = None #

ContainerParameters.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ContainerParameters.workdir

workdir str | None = None #

CreateActionRequest

class roboto.domain.actions.CreateActionRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to create a new action.

Contains all the configuration needed to create a new action in the Roboto platform, including container settings, compute requirements, parameters, and metadata.

Parameters

data Any

Attributes

CreateActionRequest.compute_requirements

CPU, memory, and other compute specifications.

CreateActionRequest.container_parameters

Container image URI, entrypoint, and environment variables.

CreateActionRequest.description

description str | None = None #

Detailed description of what the action does.

CreateActionRequest.inherits

Reference to another action to inherit configuration from.

CreateActionRequest.metadata

metadata dict[str, Any] = None #

Custom key-value metadata to associate with the action.

CreateActionRequest.name

name str #

Unique name for the action within the organization.

CreateActionRequest.parameters

List of parameters that can be provided at invocation time.

CreateActionRequest.requires_downloaded_inputs

requires_downloaded_inputs bool | None = None #

Whether input files should be downloaded before execution.

CreateActionRequest.short_description

short_description str | None = None #

Brief description (max 140 characters) for display purposes.

CreateActionRequest.tags

tags list[str] = None #

List of tags for categorizing and searching actions.

CreateActionRequest.timeout

timeout int | None = None #

Maximum execution time in minutes before the action is terminated.

CreateActionRequest.uri

uri str | None = None #

Container image URI if not inheriting from another action.

CreateInvocationRequest

class roboto.domain.actions.CreateInvocationRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to create a new action invocation.

Contains all the configuration needed to invoke an action, including input data specifications, parameter values, and execution overrides.

Parameters

data Any

Attributes

CreateInvocationRequest.compute_requirement_overrides

compute_requirement_overrides roboto.domain.actions.action_record.ComputeRequirements | None = None #

Optional overrides for CPU, memory, and other compute specifications.

CreateInvocationRequest.container_parameter_overrides

container_parameter_overrides roboto.domain.actions.action_record.ContainerParameters | None = None #

Optional overrides for container image, entrypoint, and environment variables.

CreateInvocationRequest.data_source_id

data_source_id str #

ID of the data source providing input data.

CreateInvocationRequest.data_source_type

Type of the data source (e.g., Dataset).

CreateInvocationRequest.idempotency_id

idempotency_id str | None = None #

Optional unique ID to ensure the invocation runs exactly once.

CreateInvocationRequest.input_data

input_data list[str] #

List of file patterns for input data selection.

CreateInvocationRequest.invocation_source

Source of the invocation (Manual, Trigger, etc.).

CreateInvocationRequest.invocation_source_id

invocation_source_id str | None = None #

Optional ID of the entity that initiated the invocation.

CreateInvocationRequest.parameter_values

parameter_values dict[str, Any] | None = None #

Optional parameter values to pass to the action.

CreateInvocationRequest.rich_input_data

Optional rich input data specification that supersedes the simple input_data patterns.

CreateInvocationRequest.timeout

timeout int | None = None #

Optional timeout override in minutes.

CreateInvocationRequest.upload_destination

Optional destination for output files.

CreateScheduledTriggerRequest

class roboto.domain.actions.CreateScheduledTriggerRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to create a scheduled trigger.

See create() for details on the request attributes.

Parameters

data Any

Attributes

CreateScheduledTriggerRequest.action_name

action_name str = None #

CreateScheduledTriggerRequest.action_owner_id

action_owner_id str | None = None #

CreateScheduledTriggerRequest.compute_requirement_overrides

compute_requirement_overrides roboto.domain.actions.action_record.ComputeRequirements | None = None #

CreateScheduledTriggerRequest.container_parameter_overrides

container_parameter_overrides roboto.domain.actions.action_record.ContainerParameters | None = None #

CreateScheduledTriggerRequest.enabled

enabled bool #

CreateScheduledTriggerRequest.invocation_input

CreateScheduledTriggerRequest.invocation_upload_destination

CreateScheduledTriggerRequest.name

name str = None #

CreateScheduledTriggerRequest.parameter_values

parameter_values dict[str, Any] | None = None #

CreateScheduledTriggerRequest.schedule

schedule str #

CreateScheduledTriggerRequest.timeout

timeout Annotated[int, pydantic.Field(ge=0)] | None = None #

CreateTriggerRequest

class roboto.domain.actions.CreateTriggerRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to create a new trigger.

Contains all the configuration needed to create a trigger that automatically invokes actions when specific conditions are met.

Parameters

data Any

Attributes

CreateTriggerRequest.action_digest

action_digest str | None = None #

Optional specific version digest of the action to invoke. If not provided, uses the latest version.

CreateTriggerRequest.action_name

action_name str #

Name of the action to invoke when the trigger fires.

CreateTriggerRequest.action_owner_id

action_owner_id str | None = None #

Organization ID that owns the target action. If not provided, searches in the caller’s organization.

CreateTriggerRequest.additional_inputs

additional_inputs list[str] | None = None #

Optional additional file patterns to include in action invocations beyond the required inputs.

CreateTriggerRequest.causes

List of events that can cause this trigger to be evaluated. If not provided, uses default causes.

CreateTriggerRequest.compute_requirement_overrides

compute_requirement_overrides roboto.domain.actions.ComputeRequirements | None = None #

Optional compute requirement overrides for action invocations.

CreateTriggerRequest.condition

condition roboto.query.ConditionType | None = None #

Optional condition that must be met for the trigger to fire.

Can filter based on metadata, file properties, etc.

CreateTriggerRequest.container_parameter_overrides

container_parameter_overrides roboto.domain.actions.ContainerParameters | None = None #

Optional container parameter overrides for action invocations.

CreateTriggerRequest.enabled

enabled bool = True #

Whether the trigger should be active immediately after creation.

CreateTriggerRequest.for_each

Granularity of execution - Dataset or DatasetFile.

CreateTriggerRequest.name

name str = None #

Unique name for the trigger (alphanumeric, hyphens, underscores only, max 256 characters).

CreateTriggerRequest.parameter_values

parameter_values dict[str, Any] | None = None #

Parameter values to pass to the action when invoked.

CreateTriggerRequest.required_inputs

required_inputs list[str] #

List of file patterns that must be present for the trigger to fire. Uses glob patterns like ‘**/*.bag’.

CreateTriggerRequest.service_user_id

service_user_id str | None = None #

Optional service user ID for authentication.

CreateTriggerRequest.timeout

timeout int | None = None #

Optional timeout override for action invocations in minutes.

CreateTriggerRequest.validate_additional_inputs()

validate_additional_inputs(value)#View Source

Parameters

value Optional[list[str]]

Return type

Optional[list[str]]

CreateTriggerRequest.validate_required_inputs()

validate_required_inputs(value)#View Source

Parameters

value list[str]

Return type

list[str]

DataSelector

class roboto.domain.actions.DataSelector(/, **data)#View Source

Bases: pydantic.BaseModel

Selector for inputs (e.g. files) to an action invocation.

Parameters

data Any

Attributes

DataSelector.dataset_id

dataset_id str | None = None #

Dataset ID, needed for backward compatibility purposes. Prefer RoboQL: dataset_id = <the ID in double quotes>

DataSelector.ensure_not_empty()

ensure_not_empty()#View Source

Return type

Attributes

DataSelector.ids

ids list[str] | None = None #

Specific input IDs (e.g. a dataset ID).

DataSelector.names

names list[str] | None = None #

Specific input names (e.g. topic names).

DataSelector.query

query str | None = None #

RoboQL query representing the desired inputs.

EvaluateTriggersRequest

class roboto.domain.actions.EvaluateTriggersRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to manually evaluate specific triggers.

Used to force evaluation of triggers outside of their normal automatic evaluation cycle. This is typically used for testing or debugging trigger behavior.

Parameters

data Any

Attributes

EvaluateTriggersRequest.trigger_evaluation_ids

trigger_evaluation_ids collections.abc.Iterable[int] #

Collection of trigger evaluation IDs to process.

ExecutableProvenance

class roboto.domain.actions.ExecutableProvenance(/, **data)#View Source

Bases: pydantic.BaseModel

Provenance information for an action executable

Parameters

data Any

Attributes

ExecutableProvenance.container_image_digest

container_image_digest str | None = None #

ExecutableProvenance.container_image_uri

container_image_uri str | None = None #

ExecutorContainer

class roboto.domain.actions.ExecutorContainer(*args, **kwds)#View Source

Bases: enum.Enum

Type of container running as part of an action invocation

Attributes

ExecutorContainer.Action

Action = 'action' #

ExecutorContainer.LogRouter

LogRouter = 'firelens_log_router' #

ExecutorContainer.Monitor

Monitor = 'monitor' #

ExecutorContainer.OutputHandler

OutputHandler = 'output_handler' #

ExecutorContainer.Setup

Setup = 'setup' #

FileSelector

class roboto.domain.actions.FileSelector(/, **data)#View Source

Bases: DataSelector

Selector for file inputs to an action invocation.

This selector type exists for backward compatibility purposes. We encourage you to use the query field to scope your input query to any dataset and/or file paths.

Parameters

data Any

FileSelector.ensure_not_empty()

ensure_not_empty()#View Source

Return type

Attributes

FileSelector.paths

paths list[str] | None = None #

File paths or patterns. Prefer RoboQL: path LIKE <path pattern in double quotes>

Invocation

class roboto.domain.actions.Invocation(record, roboto_client=None)#View Source

An instance of an execution of an action, initiated manually by a user or automatically by a trigger.

An Invocation represents a single execution of an Action with specific inputs, parameters, and configuration. It tracks the execution lifecycle from creation through completion, including status updates, logs, and results.

Invocations are created by calling Action.invoke() or through the UI. They cannot be created directly through the constructor. Each invocation has a unique ID and maintains a complete audit trail of its execution.

Key features:

  • Status tracking (Queued, Running, Completed, Failed, etc.)
  • Input data specification and parameter values
  • Compute requirement and container parameter overrides
  • Log collection and output file management
  • Progress monitoring and result retrieval

Properties

Invocation.action

Provenance information about the action that was invoked.

Invocation.cancel()

cancel()#View Source

Cancel this invocation if it is not already in a terminal status.

Attempts to cancel the invocation. If the invocation has already completed, failed, or reached another terminal status, this method has no effect.

Raises

If the invocation is not found.

If the caller lacks permission to cancel the invocation.

Return type

None

Usage

Cancel a running invocation:

invocation = Invocation.from_id("iv_12345")
if not invocation.reached_terminal_status:
    invocation.cancel()

Properties

Invocation.compute_requirements

The compute requirements (CPU, memory) used for this invocation.

Invocation.container_parameters

The container parameters used for this invocation.

Invocation.created

created datetime.datetime #

The timestamp when this invocation was created.

Return type: datetime.datetime

Invocation.current_status

The current status of this invocation (e.g., Queued, Running, Completed).

Invocation.data_source

The data source that provided input data for this invocation.

Invocation.executable

Provenance information about the executable (container) that was run.

Invocation.from_id()

classmethod from_id(invocation_id, roboto_client=None)#View Source

Load an existing invocation by its ID.

Retrieves an invocation from the Roboto platform using its unique identifier.

Parameters

invocation_id str

The unique ID of the invocation to retrieve.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. Uses default if not provided.

Returns

The Invocation instance.

Raises

If the invocation is not found.

If the caller lacks permission to access the invocation.

Usage

Load an invocation and check its status:

invocation = Invocation.from_id("iv_12345")
print(f"Status: {invocation.current_status}")
print(f"Created: {invocation.created}")

Invocation.get_logs()

get_logs(page_token=None)#View Source

Retrieve runtime STDOUT/STDERR logs generated during this invocation’s execution.

Fetches log records from the invocation’s container execution, with support for pagination to handle large log volumes.

Parameters

page_token Optional[str]

Optional token for pagination. If provided, starts retrieving logs from that point.

Yields

LogRecord instances containing log messages and metadata.

Raises

If the invocation is not found.

If the caller lacks permission to access logs.

Return type

collections.abc.Generator[roboto.domain.actions.invocation_record.LogRecord, None, None]

Properties

Invocation.id

id str #

The unique identifier for this invocation.

Return type: str

Invocation.input_data

The input data specification for this invocation, if any.

Invocation.is_queued_for_scheduling()

is_queued_for_scheduling()#View Source

An invocation is queued for scheduling if:

1. its most recent status is “Queued” 3. and is not “Deadly”

Return type

bool

Properties

Invocation.org_id

org_id str #

The organization ID that owns this invocation.

Return type: str

Invocation.parameter_values

parameter_values dict[str, Any] #

The parameter values that were provided when this invocation was created.

Return type: dict[str, Any]

Invocation.query()

classmethod query(spec=None, owner_org_id=None, roboto_client=None)#View Source

Query invocations with optional filtering and pagination.

Searches for invocations based on the provided query specification. Can filter by status, action name, creation time, and other attributes.

Parameters

Query specification with filters, sorting, and pagination. If not provided, returns all accessible invocations.

owner_org_id Optional[str]

Organization ID to search within. If not provided, searches in the caller’s organization.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. Uses default if not provided.

Yields

Invocation instances matching the query criteria.

Raises

ValueError

If the query specification contains unknown fields.

If the query filters or sorts on a field the invocations API does not accept.

If the caller lacks permission to query invocations.

Return type

collections.abc.Generator[Invocation, None, None]

Usage

Query all invocations:

for invocation in Invocation.query():
    print(f"Invocation: {invocation.id}")

Query invocations whose data source is a given dataset:

from roboto.query import Comparator, Condition, QuerySpecification
spec = QuerySpecification(
    condition=Condition(
        field="data_source_id",
        comparator=Comparator.Equals,
        value="ds_abc123",
    )
)
for invocation in Invocation.query(spec):
    print(invocation.id)

Query completed invocations:

from roboto.domain.actions import InvocationStatus
spec = QuerySpecification(
    condition=Condition(
        field="last_status",
        comparator=Comparator.Equals,
        value=InvocationStatus.Completed.value,
    )
)
completed = list(Invocation.query(spec))

Query the ten most recent invocations. Neither limit nor max_results caps an invocation query, so take the first ten from the generator:

import itertools
from roboto.query import SortDirection
spec = QuerySpecification(sort_by="created", sort_direction=SortDirection.Descending)
recent = list(itertools.islice(Invocation.query(spec), 10))

Properties

Invocation.reached_terminal_status

reached_terminal_status bool #

True if this invocation has reached a terminal status (Completed, Failed, etc.).

Return type: bool

Invocation.record

The underlying invocation record containing all invocation data.

Invocation.refresh()

refresh()#View Source

Return type

Invocation.set_container_image_digest()

set_container_image_digest(digest)#View Source

This is an admin-only operation to memorialize the digest of the container image that was pulled in the course of invoking the action.

Parameters

digest str

Return type

Invocation.set_logs_location()

set_logs_location(logs)#View Source

This is an admin-only operation to memorialize the base location where invocation logs are saved.

Use the “get_logs” or “stream_logs” methods to access invocation logs.

Properties

Invocation.source

Provenance information about the source that initiated this invocation.

Invocation.status_log

The complete history of status changes for this invocation.

Invocation.stream_logs()

stream_logs(last_read=None)#View Source

Parameters

last_read Optional[str]

Return type

collections.abc.Generator[roboto.domain.actions.invocation_record.LogRecord, None, Optional[str]]

Properties

Invocation.timeout

timeout int #

The timeout in minutes for this invocation.

Return type: int

Invocation.to_dict()

to_dict()#View Source

Return type

dict[str, Any]

Invocation.update_status()

update_status(next_status, detail=None)#View Source

Parameters

Return type

Properties

Invocation.upload_destination

The destination where output files from this invocation will be uploaded.

Invocation.wait_for_terminal_status()

wait_for_terminal_status(timeout=60 * 5, poll_interval=5)#View Source

Wait for the invocation to reach a terminal status.

Throws a TimeoutError if the timeout is reached.

Parameters

timeout float

The maximum amount of time, in seconds, to wait for the invocation to reach a terminal status.

The amount of time, in seconds, to wait between polling iterations.

Return type

None

InvocationDataSource

class roboto.domain.actions.InvocationDataSource(/, **data)#View Source

Bases: pydantic.BaseModel

Abstracted data source that can be provided to an invocation.

Represents a source of input data for action invocations. The data source type determines how the ID should be interpreted (e.g., as a dataset ID).

Parameters

data Any

Attributes

InvocationDataSource.data_source_id

data_source_id str #

The ID of the data source. For Dataset type, this is a dataset ID.

InvocationDataSource.data_source_type

data_source_type InvocationDataSourceType #

The type of data source (currently only Dataset).

InvocationDataSource.is_unspecified()

is_unspecified()#View Source

Check if this data source is unspecified.

Returns

bool

True if this is an unspecified data source, False otherwise.

InvocationDataSource.unspecified()

static unspecified()#View Source

Returns a special value indicating that no invocation source is specified.

Returns

An InvocationDataSource instance representing an unspecified data source.

InvocationDataSourceType

class roboto.domain.actions.InvocationDataSourceType(*args, **kwds)#View Source

Bases: enum.Enum

Source of data for an action’s input binding.

Defines the type of data source that provides input data to an action invocation. Currently supports datasets, with potential for future expansion to other data source types.

Attributes

InvocationDataSourceType.Dataset

Dataset = 'Dataset' #

InvocationInput

class roboto.domain.actions.InvocationInput(/, **data)#View Source

Bases: pydantic.BaseModel

Input specification for an action invocation.

An invocation may require no inputs at all, or some combination of Roboto files, topics, events, etc. Those are specified using selectors, which tell the invocation how to locate inputs. Selector choices include RoboQL queries (for maximum flexibility), as well as unique IDs or friendly names.

Note: support for certain input types is a work in progress, and will be offered in future Roboto platform releases.

At least one data selector must be provided in order to construct a valid InvocationInput instance.

Parameters

data Any

InvocationInput.ensure_not_empty()

ensure_not_empty()#View Source

Return type

Properties

InvocationInput.file_paths

file_paths list[str] #
Return type: list[str]

InvocationInput.file_query()

classmethod file_query(roboql_query)#View Source

Specify file inputs using a RoboQL query.

Parameters

roboql_query str

Return type

Attributes

InvocationInput.files

files FileSelector | list[FileSelector] | None = None #

File selectors.

InvocationInput.from_dataset_file_paths()

classmethod from_dataset_file_paths(dataset_id, file_paths)#View Source

Specify file input by dataset ID and dataset-relative file paths or globs.

Parameters

dataset_id str
file_paths list[str]

Return type

InvocationInput.from_session_id()

classmethod from_session_id(session_id)#View Source

Specify session input by session ID.

Parameters

session_id str

Return type

Properties

InvocationInput.safe_files

safe_files list[FileSelector] #

File selectors as a list. Empty if no such selectors are specified.

Return type: list[FileSelector]

InvocationInput.safe_sessions

safe_sessions list[DataSelector] #

Session selectors as a list. Empty if no such selectors are specified.

Return type: list[DataSelector]

InvocationInput.safe_topics

safe_topics list[DataSelector] #

Topic selectors as a list. Empty if no such selectors are specified.

Return type: list[DataSelector]

InvocationInput.session_query()

classmethod session_query(roboql_query)#View Source

Specify session inputs using a RoboQL query.

Parameters

roboql_query str

Return type

Attributes

InvocationInput.sessions

sessions DataSelector | list[DataSelector] | None = None #

Session selectors.

InvocationInput.topic_query()

classmethod topic_query(roboql_query)#View Source

Specify topic inputs using a RoboQL query.

Parameters

roboql_query str

Return type

Attributes

InvocationInput.topics

topics DataSelector | list[DataSelector] | None = None #

Topic selectors.

InvocationProvenance

class roboto.domain.actions.InvocationProvenance(/, **data)#View Source

Bases: pydantic.BaseModel

Provenance information for an invocation

Parameters

data Any

Attributes

InvocationProvenance.action

The Action that was invoked.

InvocationProvenance.executable

The underlying executable (e.g., Docker image) that was run.

InvocationProvenance.source

The source of the invocation.

InvocationRecord

class roboto.domain.actions.InvocationRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of an invocation.

Parameters

data Any

Attributes

InvocationRecord.compute_requirements

InvocationRecord.container_parameters

InvocationRecord.created

created datetime.datetime #

InvocationRecord.data_source

InvocationRecord.duration

duration datetime.timedelta = None #

InvocationRecord.idempotency_id

idempotency_id str | None = None #

InvocationRecord.input_data

input_data list[str] #

InvocationRecord.invocation_id

invocation_id str #

InvocationRecord.last_heartbeat

last_heartbeat datetime.datetime | None = None #

InvocationRecord.last_status

last_status InvocationStatus #

InvocationRecord.org_id

org_id str #

InvocationRecord.parameter_values

parameter_values dict[str, Any] = None #

InvocationRecord.provenance

InvocationRecord.rich_input_data

rich_input_data InvocationInput | None = None #

InvocationRecord.status

status list[InvocationStatusRecord] = None #

InvocationRecord.timeout

timeout int #

InvocationRecord.upload_destination

upload_destination InvocationUploadDestination | None = None #

InvocationSource

class roboto.domain.actions.InvocationSource(*args, **kwds)#View Source

Bases: enum.Enum

Method by which an invocation was run

Attributes

InvocationSource.Manual

Manual = 'Manual' #

InvocationSource.Trigger

Trigger = 'Trigger' #

InvocationStatus

class roboto.domain.actions.InvocationStatus#View Source

Bases: int, enum.Enum

Invocation status enum

Attributes

InvocationStatus.Cancelled

Cancelled = 997 #

InvocationStatus.Completed

Completed = 5 #

InvocationStatus.Deadly

Deadly = 999 #

InvocationStatus.Downloading

Downloading = 2 #

InvocationStatus.Failed

Failed = 998 #

InvocationStatus.Processing

Processing = 3 #

InvocationStatus.Queued

Queued = 0 #

InvocationStatus.Scheduled

Scheduled = 1 #

InvocationStatus.Uploading

Uploading = 4 #

InvocationStatus.can_transition_to()

can_transition_to(other)#View Source

Parameters

Return type

bool

InvocationStatus.from_value()

static from_value(v)#View Source

Parameters

v Union[int, str]

Return type

InvocationStatus.is_running()

is_running()#View Source

Return type

bool

InvocationStatus.is_terminal()

is_terminal()#View Source

Return type

bool

InvocationStatus.next()

next()#View Source

Return type

InvocationStatusRecord

class roboto.domain.actions.InvocationStatusRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of an invocation status.

Parameters

data Any

Attributes

InvocationStatusRecord.detail

detail str | None = None #

InvocationStatusRecord.status

InvocationStatusRecord.timestamp

timestamp datetime.datetime #

InvocationStatusRecord.to_presentable_dict()

to_presentable_dict()#View Source

Return type

dict[str, Optional[str]]

InvocationUploadDestination

class roboto.domain.actions.InvocationUploadDestination(/, **data)#View Source

Bases: pydantic.BaseModel

Default destination to which invocation outputs - if any - should be uploaded.

Specifies where files generated during action execution should be stored. Actions can write files to their output directory, and this destination determines where those files are uploaded after execution completes.

Parameters

data Any

InvocationUploadDestination.dataset()

classmethod dataset(dataset_id)#View Source

Create a dataset upload destination with the given ID.

Parameters

dataset_id str

The ID of the dataset where outputs should be uploaded.

Returns

An InvocationUploadDestination configured for the specified dataset.

Attributes

InvocationUploadDestination.destination_id

destination_id str | None = None #

Optional identifier for the upload destination. In the case of a dataset, it would be the dataset ID.

InvocationUploadDestination.destination_type

destination_type UploadDestinationType #

Type of upload destination. By default, outputs are uploaded to a dataset.

Properties

InvocationUploadDestination.is_dataset

is_dataset bool #

True if this is a dataset destination with a dataset ID, False otherwise.

Returns

bool

True if this destination is configured for a dataset with a valid ID.

InvocationUploadDestination.is_unknown

is_unknown bool #

True if the upload destination is not of a supported type, False otherwise.

Return type: bool

InvocationUploadDestination.pre_validate_destination_type()

classmethod pre_validate_destination_type(value)#View Source

Parameters

value Any

Return type

Any

LogRecord

class roboto.domain.actions.LogRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of a log record.

Parameters

data Any

Attributes

LogRecord.log

log str #

LogRecord.partial_id

partial_id str | None = None #

LogRecord.timestamp

timestamp datetime.datetime #

LogsLocation

class roboto.domain.actions.LogsLocation(/, **data)#View Source

Bases: pydantic.BaseModel

Invocation log storage location

Parameters

data Any

Attributes

LogsLocation.bucket

bucket str #

LogsLocation.prefix

prefix str #

QueryTriggersRequest

class roboto.domain.actions.QueryTriggersRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to query triggers with filters.

Used to search for triggers based on various criteria such as name, status, or other attributes.

Parameters

data Any

Attributes

QueryTriggersRequest.filters

filters dict[str, Any] = None #

Dictionary of filter criteria to apply to the trigger search.

QueryTriggersRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

ScheduledTrigger

class roboto.domain.actions.ScheduledTrigger(record, roboto_client=None)#View Source

A trigger that invokes actions on a recurring schedule, e.g. hourly or daily.

Schedules are currently specified using standard Cron expressions, with times in UTC. A handful of common schedules are provided by the TriggerSchedule class.

Once a scheduled time is reached, the action associated with this trigger will be invoked using the optionally provided input specification, and any other overrides such as compute requirements or parameter values.

Properties

ScheduledTrigger.action_reference

Reference to the action this trigger invokes.

ScheduledTrigger.compute_requirement_overrides

compute_requirement_overrides roboto.domain.actions.action_record.ComputeRequirements | None #

Optional compute requirement overrides.

ScheduledTrigger.container_parameter_overrides

container_parameter_overrides roboto.domain.actions.action_record.ContainerParameters | None #

Optional container parameter overrides.

ScheduledTrigger.create()

classmethod create(name, schedule, action_name, action_owner_id=None, compute_requirement_overrides=None, container_parameter_overrides=None, enabled=True, invocation_input=None, invocation_upload_destination=None, parameter_values=None, timeout=None, caller_org_id=None, roboto_client=None)#View Source

Create a new scheduled trigger.

If the trigger is enabled on creation, action invocations will commence on the provided schedule. Note that the total number of active triggers in an organization is subject to a tier-specific limit. Exceeding that limit will result in the trigger being disabled.

Parameters

name str

Unique name for the scheduled trigger. Must not exceed 256 characters.

schedule Union[str, TriggerSchedule]

Recurring schedule for the trigger, e.g. hourly.

action_name str

Name of the action to invoke on schedule.

action_owner_id Optional[str]

Organization ID that owns the target action. If not provided, searches the caller’s organization.

compute_requirement_overrides Optional[roboto.domain.actions.action_record.ComputeRequirements]

Optional compute requirement overrides for action invocations.

container_parameter_overrides Optional[roboto.domain.actions.action_record.ContainerParameters]

Optional container parameter overrides for action invocations.

enabled bool

Whether the trigger should be active immediately after creation.

Optional input specification to be used for all scheduled action invocations.

Optional upload destination for invocation outputs. Currently supports datasets.

parameter_values Optional[dict[str, Any]]

Optional parameter values to pass to the action when invoked.

timeout Optional[int]

Optional timeout override for action invocations, in minutes.

caller_org_id Optional[str]

Organization ID to create the trigger in. Defaults to caller’s org.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. If not provided, defaults to the caller’s Roboto configuration.

Returns

The newly created ScheduledTrigger instance.

Raises

ValueError

If request parameters have invalid values, e.g. a negative timeout.

If the request cannot be satisfied as provided.

If the caller lacks permission to create triggers, invoke the specified action or upload to the specified upload destination.

If a scheduled trigger with the provided name already exists in the target organization.

If the caller has exceeded their organization’s maximum action timeout limit (in minutes).

Usage

Create an hourly trigger to invoke an analytics action with no explicit inputs:

from roboto.domain.actions import ScheduledTrigger, TriggerSchedule
scheduled_trigger = ScheduledTrigger.create(
    name="analytics_action_hourly_trigger",
    action_name="analytics_action",
    schedule=TriggerSchedule.hourly(),
)

Create a daily trigger to invoke an action that processes CSV files created after a given date:

from roboto.domain.actions import ScheduledTrigger, TriggerSchedule, InvocationInput
scheduled_trigger = ScheduledTrigger.create(
    name="csv_processor_daily_trigger",
    action_name="csv_processor",
    schedule=TriggerSchedule.daily(),
    invocation_input=InvocationInput.file_query("created > '2025-04-05' AND path LIKE '%.csv'"),
)

Properties

ScheduledTrigger.created

created datetime.datetime #

Creation time for this scheduled trigger.

Return type: datetime.datetime

ScheduledTrigger.created_by

created_by str #

User who created this scheduled trigger.

Return type: str

ScheduledTrigger.delete()

delete()#View Source

Delete this scheduled trigger.

Return type

None

ScheduledTrigger.disable()

disable()#View Source

Disable this scheduled trigger.

If the trigger is already disabled, the call has no effect.

Any currently running scheduled invocations will proceed to completion, but no new scheduled invocations will occur, unless and until the trigger is re-enabled.

Return type

None

ScheduledTrigger.enable()

enable()#View Source

Enable this scheduled trigger.

If the trigger is already enabled, the call has no effect.

The total number of active triggers within an organization is subject to a tier-specific limit. If this operation results in the limit being exceeded, this trigger will remain disabled.

Returns

bool

True if the trigger is now enabled, False otherwise.

Properties

ScheduledTrigger.enabled

enabled bool #

True if this scheduled trigger is enabled.

Return type: bool

ScheduledTrigger.from_id()

classmethod from_id(trigger_id, owner_org_id=None, roboto_client=None)#View Source

Fetch a scheduled trigger by its unique ID.

Parameters

trigger_id str

Unique trigger ID.

owner_org_id Optional[str]

Organization ID which owns the trigger. Defaults to caller’s org.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. If not provided, defaults to the caller’s Roboto configuration.

Returns

The ScheduledTrigger with the provided unique ID.

Raises

If no scheduled trigger exists with the provided ID in the target organization.

If the caller is not a member of the trigger’s target organization.

ScheduledTrigger.from_name()

classmethod from_name(name, owner_org_id=None, roboto_client=None)#View Source

Fetch a scheduled trigger by its unique name within an organization.

Parameters

name str

Name of the scheduled trigger.

owner_org_id Optional[str]

Organization ID which owns the trigger. Defaults to caller’s org.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. If not provided, defaults to the caller’s Roboto configuration.

Returns

The ScheduledTrigger with the provided unique name.

Raises

If no scheduled trigger exists with the provided name in the target organization.

If the caller is not a member of the trigger’s target organization.

ScheduledTrigger.get_action()

get_action()#View Source

Get the target Action for this scheduled trigger.

Returns

The action this trigger invokes on a recurring schedule.

ScheduledTrigger.get_evaluations()

get_evaluations()#View Source

Get the evaluation history for this scheduled trigger.

Under normal circumstances, this trigger’s target action will simply be invoked on the configured schedule, for as long as the trigger is enabled. However, it’s possible that an error occurs when attempting to invoke the action. In either case, a trigger evaluation record is created to capture the details of what happened.

Returns

A generator that yields TriggerEvaluationRecord instances, ordered by descending evaluation start time.

ScheduledTrigger.get_invocations()

get_invocations()#View Source

Get the scheduled invocations initiated by this trigger, if any.

Returns

collections.abc.Generator[roboto.domain.actions.invocation.Invocation, None, None]

A generator that yields Invocation instances for any scheduled invocations kicked off by this trigger. The invocations are ordered from most to least recently created.

Properties

ScheduledTrigger.invocation_input

Optional input specification for action invocations.

ScheduledTrigger.invocation_upload_destination

Optional upload destination for action invocation outputs.

ScheduledTrigger.modified

modified datetime.datetime #

Last modification time for this scheduled trigger.

Return type: datetime.datetime

ScheduledTrigger.modified_by

modified_by str #

User who last modified this scheduled trigger.

Return type: str

ScheduledTrigger.name

name str #

This trigger’s name, unique among scheduled triggers in the org.

Return type: str

ScheduledTrigger.org_id

org_id str #

Organization ID which owns this scheduled trigger.

Return type: str

ScheduledTrigger.parameter_values

parameter_values dict[str, Any] | None #

Optional action parameter values.

Return type: Optional[dict[str, Any]]

ScheduledTrigger.record

Wire-transmissible representation of this scheduled trigger.

ScheduledTrigger.schedule

schedule str #

Invocation schedule for the target action.

Return type: str

ScheduledTrigger.timeout

timeout int | None #

Optional invocation timeout, in minutes.

Return type: Optional[int]

ScheduledTrigger.trigger_id

trigger_id str #

Unique ID of the scheduled trigger.

Return type: str

ScheduledTrigger.update()

update(action_name=NotSet, action_owner_id=NotSet, compute_requirement_overrides=NotSet, container_parameter_overrides=NotSet, enabled=NotSet, invocation_input=NotSet, invocation_upload_destination=NotSet, parameter_values=NotSet, schedule=NotSet, timeout=NotSet)#View Source

Update this scheduled trigger.

Changing the action associated with this trigger, or the default upload destination, are subject to authorization checks. Enabling the trigger or changing the target action’s timeout are subject to tier-specific organization limit checks.

Per Roboto convention, the sentinel value NotSet is the default for all arguments to this call, indicating that the corresponding trigger attribute should not be updated. The value None, on the other hand, indicates that the relevant trigger attribute should be set to None (i.e. cleared).

Parameters

action_name Union[str, roboto.sentinels.NotSetType]

Name of the target action to associate with this trigger.

action_owner_id Union[str, roboto.sentinels.NotSetType]

Organization ID that owns the target action.

Optional compute requirement overrides for action invocations.

Optional container parameter overrides for action invocations.

enabled Union[bool, roboto.sentinels.NotSetType]

Whether the trigger should be active immediately after creation.

Optional input specification to be used for all scheduled action invocations.

Optional upload destination for invocation outputs.

parameter_values Union[Optional[dict[str, Any]], roboto.sentinels.NotSetType]

Optional parameter values to pass to the action when invoked.

Recurring schedule for the trigger, e.g. hourly.

timeout Union[Optional[int], roboto.sentinels.NotSetType]

Optional timeout override for action invocations, in minutes.

Returns

This trigger with any updates applied.

Raises

ValueError

If request parameters have invalid values, e.g. a negative timeout.

If the request cannot be satisfied as provided.

If the caller lacks permission to invoke the specified action or upload to the specified upload destination.

If the caller has exceeded their organization’s maximum action timeout limit (in minutes).

ScheduledTriggerRecord

class roboto.domain.actions.ScheduledTriggerRecord(/, **data)#View Source

Bases: pydantic.BaseModel

Wire-transmissible representation of a scheduled trigger.

Contains all the configuration and metadata for a scheduled trigger, including the target action, invocation schedule, input specification and execution settings.

This is the underlying data structure used by the ScheduledTrigger domain class to store and transmit trigger information.

Parameters

data Any

Attributes

ScheduledTriggerRecord.action

Reference to the action this trigger invokes.

ScheduledTriggerRecord.compute_requirement_overrides

compute_requirement_overrides roboto.domain.actions.action_record.ComputeRequirements | None = None #

Optional compute requirement overrides.

ScheduledTriggerRecord.container_parameter_overrides

container_parameter_overrides roboto.domain.actions.action_record.ContainerParameters | None = None #

Optional container parameter overrides.

ScheduledTriggerRecord.created

created datetime.datetime #

Creation time for the scheduled trigger.

ScheduledTriggerRecord.created_by

created_by str #

User who created the scheduled trigger.

ScheduledTriggerRecord.enabled

enabled bool #

True if the scheduled trigger is enabled.

ScheduledTriggerRecord.invocation_input

Optional invocation input for action invocations.

ScheduledTriggerRecord.invocation_upload_destination

Optional upload destination for action invocation outputs.

ScheduledTriggerRecord.modified

modified datetime.datetime #

Last modification time for the scheduled trigger.

ScheduledTriggerRecord.modified_by

modified_by str #

User who last modified this scheduled trigger.

ScheduledTriggerRecord.name

name str #

Scheduled trigger name. Unique within an organization.

ScheduledTriggerRecord.next_occurrence

next_occurrence datetime.datetime | None = None #

Next scheduled invocation time, or None if the trigger is disabled.

This is computed and updated by the Roboto system.

ScheduledTriggerRecord.org_id

org_id str #

Organization ID which owns the scheduled trigger.

ScheduledTriggerRecord.parameter_values

parameter_values dict[str, Any] | None = None #

Optional action parameter values.

ScheduledTriggerRecord.schedule

schedule str #

Invocation schedule for the target action.

ScheduledTriggerRecord.timeout

timeout int | None = None #

Optional invocation timeout, in minutes.

ScheduledTriggerRecord.trigger_id

trigger_id str #

Unique ID of the scheduled trigger.

SetActionAccessibilityRequest

class roboto.domain.actions.SetActionAccessibilityRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to set action accessibility.

Used to change whether an action is private to the organization or published publicly in the Action Hub.

Parameters

data Any

Attributes

SetActionAccessibilityRequest.accessibility

The new accessibility level (Organization or ActionHub).

SetActionAccessibilityRequest.digest

digest str | None = None #

Specific version of Action. If not specified, the latest version’s accessibility will be updated.

SetActionAccessibilityRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

SetContainerInfoRequest

class roboto.domain.actions.SetContainerInfoRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request to set container information for an invocation.

Used internally by the Roboto platform to record container details after the action image has been pulled and inspected.

Parameters

data Any

Attributes

SetContainerInfoRequest.image_digest

image_digest str #

The digest of the container image that was pulled.

SetLogsLocationRequest

class roboto.domain.actions.SetLogsLocationRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request to set the location where invocation logs are stored.

Used internally by the Roboto platform to record where log files are saved for later retrieval.

Parameters

data Any

Attributes

SetLogsLocationRequest.bucket

bucket str #

S3 bucket name where logs are stored.

SetLogsLocationRequest.prefix

prefix str #

S3 key prefix for the log files.

SourceProvenance

class roboto.domain.actions.SourceProvenance(/, **data)#View Source

Bases: pydantic.BaseModel

Provenance information for an invocation source

Parameters

data Any

Attributes

SourceProvenance.source_id

source_id str #

SourceProvenance.source_type

source_type InvocationSource #

Trigger

class roboto.domain.actions.Trigger(record, roboto_client=None)#View Source

A rule that automatically invokes an action when specific events or conditions occur.

Triggers enable automated data processing workflows by monitoring for specific events (like new datasets being created) and automatically invoking actions when conditions are met. They eliminate the need for manual intervention in routine data processing tasks.

Triggers can be configured to:

  • Monitor for new datasets, files, or other data sources
  • Apply conditional logic to determine when to execute
  • Specify input data patterns and action parameters
  • Override compute requirements and container parameters
  • Execute actions for each matching item or in batch

A trigger consists of:

  • Target action to invoke
  • Input data requirements and patterns
  • Execution conditions and causes
  • Parameter values and overrides
  • Scheduling and execution settings

Properties

Trigger.condition

condition roboto.query.ConditionType | None #
Return type: Optional[roboto.query.ConditionType]

Trigger.create()

classmethod create(name, action_name, required_inputs, for_each, enabled=True, action_digest=None, action_owner_id=None, additional_inputs=None, causes=None, compute_requirement_overrides=None, condition=None, container_parameter_overrides=None, parameter_values=None, service_user_id=None, timeout=None, caller_org_id=None, roboto_client=None)#View Source

Create a new trigger that automatically invokes an action when conditions are met.

Creates a trigger that monitors for specific events (like new datasets or files) and automatically invokes the specified action when the trigger conditions are satisfied. This enables automated data processing workflows.

Parameters

name str

Unique name for the trigger within the organization.

action_name str

Name of the action to invoke when the trigger fires.

required_inputs list[str]

List of file patterns that must be present for the trigger to fire. Uses glob patterns like “**/*.bag” or “data/*.csv”.

Granularity of execution - Dataset creates one invocation per dataset, DatasetFile creates one invocation per matching file.

enabled bool

Whether the trigger should be active immediately after creation.

action_digest Optional[str]

Specific version digest of the action to invoke. If not provided, uses the latest version.

action_owner_id Optional[str]

Organization ID that owns the target action. If not provided, searches in the caller’s organization.

additional_inputs Optional[list[str]]

Optional additional file patterns to include in invocations.

List of events that can cause this trigger to be evaluated. If not provided, uses default causes.

compute_requirement_overrides Optional[roboto.domain.actions.invocation_record.ComputeRequirements]

Optional compute requirement overrides for action invocations.

condition Optional[roboto.query.ConditionType]

Optional condition that must be met for the trigger to fire. Can filter based on metadata, file properties, etc.

container_parameter_overrides Optional[roboto.domain.actions.invocation_record.ContainerParameters]

Optional container parameter overrides for action invocations.

parameter_values Optional[dict[str, Any]]

Parameter values to pass to the action when invoked.

service_user_id Optional[str]

Optional service user ID for authentication.

timeout Optional[int]

Optional timeout override for action invocations in minutes.

caller_org_id Optional[str]

Organization ID to create the trigger in. Defaults to caller’s org.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. Uses default if not provided.

Returns

The newly created Trigger instance.

Raises

If the trigger configuration is invalid.

If the request is malformed.

If the caller lacks permission to create triggers.

Usage

Create a simple trigger for ROS bag files:

from roboto.domain.actions import Trigger, TriggerForEachPrimitive
trigger = Trigger.create(
    name="auto_process_bags",
    action_name="ros_ingestion",
    required_inputs=["**/*.bag"],
    for_each=TriggerForEachPrimitive.Dataset,
)

Create a conditional trigger with parameters:

from roboto.query import Condition
condition = Condition("metadata.sensor_type").equals("lidar")
trigger = Trigger.create(
    name="lidar_processing",
    action_name="lidar_processor",
    required_inputs=["**/*.pcd"],
    for_each=TriggerForEachPrimitive.Dataset,
    condition=condition,
    parameter_values={"resolution": "high", "filter": "statistical"},
)

Create a trigger with compute overrides:

from roboto.domain.actions import ComputeRequirements
trigger = Trigger.create(
    name="heavy_processing",
    action_name="ml_inference",
    required_inputs=["**/*.jpg", "**/*.png"],
    for_each=TriggerForEachPrimitive.DatasetFile,
    compute_requirement_overrides=ComputeRequirements(vCPU=8192, memory=16384),
)

Properties

Trigger.created

created datetime.datetime #
Return type: datetime.datetime

Trigger.created_by

created_by str #
Return type: str

Trigger.delete()

delete()#View Source

Trigger.disable()

disable()#View Source

Trigger.enable()

enable()#View Source

Properties

Trigger.enabled

enabled bool #
Return type: bool

Trigger.from_name()

classmethod from_name(name, owner_org_id=None, roboto_client=None)#View Source

Parameters

name str
owner_org_id Optional[str]
roboto_client Optional[roboto.http.RobotoClient]

Return type

Trigger.get_action()

get_action()#View Source

Trigger.get_evaluations()

get_evaluations(limit=None, page_token=None)#View Source

Parameters

limit Optional[int]
page_token Optional[str]

Return type

Trigger.get_evaluations_for_dataset()

static get_evaluations_for_dataset(dataset_id, owner_org_id=None, roboto_client=None)#View Source

Get all trigger evaluations for a specific dataset.

Retrieves the history of trigger evaluations that were performed for a given dataset, including successful invocations and failed attempts.

Parameters

dataset_id str

The ID of the dataset to get evaluations for.

owner_org_id Optional[str]

Organization ID that owns the dataset. If not provided, searches in the caller’s organization.

roboto_client Optional[roboto.http.RobotoClient]

Roboto client instance. Uses default if not provided.

Yields

TriggerEvaluationRecord instances for the dataset.

Raises

If the dataset is not found.

If the caller lacks permission to access evaluations.

Return type

Usage

Get all evaluations for a dataset:

for evaluation in Trigger.get_evaluations_for_dataset("ds_12345"):
    print(f"Trigger: {evaluation.trigger_name}, Status: {evaluation.status}")

Check if any triggers succeeded for a dataset:

from roboto.domain.actions import TriggerEvaluationStatus
evaluations = list(Trigger.get_evaluations_for_dataset("ds_12345"))
successful = [e for e in evaluations if e.status == TriggerEvaluationStatus.Succeeded]
print(f"Found {len(successful)} successful trigger evaluations")

Trigger.get_invocations()

get_invocations()#View Source

Return type

collections.abc.Generator[roboto.domain.actions.invocation.Invocation, None, None]

Trigger.invoke()

invoke(data_source, idempotency_id=None, input_data_override=None, upload_destination=None)#View Source

Parameters

idempotency_id Optional[str]
input_data_override Optional[list[str]]

Trigger.latest_evaluation()

latest_evaluation()#View Source

Properties

Trigger.modified

modified datetime.datetime #
Return type: datetime.datetime

Trigger.modified_by

modified_by str #
Return type: str

Trigger.name

name #

Trigger.org_id

org_id #

Trigger.query()

classmethod query(spec=None, owner_org_id=None, roboto_client=None)#View Source

Parameters

owner_org_id Optional[str]
roboto_client Optional[roboto.http.RobotoClient]

Return type

collections.abc.Generator[Trigger, None, None]

Properties

Trigger.service_user_id

service_user_id str | None #
Return type: Optional[str]

Trigger.to_dict()

to_dict()#View Source

Return type

dict[str, Any]

Properties

Trigger.trigger_id

trigger_id str #
Return type: str

Trigger.update()

update(action_name=NotSet, action_owner_id=NotSet, action_digest=NotSet, additional_inputs=NotSet, causes=NotSet, compute_requirement_overrides=NotSet, container_parameter_overrides=NotSet, condition=NotSet, enabled=NotSet, for_each=NotSet, parameter_values=NotSet, required_inputs=NotSet, timeout=NotSet)#View Source

Parameters

action_name Union[str, roboto.sentinels.NotSetType]
action_owner_id Union[str, roboto.sentinels.NotSetType]
action_digest Optional[Union[str, roboto.sentinels.NotSetType]]
additional_inputs Optional[Union[list[str], roboto.sentinels.NotSetType]]
compute_requirement_overrides Optional[Union[roboto.domain.actions.invocation_record.ComputeRequirements, roboto.sentinels.NotSetType]]
container_parameter_overrides Optional[Union[roboto.domain.actions.invocation_record.ContainerParameters, roboto.sentinels.NotSetType]]
enabled Union[bool, roboto.sentinels.NotSetType]
parameter_values Optional[Union[dict[str, Any], roboto.sentinels.NotSetType]]
required_inputs Union[list[str], roboto.sentinels.NotSetType]
timeout Optional[Union[int, roboto.sentinels.NotSetType]]

Return type

Trigger.wait_for_evaluations_to_complete()

wait_for_evaluations_to_complete(timeout=60 * 5, poll_interval=5)#View Source

Wait for all evaluations for this trigger to complete.

Throws a TimeoutError if the timeout is reached.

Parameters

timeout float

The maximum amount of time, in seconds, to wait for the evaluations to complete.

The amount of time, in seconds, to wait between polling iterations.

Return type

None

TriggerEvaluationCause

class roboto.domain.actions.TriggerEvaluationCause(*args, **kwds)#View Source

Bases: enum.Enum

The cause of a TriggerEvaluationRecord is the reason why the trigger was selected for evaluation.

Represents the specific event that caused a trigger to be evaluated for potential execution. Different causes may result in different trigger behavior or input data selection.

Attributes

TriggerEvaluationCause.DatasetMetadataUpdate

DatasetMetadataUpdate = 'dataset_metadata_update' #

Trigger evaluation caused by changes to dataset metadata.

TriggerEvaluationCause.FileIngest

FileIngest = 'file_ingest' #

Trigger evaluation caused by files being ingested into a dataset.

TriggerEvaluationCause.FileMetadataUpdate

FileMetadataUpdate = 'file_metadata_update' #

Trigger evaluation caused by file metadata or tag updates.

TriggerEvaluationCause.FileUpload

FileUpload = 'file_upload' #

Trigger evaluation caused by new files being uploaded to a dataset.

TriggerEvaluationCause.RecurringSchedule

RecurringSchedule = 'recurring_schedule' #

Trigger evaluation caused by a recurring schedule.

This cause is used internally by the Roboto system, to track the evaluation history of scheduled triggers. It should not be used when creating or updating triggers, and doing so will result in an error.

To create a trigger that invokes an action on a recurring schedule, use ScheduledTrigger.

TriggerEvaluationDataConstraint

class roboto.domain.actions.TriggerEvaluationDataConstraint(/, **data)#View Source

Bases: pydantic.BaseModel

An optional filtering constraint applied to the data considered by a trigger evaluation.

Each trigger evaluation considers data of a particular data source ID and data source type. Typically (and to start, exclusively), this is a dataset ID (and type Dataset).

In the naive case before the introduction of this class, trigger evaluation for a dataset with 20k files would have to scan each file. This constraint allows us to filter the data to a subset during evaluation, e.g. only evaluate files from dataset ds_12345 with upload ID tx_123abc

Parameters

data Any

Attributes

TriggerEvaluationDataConstraint.file_id

file_id str | None = None #

If set, only consider this file as part of trigger evaluation.

TriggerEvaluationDataConstraint.transaction_id

transaction_id str | None = None #

If set, only consider files from this upload.

TriggerEvaluationOutcome

class roboto.domain.actions.TriggerEvaluationOutcome(*args, **kwds)#View Source

Bases: enum.Enum

The outcome of a TriggerEvaluationRecord is the result of the evaluation. A trigger can either invoke its associated action (one or many times) or be skipped. If skipped, a skip reason is provided.

Attributes

TriggerEvaluationOutcome.InvokedAction

InvokedAction = 'invoked_action' #

TriggerEvaluationOutcome.Skipped

Skipped = 'skipped' #

TriggerEvaluationOutcomeReason

class roboto.domain.actions.TriggerEvaluationOutcomeReason(*args, **kwds)#View Source

Bases: enum.Enum

Context for why a trigger evaluation has its TriggerEvaluationOutcome

Attributes

TriggerEvaluationOutcomeReason.AlreadyRun

AlreadyRun = 'already_run' #

This trigger has already run its associated action for this dataset and/or file.

TriggerEvaluationOutcomeReason.ConditionNotMet

ConditionNotMet = 'condition_not_met' #

The trigger’s condition is not met.

TriggerEvaluationOutcomeReason.NoMatchingFiles

NoMatchingFiles = 'no_matching_files' #

In the case of a dataset trigger, there is no subset of files that, combined, match ALL of the trigger’s required inputs.

In the case of a file trigger, there are no files that match ANY of the trigger’s required inputs.

TriggerEvaluationOutcomeReason.TriggerDisabled

TriggerDisabled = 'trigger_disabled' #

The trigger is disabled.

TriggerEvaluationRecord

class roboto.domain.actions.TriggerEvaluationRecord(/, **data)#View Source

Bases: pydantic.BaseModel

Record of a point-in-time evaluation of whether to invoke an action associated with a trigger for a data source.

Parameters

data Any

Attributes

TriggerEvaluationRecord.cause

cause TriggerEvaluationCause | None = None #

TriggerEvaluationRecord.data_constraint

data_constraint TriggerEvaluationDataConstraint | None = None #

TriggerEvaluationRecord.data_source

TriggerEvaluationRecord.evaluation_end

evaluation_end datetime.datetime | None = None #

TriggerEvaluationRecord.evaluation_start

evaluation_start datetime.datetime #

TriggerEvaluationRecord.outcome

outcome TriggerEvaluationOutcome | None = None #

TriggerEvaluationRecord.outcome_reason

outcome_reason TriggerEvaluationOutcomeReason | None = None #

TriggerEvaluationRecord.status

TriggerEvaluationRecord.status_detail

status_detail str | None = None #

TriggerEvaluationRecord.trigger_evaluation_id

trigger_evaluation_id int #

TriggerEvaluationRecord.trigger_id

trigger_id str #

TriggerEvaluationStatus

class roboto.domain.actions.TriggerEvaluationStatus(*args, **kwds)#View Source

Bases: enum.Enum

When a trigger is selected for evaluation, a trigger evaluation record is created with a status of Pending. The evaluation can either run to completion (regardless of its outcome), in which case the status is Evaluated, or hit an unexpected exception, in which case the status is Failed.

Attributes

TriggerEvaluationStatus.Evaluated

Evaluated = 'evaluated' #

TriggerEvaluationStatus.Failed

Failed = 'failed' #

TriggerEvaluationStatus.Pending

Pending = 'pending' #

TriggerEvaluationsSummaryResponse

class roboto.domain.actions.TriggerEvaluationsSummaryResponse(/, **data)#View Source

Bases: pydantic.BaseModel

Response containing summary information about trigger evaluations.

Provides high-level statistics about trigger evaluation status, useful for monitoring and debugging trigger performance.

Parameters

data Any

Attributes

TriggerEvaluationsSummaryResponse.count_pending

count_pending int #

Number of trigger evaluations currently pending.

TriggerEvaluationsSummaryResponse.last_evaluation_start

last_evaluation_start datetime.datetime | None #

Timestamp of the most recent evaluation start, if any evaluations have occurred.

TriggerForEachPrimitive

class roboto.domain.actions.TriggerForEachPrimitive#View Source

Bases: roboto.compat.StrEnum

Defines the granularity at which a trigger executes.

Determines whether the trigger creates one invocation per dataset or one invocation per file within datasets that match the trigger conditions.

Attributes

TriggerForEachPrimitive.Dataset

Dataset = 'dataset' #

Execute one action invocation per dataset that matches the trigger conditions.

TriggerForEachPrimitive.DatasetFile

DatasetFile = 'dataset_file' #

Execute one action invocation per file in datasets that match the trigger conditions.

TriggerOnEvent

class roboto.domain.actions.TriggerOnEvent(/, **data)#View Source

Bases: pydantic.BaseModel

Properties specific to event-driven triggers.

Parameters

data Any

Attributes

TriggerOnEvent.additional_inputs

additional_inputs list[str] | None = None #

Optional additional file patterns to include.

TriggerOnEvent.causes

One or more events that cause the trigger to be evaluated.

TriggerOnEvent.condition

condition roboto.query.ConditionType | None = None #

Optional condition that must be met for trigger to fire.

TriggerOnEvent.for_each

Granularity of trigger execution.

TriggerOnEvent.required_inputs

required_inputs list[str] #

File patterns that must be present for trigger to fire.

TriggerOnSchedule

class roboto.domain.actions.TriggerOnSchedule(/, **data)#View Source

Bases: pydantic.BaseModel

Properties specific to scheduled triggers.

Parameters

data Any

Attributes

TriggerOnSchedule.invocation_input

Input specification for each scheduled invocation.

TriggerOnSchedule.next_occurrence

next_occurrence datetime.datetime | None = None #

Next scheduled invocation time.

TriggerOnSchedule.schedule

schedule str #

Recurring invocation schedule.

TriggerRecord

class roboto.domain.actions.TriggerRecord(/, **data)#View Source

Bases: pydantic.BaseModel

A wire-transmissible representation of a trigger.

Contains all the configuration and metadata for a trigger, including the target action, input requirements, conditions, and execution settings.

This is the underlying data structure used by the Trigger domain class to store and transmit trigger information.

Parameters

data Any

Attributes

TriggerRecord.action

Reference to the action that should be invoked.

TriggerRecord.additional_inputs

additional_inputs list[str] | None = None #

Optional additional file patterns to include.

TriggerRecord.causes

causes list[TriggerEvaluationCause] | None = None #

List of events that can cause this trigger to be evaluated.

TriggerRecord.compute_requirement_overrides

compute_requirement_overrides roboto.domain.actions.action_record.ComputeRequirements | None = None #

Optional compute requirement overrides.

TriggerRecord.condition

condition roboto.query.ConditionType | None = None #

Optional condition that must be met for trigger to fire.

TriggerRecord.container_parameter_overrides

container_parameter_overrides roboto.domain.actions.action_record.ContainerParameters | None = None #

Optional container parameter overrides.

TriggerRecord.created

created datetime.datetime #

Timestamp when the trigger was created.

TriggerRecord.created_by

created_by str #

User ID who created the trigger.

TriggerRecord.enabled

enabled bool = True #

Whether the trigger is currently active.

TriggerRecord.for_each

Granularity of trigger execution (Dataset or DatasetFile).

TriggerRecord.modified

modified datetime.datetime #

Timestamp when the trigger was last modified.

TriggerRecord.modified_by

modified_by str #

User ID who last modified the trigger.

TriggerRecord.name

name str #

Human-readable name for the trigger.

TriggerRecord.org_id

org_id str #

Organization ID that owns the trigger.

TriggerRecord.parameter_values

parameter_values dict[str, Any] = None #

Parameter values to pass to the action.

TriggerRecord.required_inputs

required_inputs list[str] #

File patterns that must be present for trigger to fire.

TriggerRecord.service_user_id

service_user_id str #

Service user ID for authentication.

TriggerRecord.timeout

timeout int | None = None #

Optional timeout override for action execution.

TriggerRecord.trigger_id

trigger_id str #

Unique identifier for the trigger.

TriggerRecord.validate_additional_inputs()

validate_additional_inputs(value)#View Source

Parameters

value Optional[list[str]]

Return type

Optional[list[str]]

TriggerRecord.validate_required_inputs()

validate_required_inputs(value)#View Source

Parameters

value list[str]

Return type

list[str]

TriggerSchedule

class roboto.domain.actions.TriggerSchedule(cron_string)#View Source

Utility for defining trigger schedules.

Parameters

cron_string str

TriggerSchedule.cron()

classmethod cron(cron_string)#View Source

Create a trigger schedule based on a Cron expression.

Parameters

cron_string str

A Cron expression like */30 * * * *.

Raises

ValueError

If the provided string is not a valid Cron expression.

Properties

TriggerSchedule.cron_string

cron_string str #

Cron string representing the schedule.

Return type: str

TriggerSchedule.daily()

classmethod daily()#View Source

Every day at midnight UTC.

Return type

TriggerSchedule.hourly()

classmethod hourly()#View Source

Every hour on the hour.

Return type

TriggerSchedule.monthly()

classmethod monthly()#View Source

Every 1st of the month at midnight UTC.

Return type

TriggerSchedule.weekly()

classmethod weekly()#View Source

Every Sunday at midnight UTC.

Return type

TriggerType

class roboto.domain.actions.TriggerType#View Source

Bases: roboto.compat.StrEnum

Types of triggers supported by the Roboto platform.

Attributes

TriggerType.EventDriven

EventDriven = 'event_driven' #

A trigger that invokes its target action in response to an event.

See TriggerEvaluationCause for the currently supported causes for event-driven triggers to be evaluated.

TriggerType.Scheduled

Scheduled = 'scheduled' #

A trigger that invokes its target action on a recurring schedule.

TriggerView

class roboto.domain.actions.TriggerView(/, **data)#View Source

Bases: pydantic.BaseModel

Unified data model for all Roboto trigger types.

Parameters

data Any

Attributes

TriggerView.action

Reference to the trigger’s target action.

TriggerView.compute_requirement_overrides

compute_requirement_overrides roboto.domain.actions.action_record.ComputeRequirements | None = None #

Optional compute requirement overrides.

TriggerView.container_parameter_overrides

container_parameter_overrides roboto.domain.actions.action_record.ContainerParameters | None = None #

Optional container parameter overrides.

TriggerView.created

created datetime.datetime #

Creation time for the scheduled trigger.

TriggerView.created_by

created_by str #

User who created the scheduled trigger.

TriggerView.enabled

enabled bool #

True if the trigger is enabled.

TriggerView.invocation_upload_destination

Optional default upload destination for action invocations.

TriggerView.modified

modified datetime.datetime #

Latest modification time for the scheduled trigger.

TriggerView.modified_by

modified_by str #

User who last modified this scheduled trigger.

TriggerView.name

name str #

Trigger name. Unique within an organization and trigger type.

TriggerView.on_event

on_event TriggerOnEvent | None = None #

Properties of triggers that fire on events (TriggerType.EventDriven).

TriggerView.on_schedule

on_schedule TriggerOnSchedule | None = None #

Properties of triggers that fire on a recurring schedule (TriggerType.Scheduled).

TriggerView.org_id

org_id str #

Organization ID which owns the scheduled trigger.

TriggerView.parameter_values

parameter_values dict[str, Any] | None = None #

Optional action parameter values.

TriggerView.service_user_id

service_user_id str #

Service user ID for authentication.

TriggerView.timeout

timeout int | None = None #

Optional invocation timeout, in minutes.

TriggerView.to_event_trigger_record()

to_event_trigger_record()#View Source

Convert this trigger view into a TriggerRecord if possible.

Returns

A TriggerRecord instance if self.trigger_type is TriggerType.EventDriven, otherwise None.

TriggerView.to_scheduled_trigger_record()

to_scheduled_trigger_record()#View Source

Convert this trigger view into a ScheduledTriggerRecord if possible.

Returns

A ScheduledTriggerRecord instance if self.trigger_type is TriggerType.Scheduled, otherwise None.

Attributes

TriggerView.trigger_id

trigger_id str #

Unique trigger ID.

TriggerView.trigger_type

trigger_type TriggerType #

Trigger type.

UpdateActionRequest

class roboto.domain.actions.UpdateActionRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to update an action.

Contains the changes to apply to an existing action. Only specified fields will be updated; others remain unchanged. Uses NotSet sentinel values to distinguish between explicit None values and unspecified fields.

Parameters

data Any

Attributes

UpdateActionRequest.compute_requirements

New compute requirements (CPU, memory).

UpdateActionRequest.container_parameters

New container parameters (image, entrypoint, etc.).

UpdateActionRequest.description

description str | roboto.sentinels.NotSetType | None #

New detailed description.

UpdateActionRequest.inherits

New action reference to inherit from.

UpdateActionRequest.metadata_changeset

Changes to apply to metadata (add, remove, update keys).

UpdateActionRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

UpdateActionRequest.parameter_changeset

Changes to apply to parameters (add, remove, update).

UpdateActionRequest.requires_downloaded_inputs

requires_downloaded_inputs bool | roboto.sentinels.NotSetType #

Whether to download input files before execution.

UpdateActionRequest.short_description

short_description str | roboto.sentinels.NotSetType | None #

New brief description (max 140 characters).

UpdateActionRequest.timeout

timeout int | roboto.sentinels.NotSetType | None #

New maximum execution time in minutes.

UpdateActionRequest.uri

New container image URI.

UpdateActionRequest.validate_uri()

validate_uri(v)#View Source

UpdateInvocationStatus

class roboto.domain.actions.UpdateInvocationStatus(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to update an invocation’s status.

Used to record status changes during invocation execution, such as transitioning from Queued to Running to Completed.

Parameters

data Any

Attributes

UpdateInvocationStatus.detail

detail str #

Additional detail about the status change.

UpdateInvocationStatus.status

The new status for the invocation.

UpdateScheduledTriggerRequest

class roboto.domain.actions.UpdateScheduledTriggerRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to update a scheduled trigger.

See update() for details on the request attributes.

Parameters

data Any

Attributes

UpdateScheduledTriggerRequest.action_name

action_name Annotated[str, pydantic.Field(pattern='[\\w\\-]+')] | roboto.sentinels.NotSetType #

UpdateScheduledTriggerRequest.action_owner_id

action_owner_id str | roboto.sentinels.NotSetType #

UpdateScheduledTriggerRequest.compute_requirement_overrides

UpdateScheduledTriggerRequest.container_parameter_overrides

UpdateScheduledTriggerRequest.enabled

UpdateScheduledTriggerRequest.invocation_input

UpdateScheduledTriggerRequest.invocation_upload_destination

UpdateScheduledTriggerRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

UpdateScheduledTriggerRequest.parameter_values

parameter_values dict[str, Any] | None | roboto.sentinels.NotSetType #

UpdateScheduledTriggerRequest.schedule

UpdateScheduledTriggerRequest.timeout

timeout Annotated[int, pydantic.Field(ge=0)] | None | roboto.sentinels.NotSetType #

UpdateTriggerRequest

class roboto.domain.actions.UpdateTriggerRequest(/, **data)#View Source

Bases: pydantic.BaseModel

Request payload to update an existing trigger.

Contains the changes to apply to a trigger. Only specified fields will be updated; others remain unchanged. Uses NotSet sentinel values to distinguish between explicit None values and unspecified fields.

Parameters

data Any

Attributes

UpdateTriggerRequest.action_digest

action_digest str | roboto.sentinels.NotSetType | None #

New specific version digest of the action.

UpdateTriggerRequest.action_name

action_name str | roboto.sentinels.NotSetType #

New action name to invoke.

UpdateTriggerRequest.action_owner_id

action_owner_id str | roboto.sentinels.NotSetType #

New organization ID that owns the target action.

UpdateTriggerRequest.additional_inputs

additional_inputs list[str] | roboto.sentinels.NotSetType | None #

New additional file patterns to include.

UpdateTriggerRequest.causes

New list of events that can cause trigger evaluation.

UpdateTriggerRequest.compute_requirement_overrides

New compute requirement overrides.

UpdateTriggerRequest.condition

New condition that must be met for trigger to fire.

UpdateTriggerRequest.container_parameter_overrides

New container parameter overrides.

UpdateTriggerRequest.enabled

New enabled status for the trigger.

UpdateTriggerRequest.for_each

New execution granularity (Dataset or DatasetFile).

UpdateTriggerRequest.model_config

model_config #

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

UpdateTriggerRequest.parameter_values

parameter_values dict[str, Any] | roboto.sentinels.NotSetType | None #

New parameter values to pass to the action.

UpdateTriggerRequest.required_inputs

required_inputs list[str] | roboto.sentinels.NotSetType #

New list of required file patterns.

UpdateTriggerRequest.timeout

timeout int | roboto.sentinels.NotSetType | None #

New timeout override for action invocations.

UploadDestinationType

class roboto.domain.actions.UploadDestinationType(*args, **kwds)#View Source

Bases: enum.Enum

Type of upload destination for invocation outputs.

Defines where files generated by action invocations should be uploaded. Currently supports datasets as the primary destination type.

Attributes

UploadDestinationType.Dataset

Dataset = 'Dataset' #

Outputs will be uploaded to a dataset. This is the default.

UploadDestinationType.Unknown

Unknown = 'Unknown' #

The output destination is unknown.

This destination type exists for compatibility between different versions of the Roboto SDK and the Roboto service backend. It should not be used directly in action invocation requests. If you encounter it in an SDK response, consider upgrading to the latest available SDK version.

Was this page helpful?