> For the complete documentation index, see [llms.txt](https://docs.rumi.systems/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rumi.systems/rumi-management/guides/admin/executing-scripts.md).

# Executing Scripts

This guide covers running deployment scripts from the Rumi Admin web interface.

## Overview

Rumi Admin provides a visual interface for executing deployment scripts defined in a system's XAR. Scripts are executed through the connected Rumi Agent's REST API.

## Listing Available Scripts

When you select a system in the Admin UI, the available scripts are retrieved from the Agent via `GET /system/scripts?systemName=<systemName>`. Each script includes:

* Script name.
* Parameter definitions (names, types, descriptions).
* Script description.

## Running a Script

To execute a script:

1. Select the target system.
2. Select the target agent (if connected to multiple agents).
3. Choose the script to execute.
4. Fill in any required parameters.
5. Submit the execution request.

The Admin UI invokes the Agent's `POST /invoke/script` endpoint with the script details and parameters.

## Monitoring Execution

After submitting a script execution:

* The UI displays the execution status (Pending, Running, Success, or Aborted).
* Execution output is displayed as the script progresses.
* The execution UUID is shown for tracking purposes.

## Cancelling Execution

To cancel a running script:

1. Click the cancel action in the execution status view.
2. The Admin UI sends a `POST /invoke/cancel?uuid=<executionUUID>` request to the Agent.

{% hint style="info" %}
Script execution is serialized by the Agent — only one script or command runs at a time. Subsequent submissions are queued until the current execution completes.
{% endhint %}

## Invoking Application Commands

In addition to deployment scripts, the Admin UI supports invoking application commands:

1. Select a system and application.
2. Choose from the available application commands (discovered dynamically from the deployed application).
3. Provide any required parameters.
4. Submit the command invocation.

Application commands are executed via the Agent's `POST /app/command/invoke` endpoint.
