---
title: Actions
sidebar:
  order: 13
---
## Overview

An **action** is a containerized function, packaged as a Docker image, that runs on Roboto's managed compute infrastructure. Actions are the workhorse of repeatable data processing in Roboto.

Actions ingest raw log files into Roboto's data model and post-process that data after ingestion. An action can work with raw files downloaded from a dataset, or read already-ingested topic data as structured records without downloading the original files. Actions can also write results back to a dataset, add tags and metadata, and create events.

Actions range from simple scripts to sophisticated transformations. Roboto ships with a library of ready-to-use actions for common robotics workflows, and you can build and deploy your own.

Actions complement [agents](/docs/learn/ai): an action runs your own containerized code deterministically, while an agent applies AI judgment using Roboto's built-in tools. Reach for an action when the job is repeatable data processing — ingestion, transformation, report generation. Reach for an agent when the work needs analysis, search, or judgment.

## The Action Hub

The [Action Hub](https://app.roboto.ai/actions/hub) is Roboto's catalog of actions. It includes ingestion actions for ROS, PX4, Ardupilot, and other supported formats, along with analysis and utility actions.

Your organization's deployed actions are available from the Actions page in the Roboto web UI.

## Action lifecycle

A typical workflow:

1. **Develop** — Write your action code and define its configuration in `action.json`. `roboto actions init` scaffolds a new action project.
2. **Test locally** — Use `roboto actions invoke-local` to run your action against real data without deploying.
3. **Deploy** — Build and push your Docker image, then register the action with your Roboto organization using `roboto actions create` or the generated `deploy.sh` script.
4. **Invoke** — Run the action on hosted compute, either manually or automatically via a trigger.
5. **Monitor** — Follow live logs and check invocation status as it runs.

See the [Process Data with Actions](/docs/user-guides/process-data-actions) user guide for a step-by-step walkthrough, or [Create Your Own Action](/docs/user-guides/process-data-actions/creating-your-own-action) to build and deploy a custom action. Example actions are also available on [GitHub](https://github.com/roboto-ai/roboto-example-action).

## Configuring an action

Each action is defined by an `action.json` file that specifies its name, description, parameters, compute requirements, and more. See the [Action Configuration](/docs/reference/action-json) reference for the complete schema.

**Parameters** customize an action's behavior at invocation time without changing its code: for example, a signal threshold, a topic name, or an output format. Parameters can be required or optional and can have default values.

**Compute requirements** set the CPU, memory, and storage allocated to each invocation. See the [Compute](/docs/learn/compute) page for available options and how usage is measured.

## Invocations

An **invocation** is a single execution of an action. When an action is invoked, Roboto:

1. Provisions an isolated container with the requested compute resources.
2. Downloads input files into the container's workspace (if `requires_downloaded_inputs` is enabled).
3. Runs the action's entrypoint, passing in dataset context and any parameter values.
4. Streams container logs in real time.
5. Uploads any files written to the action's output directory back to the dataset.
6. On exit, shuts down the container and records the final status.

Each invocation has a unique identifier prefixed with `iv_`.

To monitor an invocation:

```bash
# Check status
roboto invocations status <invocation_id>

# Stream live logs
roboto invocations logs --tail <invocation_id>
```

See the [roboto invocations CLI](/docs/reference/cli#roboto-invocations) for the full list of commands.

## Triggers

A **trigger** is a rule that automatically responds to activity in your Roboto organization. A trigger fires on one or more **platform events** — a file finishing ingestion, an invocation failing, a dataset gaining a tag — optionally filters them with a **condition**, and when a platform event matches, runs its **targets**: invoke an action, start an [agent](/docs/learn/ai), or send a Slack message. Triggers are the primary way to build automated data pipelines in Roboto. For example, you can ingest every log file as it is uploaded, run a diagnostic action whenever a file finishes ingestion, or have an agent investigate every failed invocation.

Triggers created under Roboto's earlier trigger model are migrated to this model automatically; you don't need to recreate them.

### Platform events

A **platform event** describes something that happened to your data or workloads. A trigger fires only for the platform event types it subscribes to. Platform events are distinct from [events](/docs/learn/concepts#events-section), the time-anchored annotations you place on your data; see [Key Terms](/docs/learn/concepts#platform-events-section). Platform events cover:

- **Files** — a file was uploaded, finished ingestion, or had its tags or metadata changed. Use *file ingested* when your processing reads ingested topic data rather than raw files.
- **Datasets** — a dataset was created, had its metadata updated, gained a tag, or completed an upload batch.
- **Invocations** — an action invocation completed or failed. Useful for chaining processing steps or alerting on failures.
- **Events** — an [event](/docs/learn/concepts#events-section) was created on your data, for example by an action that flags anomalies.

A trigger can subscribe to several platform event types at once, as long as they are about the same kind of entity and its condition and targets make sense for all of them. In the web UI, the *When should this trigger run* section picks one entity (e.g. a file) and the changes to watch on it. The web UI offers every platform event type except *event created* on a dataset, which you subscribe to with `--on` on `roboto triggers create`.

A trigger can instead fire on a **schedule**: a cron expression evaluated in UTC, such as `0 9 * * 1` for 09\:00 every Monday. A schedule-fired trigger has no platform event to condition on, so it runs its targets on every scheduled minute; an action target selects its inputs with a query (files or topics matching a RoboQL expression) rather than file patterns. Minutes missed while the scheduler is unavailable are skipped rather than run late, and a trigger whose action has been deleted is disabled after the failed run so it stops failing every minute.

### Conditions

A trigger can specify a **condition** that must hold before it fires. Conditions are evaluated against the entities involved in the platform event, addressed by context: dataset fields as `dataset.*`, file fields as `file.*`, invocation fields as `invocation.*`, and so on. For example, a trigger can fire only when `dataset.tags` contains `production`, or when a metadata field on the file matches a given value.

The *Conditions* field in the web UI's *When should this trigger run* section covers the common case: each row is one requirement on a field of the watched entity, or of an entity the platform event carries with it, such as a file's dataset or an invocation's action, and every row must match. A row can require a field to be any of several values, or none of them. A condition that needs OR across rows, or nesting, is written as JSON and passed to the CLI with `--condition-json`. To see what a given platform event type makes available to a condition, ask for a sample:

```bash
# Every field path a file-ingested platform event exposes
roboto triggers sample file.ingested --paths

# The whole sample platform event, fully dereferenced
roboto triggers sample invocation.failed
```

### Targets

A **target** is what a trigger does when a platform event matches its subscription and condition. A trigger can have one target or several, and each runs independently:

- **Invoke action** — run an action, just as if you invoked it manually, and set parameter values and compute overrides per trigger. When the platform event names a dataset, as every file and dataset event does, the action runs against that dataset, and its *required inputs* glob patterns (for example `'**/*.bag'`, or `'**/*'` for any file) decide when it runs: an action that works on the file that fired the trigger runs only for a file matching one of them, and an action that works on the whole dataset waits for them, as [Required inputs](#required-inputs-section) describes. When the platform event names no dataset (an invocation completing or failing, an event created, or a schedule), there are no dataset files to match, so the target selects the action's inputs itself: files, topics or sessions, given by id or matched by a RoboQL query, and the id or the query can come from the platform event.
- **Start agent** — launch one of your organization's agents with inputs filled in from the platform event, using placeholders such as `{{dataset.dataset_id}}`.
- **Send Slack message** — post a templated message to a connected Slack channel, for example to announce a failed invocation or a newly ingested dataset.

From the command line, `roboto triggers create --targets-json` takes one target spec or a list of them, each discriminated on `type` (`invoke_action`, `start_agent`, or `send_slack_message`):

```bash
roboto triggers create \
    --name investigate-failures \
    --on invocation.failed \
    --once-per invocation \
    --targets-json '[{"type": "start_agent", "target_id": "investigate", "agent_id": "ag_abc123"}]'
```

An invoke-action target's own input selection lives in that same spec, under `invocation_input` — how the target gets its inputs when the platform event names no dataset, and a way to select inputs by query when it does. When the platform event names a dataset, what the action receives depends on what it works on:

- The file that fired the trigger: that file, the files matching the target's *additional inputs* patterns, and anything `invocation_input` selects.
- The whole dataset: the files matching the target's *additional inputs* patterns and anything `invocation_input` selects, or, when the target sets no `invocation_input`, the files matching its required inputs and additional inputs.

The web UI edits `invocation_input` as the action's *Input data*. From the command line it looks like this:

```bash
roboto triggers create \
    --name review-flagged-events \
    --on event.created \
    --once-per event \
    --targets-json '[{"type": "invoke_action", "target_id": "review", "action": {"name": "review-event"}, "invocation_input": {"files": {"query": "tags CONTAINS \"{{event.name}}\""}}}]'
```

An input `query` is a [RoboQL](/docs/roboql/overview) expression, and a placeholder in one has to sit inside a quoted value. Roboto fills a placeholder in with data — a dataset id, a file path — never with a piece of the query itself, so a placeholder left outside the quotes is refused when you save the trigger, with a message naming it. Write the placeholder where you would write the value:

```bash
roboto triggers create \
    --name scan-uploaded-bags \
    --on dataset.upload_completed \
    --once-per dataset \
    --targets-json '[{"type": "invoke_action", "target_id": "scan", "action": {"name": "scan-bags"}, "invocation_input": {"files": {"query": "dataset_id = \"{{dataset.dataset_id}}\" AND path LIKE \"%.bag\""}}}]'
```

That is `dataset_id = "{{dataset.dataset_id}}"`, not `dataset_id = {{dataset.dataset_id}}`. Either quote character works, and Roboto escapes the value into the quotes for you, so a file path or tag that itself contains a quote narrows the query rather than breaking it. Placeholders outside a `query` — in an id, a parameter value, an agent prompt, a Slack message — need no quoting and take the value as it is.

#### Required inputs [#required-inputs-section]

When an action target works on the whole dataset — once per dataset, or any trigger on a dataset platform event — Roboto checks the dataset's files against its required inputs each time a subscribed platform event arrives. Only files that have finished uploading count.

- Every required-inputs pattern needs a file of its own. Roboto reads the dataset's files one at a time and counts each toward the first pattern, in the order you listed them, that it matches and that has no file yet, so patterns that overlap each need a separate file: with `'**/*.mcap'` and `'logs/**'`, `logs/run.mcap` on its own satisfies just one of them. Which pattern a file counts toward can also depend on the order Roboto reads the files in, so overlapping patterns can keep waiting even when there are enough files. Use patterns that don't overlap.
- On a *file ingested* platform event, each pattern is instead checked on its own, so one file can satisfy several, and every file matching a pattern must also have finished ingestion.

If the check fails, the action doesn't run, and the next platform event checks again. On a once-per-dataset trigger, once the action has run for a dataset, a file added later doesn't run it again. Only action targets check required inputs: agent and Slack targets on the same trigger don't wait.

### Fire once per

The **fire once per** setting controls how often a trigger fires for related platform events, so retries and re-deliveries don't run your targets twice:

- **File** — at most once per matching file, even if the same file is uploaded again. Use this when your target processes individual files.
- **Dataset** — at most once per dataset. Use this when your target operates on the dataset as a whole; an action target waits for its [required inputs](#required-inputs-section).
- **Invocation**, **Event** — at most once per invocation or event.
- **Occurrence** — every time, with nothing collapsed. A re-upload of the same file is a new occurrence; on a file platform event, an action target works on that file, as it does once per file.

Which settings are available depends on the subscribed platform events. From the command line, set `--once-per` on `roboto triggers create`.

### Testing a trigger

`roboto triggers dry-run` explains, gate by gate, whether a trigger would fire for a specific piece of data, without running anything. Name a dataset, file, invocation, or event, and Roboto walks through every gate the trigger would apply: subscription, enabled state, each condition clause with the actual values it saw, and each target's own checks.

```bash
roboto triggers dry-run my-trigger --dataset-id ds_abc123
roboto triggers dry-run my-trigger --file-id file_abc123 --on file.ingested
```

Pass exactly one of `--dataset-id`, `--file-id`, `--invocation-id`, or `--event-id`; a schedule-fired trigger takes no entity at all, and `--scheduled-for` picks which minute to pretend it fired at instead of its next one. `--on` picks which of the trigger's subscribed platform events to synthesize; it defaults to the first one compatible with the entity you named. Use this to debug why a trigger did or didn't fire.

### Dispatch history

Each time a trigger fires a target, Roboto records a **dispatch**: which platform event matched, which target ran, whether it succeeded, and a link to the result — the invocation, agent thread, or message.

### Example: post-ingestion analysis

A common pattern is to run an analysis action automatically after ingestion completes. Subscribe a trigger to the *file ingested* platform event with an invoke-action target, and the action can read topic data as a structured dataframe without downloading the raw log file. Fire it once per file to analyze each file as it finishes ingestion, or once per dataset to analyze the dataset once, when every matching file that has finished uploading has also finished ingestion. A file still uploading at that point isn't waited for, and doesn't run the action again later.

### Managing triggers

Create and manage triggers from the Triggers page in the Roboto web UI, or from the CLI:

```bash
roboto triggers list
roboto triggers get my-trigger
roboto triggers enable my-trigger
roboto triggers disable my-trigger
roboto triggers delete my-trigger
```

See the [roboto triggers CLI](/docs/reference/cli#roboto-triggers) reference for the full list of commands.
