Runbooks Overview
Last updated: 2026-09-30
This page explains the feature that runs and manages routine procedures, such as incident response and routine operations, automatically as a series of steps that you define in advance.
Overview
Runbooks in Lorel.ai let you automate operations workflows by combining command execution, script execution, external API calls, cloud operations, approval flows, conditional branches, and more.
A Runbook you create has one of three statuses: [Draft], [Active], or [Inactive]. Only an Active Runbook can run.
A Runbook can start in several ways: a user runs it manually, or it starts automatically, for example from an incident policy.
- Step definitions. Combine shell commands, scripts such as Python and Bash, external APIs, cloud operations, notifications, and approvals.
- Execution control flow. Runbooks support conditional branches, retry loops, loops over a list, parallel execution, and waiting for a condition.
- Safe operations by design. Runbooks have built-in manual approval steps, automatic recovery when a step fails (jump, skip, or stop), and limits that prevent runaway execution.
What you can do
The following table lists the main features and operations of Runbooks, and the project roles that you need.
| Feature or operation | Description | Required role |
|---|---|---|
| Define steps | Define a procedure by combining a wide range of steps, such as commands, scripts (Python, Bash, and others), external API calls, cloud operations, and notifications. | Project Administrator / Editor |
| Build control flow | Control the order of execution flexibly with conditional branches, retry loops, loops over a list, parallel execution, and waiting for a condition. | Project Administrator / Editor |
| Automate cloud operations | Run management API operations on your cloud environment directly, without a bastion server. | Project Administrator / Editor |
| Set up approval flows, and approve or reject | Specify an approver before an important step to require approval before it runs (this includes approving and rejecting). | Setting it up: Project Administrator / Editor. Approving and rejecting: the designated approver (Project Administrator / Editor) |
| Pass variables and outputs | Pass the results (output values) of earlier steps and the variables you define to later steps, and reference them there. | Project Administrator / Editor |
| Test run | Verify step settings and variable passing in advance, without changing your actual environment in principle, by using mock responses. Commands and scripts aren’t run, but a read-only reachability check of the target instance is actually performed, and if it fails, the test run fails (for the exceptions, see the test-run item under Limitations later on this page). | Project Administrator / Editor / Worker (for a Runbook that includes a cloud action, only when execution is allowed for Workers) |
| Run manually and cancel an execution | Run an Active Runbook immediately from the screen, or cancel a running execution. | Project Administrator / Editor / Worker (for a Runbook that includes a cloud action, running requires that execution is allowed for Workers. Cancelling is always possible) |
| Retry or skip manually | Retry or skip a step that is paused because of an error or a rejected approval, so that the execution continues. | Project Administrator / Editor / Worker (for a Runbook that includes a cloud action, only when execution is allowed for Workers) |
| Manage the lifecycle | Move Runbooks through their lifecycle: create drafts, activate and deactivate, clone, and delete. | Create, edit, activate, clone, and delete: Project Administrator / Editor. Deactivate and move back to draft: Project Administrator / Editor / Worker |
The lifecycle of a Runbook
A Runbook is managed with three statuses.
[Draft] → [Active] ⇄ [Inactive], [Inactive] → [Draft]
- Draft. The Runbook is being created or edited and can’t run yet (the state saved with [Save as Draft]).
- Active. The Runbook is available. It can be run manually or started automatically (the state saved with [Save and Activate]).
- Inactive. The Runbook is temporarily disabled. You can’t start a new execution (past execution history is kept). From Inactive, you can activate it again or move it back to draft.
You can’t delete an Active Runbook. To delete it, deactivate it first.
How an execution starts
A Runbook execution starts from one of the following.
| Starting point | Description |
|---|---|
| Manual run | A user starts it explicitly with the [Run] button on the screen. |
| Automatic start from an incident | If you set the Runbook as the default Runbook in an incident policy, it starts automatically when a new incident is created. You can’t set a default Runbook and automatic AI agent execution on the same incident policy at the same time. For details, see Rules Overview. |
| Automatic start from Tasks | If a Runbook is linked to a recurring task that you created in Tasks, an Active Runbook starts when the task is generated automatically. |
| Approval of an AI agent’s proposal | It starts when the person in charge approves, on the screen, a Runbook that an AI agent (a custom agent) proposed as a result of analyzing an incident. For details, see AI Agents Overview. |
| A child execution from control flow | It starts automatically as a child execution from parallel execution or from a step that calls a sub-Runbook. |
How to read and use the Runbooks list
When you open [Runbooks] in the sidebar, the list shows every Runbook registered in the project.
The operation area at the top of the screen
Use the bar at the top of the screen to filter and search Runbooks and to create a new one.
| Element | Description |
|---|---|
| Status switch | Select [All], [Draft], [Active], or [Inactive] to show only the Runbooks with that status. |
| Tag filter | Select a tag from the [Tags] drop-down ([Select tags]) to filter the Runbooks that have that tag. If you select multiple tags, the Runbooks that have any of them are shown. |
| Search by Runbook name | Enter a keyword to search Runbook names by partial match. |
| [Create Runbook] | Opens the screen for creating a new Runbook. |
The columns of the list
When you select a row in the list, the detail screen of that Runbook opens. Each column shows the following information.
| Column | What it shows | Sortable |
|---|---|---|
| Status | The current status ([Active], [Inactive], or [Draft]) as a color-coded badge. | Yes |
| [Runbook Name] | The name of the Runbook and its tags (for example, db, production, critical). The first 3 tags are shown, and the rest appear only as a +N count. | No |
| Last Run | The result of the most recent execution as a color-coded badge ([Succeeded], [Not completed], [Cancelled], or [In progress]. ”-” if there is no execution yet). Paused and failed executions appear as [Not completed], and running, awaiting-approval, and “Cancelling…” executions appear as [In progress]. | No |
| Typical Duration | The standard expected time that you set in [Basic Info] (for example, 30 minutes). | No |
| Success Rate | The success rate based on completed executions. | Yes |
| Executions | The number of completed executions. | Yes |
| Last Executed | How long ago the last execution completed (for example, 10 days ago). If there is no completed execution yet, [Never executed] appears. | Yes |
| Updated At | How long ago the Runbook was last updated (for example, 100 days ago). | Yes |
The number of executions, the success rate, and the last executed date are calculated from completed executions only. They exclude test runs, child executions started from a sub-Runbook or parallel execution, and cancelled or failed executions.
The [Last Run] badge, on the other hand, shows the state of the most recent execution as it is. This includes test runs, child executions, and failed or cancelled executions. The [Cancelled] badge is the same state that the Execution Detail screen shows as “Cancelled.”
Note: To sort by a sortable column, select the ↑↓ icon in the column header to switch between ascending and descending order.
How to create a Runbook
To create a new Runbook, open [Runbooks] in the sidebar, and then select [Create Runbook] in the upper-right corner of the screen.
The creation screen has three tabs: [Basic Info], [Knowledge], and [Steps]. You can select [Save as Draft] or [Save and Activate].
Set the basic information (required)
Set the basics of the Runbook, such as its name, description, time constraints, and tags.
| Setting | Type | Description and what to enter |
|---|---|---|
| Name | Required (up to 255 characters) | Enter the name of the Runbook (for example, Database failure response procedure). |
| Description | Optional (up to 4,000 characters) | Enter the purpose of the Runbook, the target system, and the conditions that trigger it, in concrete terms. If you link a Runbook to an AI agent, the agent refers to this description as an important cue when it decides which Runbook to propose. |
| Typical Duration (minutes) | Optional | Enter the standard expected time for a run, in minutes (for example, 30). |
| Max Execution Time (minutes) | Optional | Set the time limit for the whole execution, in minutes. If an execution is still running or paused after this time, it ends automatically as failed (an execution that was awaiting approval when the time limit was reached isn’t subject to this failure, even later). If you leave it empty, there is no limit. |
| Tags | Optional (up to 50) | Enter tags for classification and search, and add each one with Enter or a comma (,). |
How to write a clear description (a guide for AI agents and operators)
Select [Writing guide] next to the description field to see a guide on how to write it.
- Purpose & action. Write what the procedure is for and what it does. (For example, it restarts the target to restore the service; when the disk is running out of space, it moves old logs aside to free up space.)
- Target & environment. Identify the target system and environment by their specific names. (For example, the production Aurora (MySQL) cluster; the web servers (EC2) in the staging environment.)
- Trigger & thresholds. Write when to use it, with concrete numbers. (For example, when CPU utilization stays above 90% for 10 minutes or more; when replica lag continues for 5 minutes or more.)
- When not to use it. Write the conditions under which not to use it, and how it differs from similar procedures. (For example, it isn’t used when the lag is less than 5 minutes; it doesn’t apply to the staging environment.)
- Results & side effects. Write what happens after it runs, including effects that can’t be undone. (For example, the service is unreachable for a few minutes during the restart; deleted data can’t be restored.)
Write in the active voice and present tense, with a clear subject, as objective facts (avoid imperatives). Don’t write commands or individual work steps in the description. Put them in [Steps] or [Knowledge].
Set the knowledge (optional)
You can record detailed operating procedures, troubleshooting notes, and configuration notes for the Runbook in Markdown (up to 20,000 characters).
You can switch between two editing modes at any time from the link below the input area.
- Switch to rich editor. Edit as rich text, where you can see formatting such as headings, bold text, and lists as you type.
- Switch to simple editor. Edit directly as plain Markdown text without formatting.
Set the steps (at least one is required to activate)
Define the series of processing steps that the Runbook actually runs. If you only save it as a draft, you can save it with no steps.
When a new Runbook doesn’t have any steps yet, select [Add Step] in the center of the screen to add one. After you add a step, tabs to switch between [Step list] and [Flow diagram] appear at the top of the screen, and you can switch to the view you prefer to check the structure at any time.
Working with step cards and reordering
On each step card that you add, you can do the following.
- Reorder the steps. Hover over the drag handle on the left of the card, and then drag and drop it up or down.
- Collapse and expand. Select the chevron icon on the right of the card (pointing down when expanded, pointing right when collapsed) to open or close its settings.
- Delete a step. Select the trash icon in the upper-right corner of the card.
Basic fields common to all steps
- Type (required). Select the type of step you want to run from the drop-down list.
- Step Name (required). Enter a name for the step. You can use only letters (a-z, A-Z), digits, underscores, and hyphens, and the name must be unique in the Runbook (for example, check_db_process). Later steps use it as the key when they reference the output. Avoid hyphens, because an expression treats a hyphen as a minus sign.
- Description (optional). Enter what the step does and why.
Execution control common to all steps
When you expand “Execution control” under “Advanced settings” on a step card, you can set a time limit for each step and automatic recovery for errors.
| Setting | Type | Description and what to enter |
|---|---|---|
| Timeout (seconds) | Optional | Set the maximum run time of each step, in seconds (1 to 300 seconds, up to 5 minutes). Command and Script steps accept only 30 to 300 seconds, to make sure that the processing finishes safely. You can set it on Command, Script, API Call, and Cloud Action steps. You can’t set it on Delay, Approval, Notification, Set Variable, and Condition steps, or on Retry Loop, For Each, Parallel Group, Wait For Condition, and Call Sub-Runbook steps. |
| Retry Count | Optional | Set how many times the step is retried automatically when it fails (default: 0). A Cloud Action step isn’t retried automatically when it fails, even if you set a retry count. This field isn’t shown for Retry Loop, For Each, Parallel Group, Wait For Condition, and Call Sub-Runbook steps. |
| On Failure | Required (drop-down) | Select what happens when the step still fails after reaching the retry limit. [Stop] pauses the execution and waits for a user to step in (a manual retry or skip). This is the default and the safest behavior. [Skip] ignores the error, skips this step, and continues with the next step. [Jump to step] jumps to another recovery step that you specify in advance. |
Rules for jumping to a step
When you select [Jump to step] for [On Failure], the behavior depends on where the jump target is.
- When the target is after the current step. All the steps that haven’t run yet between the failed step and the target are skipped automatically, and processing continues from the target step.
- When the target is the current step or before it. The range from the target to the current step runs again as a recovery loop.
- When the target step can’t be found (a safety measure). If the target setting is invalid, Lorel.ai automatically treats it as [Stop], to prevent unexpected behavior.
List of step types
In Runbooks, you build a workflow by freely combining steps that fit your purpose and role. The step type drop-down on the screen shows all the types in a single list. This page groups them by purpose.
Action and integration steps
These steps perform actual operations and checks on EC2 instances, cloud environments, and external services.
| Step type | What it does and how to use it |
|---|---|
| Command | Runs one shell command on a connected Amazon EC2 instance (with the SSM Agent installed). You can extract the exit code and the standard output (with JSONPath). |
| Script | Runs a multi-line Bash, Python, PowerShell, or Ruby script on a connected Amazon EC2 instance (with the SSM Agent installed). |
| API Call | Calls an external web API (HTTPS) with GET, POST, PUT, PATCH, or DELETE, and gets the response. |
| Cloud Action | Runs one management API operation on the connected cloud. You can build in operations such as restarting a managed database or viewing logs, without a bastion server. The supported cloud is AWS. |
Communication and approval steps
These steps notify the people who operate the system, and make a decision before an important step runs.
| Step type | What it does and how to use it |
|---|---|
| Notification | Sends an in-app notification (Jinja2 templates are supported) to the project members or roles that you specify. By default it also arrives by email when the in-app notification is created, but it doesn’t arrive by email if the recipient turned off that type of notification or email forwarding in their notification settings. Sending to Slack, Teams, or PagerDuty isn’t supported. |
| Approval | Waits for approval from a role you specify (Project Administrator or Editor) or from a specific member. You can set automatic approval, automatic rejection, or escalation for when the wait times out. |
Control flow and variable steps
These steps control branching, repetition, parallel processing, and passing variables between steps. Retry Loop, For Each, and Parallel Group steps run other steps (inner steps) that you place inside their frame. The types of steps you can place inside have the following limits.
- Retry Loop and For Each. You can place only Command, Script, API Call, Set Variable, Notification, Cloud Action, Call Sub-Runbook, and Condition steps.
- Parallel Group branches. You can place only Command, Script, API Call, Notification, Delay, and Wait For Condition steps.
| Step type | What it does and how to use it |
|---|---|
| Delay | Waits for the number of seconds you specify, and then moves to the next step (up to 300 seconds). |
| Set Variable | Evaluates a Jinja2 expression and saves or updates the result as a variable (ctx.<variable name>) that later steps can use. |
| Condition | Evaluates the conditions you set from the top, and moves to the branch target of the first one that matches (if none match, it moves to the step set in [Default Target (when no choice matches)] if you set one, and otherwise to the next step). |
| Wait For Condition | Polls the API Call step that it references at regular intervals (5 to 900 seconds), and waits until the condition you specify matches (up to 24 hours). The referenced API call must use GET. |
| Retry Loop | Repeats the series of steps you specify at intervals, until the success condition matches (up to 10 times). Use it, for example, to repeat a check and a restart until a health check passes. |
| For Each | Runs the series of steps you specify one after another for each item in a list (array) (up to 100 items). Use it, for example, to apply the same procedure to multiple servers one at a time. |
| Parallel Group | Runs multiple branches (independent processes) at the same time, and moves to the next step after all of them finish (up to 10 branches). By default, when any branch fails, the other branches are cancelled immediately (fail-fast). |
| Call Sub-Runbook | Calls and runs another Active Runbook that you already created. It suits reusing common procedures as building blocks. |
Using outputs and variables between steps
You can insert the execution results of earlier steps and the variables you set in advance into input fields of later steps, such as message bodies and conditional expressions, and use them dynamically.
Later steps can reference the execution result of each step in the form steps.<step name>.<item name>, and the variables you set so far in the form ctx.<variable name>. The two differ in nature.
- Step output (
steps.*). Once it is recorded, the value is kept and isn’t overwritten later. However, when a jump on failure goes back to that step and runs it again, the previous output is discarded and the new result is recorded.- In a notification body, write it like
{{ steps.check_process.stdout }}. - In a condition, write it like
steps.check_db.exit_code == 0.
- In a notification body, write it like
- Variables (
ctx.*). By running a Set Variable step several times, you can assign a new value to a variable with the same name and overwrite or update it repeatedly.- In a retry condition, write it like
ctx.retry_count < 3.
- In a retry condition, write it like
Rules for passing outputs and variables out of control flow steps
For control flow steps that have inner steps inside a frame, whether later steps can use the execution results and variables of the inner steps depends on the type.
- For Each. Access the item being processed with
{item}(the current value) and{index}(the zero-based position). If you use{item}in a Command or Script step, the value can contain only letters, digits, and the characters _ - . / : = + @ , (no spaces); otherwise the step fails. If you use{item}in the parameters of a Cloud Action, Notification, or Call Sub-Runbook step, the value can’t contain curly braces. If you use it in the parameters of an API Call step, the value can’t contain line breaks. In either case, the step fails if it does. The execution results of the inner steps and the variables (ctx.*) that are set inside are both discarded for each iteration. Steps after the loop, and the next iteration, can’t use them (even the result of the last iteration isn’t kept). - Retry Loop. If a retry succeeds, only the execution results of the inner steps and the variables (
ctx.*) set inside in the successful attempt are passed on to later steps. - Parallel Group. If all branches finish normally, the execution results (
steps.*) of the inner steps of each branch are passed on to later steps together. You can’t set variables inside a parallel branch. - Call Sub-Runbook (synchronous). Variables that are set in the called Runbook are passed on together as the execution result of the calling step itself. However, the calling side defines the name
execution_modeas a system-reserved name. If the called Runbook outputs a variable with the same name,execution_mode, the reserved value overwrites it.
The Runbook detail screen
On the detail screen of a Runbook that you created and saved, you can check and edit the definition, and also check the operational metrics, the linked items, and the past execution history.
Operations at the top of the screen
You can do the following from the top of the detail screen.
- Run. Runs an Active Runbook right away. When you select [Run], a confirmation dialog opens. [Test run] is turned on by default, so to run the Runbook live, clear the check box. A test run doesn’t change your actual environment in principle (for the exceptions, see the test-run item under Limitations later on this page).
- Edit. Opens the edit screen for the settings and steps.
- Clone. Creates a new draft Runbook based on an existing one.
- Activate or deactivate. Use the switch next to the title to switch the status between [Active] and [Inactive].
- Delete. Deletes a Runbook that you no longer need from the project. It is in the [More actions] menu. You can’t delete an Active Runbook, so deactivate it first.
- Move back to draft. Moves an Inactive Runbook back to a draft. It is in the [More actions] menu.
- Execution access. For a Runbook that includes a cloud action, sets whether Workers can run it ([Allow execution by WORKER]).
What each section shows
| Section | What it shows |
|---|---|
| Basic info | The description, tags, update time, and typical and maximum run times, and also the number of completed executions and the success rate (calculated on the same basis as the list screen). |
| Related | The incident policies that this Runbook is assigned to, and the AI agents (built-in and custom) that are registered with it as a proposal tool, in a list. |
| Knowledge | The operating procedures, troubleshooting information, and investigation queries that are written in Markdown. |
| Steps | Every registered step, expanded as a card. You can check the code, the connection target, and the execution control parameters (timeout, retry, and behavior on failure). |
| Execution History | The past executions, listed from newest to oldest. From each log, you can check the execution result of each step and the details of the standard output (logs). |
Managing executions and troubleshooting
You can check the status of a Runbook execution and the progress of its steps in real time in “Execution History” on the Runbook detail screen, or on “Execution Detail,” which opens when you select an execution in the history. Execution Detail has two tabs, [Steps & log] and [Flow diagram]. In Execution History, the [Mode] column shows [Dry-run] for a test run and [Live] for a real run ([Test run] in the run dialog is the same as a dry-run). When an execution pauses or hits a problem, you can recover manually from the screen.
The status of the whole execution
The whole execution of a Runbook moves through the following statuses.
| Status | Meaning |
|---|---|
| Running | The state right after the execution starts. The steps are being processed in order. |
| Paused | The execution is paused and waiting for a user to step in (a manual retry or skip), because a step failed (for example, when On Failure is set to [Stop]), because an approval was rejected, or because an approval was rejected automatically after it timed out. |
| Awaiting Approval | An approval step is waiting for the designated approver to approve or reject. |
| Completed | All steps finished normally. |
| Failed | The execution ended for one of the following reasons. It fails automatically (expires) when a pause caused by a step failure lasts for a certain period of time, or when it exceeds the maximum run time. |
| Cancelling… | A cancel operation was accepted, and the running Command, Script, or API Call steps are being stopped. If none of these steps is running, the execution doesn’t go through this status and becomes “Cancelled” immediately. The latest-execution badge on the list screen shows it as [In progress]. |
| Cancelled | The end of the execution was confirmed by a user’s cancel operation. The system can also confirm it, for example when the other branches are cancelled by fail-fast in a parallel group. |
The status of each step
Separately from the status of the whole execution, each step has one of the following statuses. On Execution Detail, a step’s status appears mainly as an icon and a color, and the step row has no dedicated status label such as Completed or Failed. The following table explains what each status means; the names aren’t labels shown on the screen.
| Status | Meaning |
|---|---|
| Pending | The previous step hasn’t finished, and the step hasn’t started yet. |
| Running | The step is running now. |
| Completed | The step finished normally. |
| Failed | An error occurred and the step failed. |
| Skipped | The step was passed over without running. If the whole execution is cancelled, the steps that hadn’t finished at that time (including steps awaiting approval, steps waiting for children, and running Cloud Action and Notification steps) are recorded with this status, except the Command, Script, or API Call steps that were running. Steps that already failed, completed, or were skipped stay as they are. |
| Awaiting Approval | The step is waiting for the approver to approve or reject. |
| Waiting for children | The step is waiting for child executions to finish, for example in parallel execution or a sub-Runbook call. During this time, the status of the whole execution stays “Running.” |
| Interrupted | A Command, Script, or API Call step that was running was interrupted by cancelling the execution. |
Manual recovery (manual retry and manual skip)
When an execution is stopped in Paused or Awaiting Approval, you can retry or skip the step that caused it manually, so that the execution continues.
This differs from the automatic retry and automatic skip on failure in the step settings. It is a manual operation that an operator performs for an individual step on the screen.
- Manual retry ([Retry] button on the step row). For an approval step whose approval was rejected, the button is named [Re-request approval]. You can run it when the whole execution is Paused and the target step is Failed. The target step returns to Pending, the whole execution returns to Running, and processing continues (the retry count is incremented).
- Manual skip ([Skip] button on the step row). You can run it when the whole execution is Paused or Awaiting Approval, and the target step is Failed or Awaiting Approval. The target step becomes Skipped, the whole execution returns to Running, and processing moves on to the next step.
- Cancel the execution ([Cancel Execution] button). Use this when the execution can’t continue. It ends the whole execution safely as Cancelled. Select [Cancel Execution] in the confirmation dialog to confirm. Cancelling doesn’t roll back the results (side effects, such as command execution or API calls) of steps that already ran.
Conditions that make an execution fail automatically (expire)
If any of the following applies, a running Runbook ends automatically as “Failed,” without waiting for a user to step in.
- The execution stays paused for a certain period of time or longer. This is a safety measure for a paused execution that is left alone. It applies to a pause caused by a step failure. It doesn’t apply to a pause caused by a rejected approval or by an approval that was rejected automatically after it timed out, so those need a manual retry, skip, or cancel.
- The execution exceeds the time limit for the whole execution (the maximum run time). This applies only if you set a maximum run time in [Basic Info] in advance (if you didn’t, there is no timeout for the whole execution, and it is unlimited).
When an execution that started automatically from an incident, from Tasks, or from a sub-Runbook call reaches an approval step that has no timeout set, a default timeout of 60 minutes applies (this default doesn’t apply to a run started by approving an AI agent’s proposal, or to a manual run). When an approval times out, by default it is rejected automatically and the execution becomes paused.
Roles and permissions
Each Runbook operation needs the permissions of a project role.
| Operation | Required role |
|---|---|
| View, check the list, and check the history | Project Administrator / Editor / Worker / Viewer (all project members) |
| Run manually and test run | Project Administrator / Editor / Worker (for a Runbook that includes a cloud action, only when execution is allowed for Workers) |
| Cancel an execution | Project Administrator / Editor / Worker |
| Retry or skip a step manually | Project Administrator / Editor / Worker (for a Runbook that includes a cloud action, only when execution is allowed for Workers) |
| Deactivate and move back to draft | Project Administrator / Editor / Worker |
| Create, edit, activate, clone, and delete | Project Administrator / Editor |
| Approve or reject a step | Project Administrator / Editor (and the approver who is designated for that step) |
| Grant Workers permission to run | Project Administrator / Editor (Project Administrator only for a Runbook that reaches an Access activated by manual approval) |
Note: In a Runbook whose steps reference an Access that was activated by manual approval, only Project Administrators can add or change steps and clone the Runbook. Activating it is also limited to Project Administrators, including when the Access is reached through a sub-Runbook.
Note: In a test run, by default a Project Administrator or Editor can approve or reject even if they aren’t the designated approver (for details, see Limitations later on this page).
Note: A person who ran a Runbook manually can approve or reject the approval step of that run, if they are designated as an approver. Lorel.ai records who approved and who ran it.
Note: You can allow Workers to run only a Runbook that includes a cloud action (including through a sub-Runbook). Workers can run a Runbook that doesn’t include a cloud action without any additional setting.
Note: Turning on [Allow execution by WORKER] for a Runbook that reaches an Access activated by manual approval (including through a sub-Runbook) is limited to Project Administrators. Turning it off is always allowed.
Note: If a change to the definition alters whether the Runbook includes cloud actions, or the set of sub-Runbooks that it calls, the execution permission for Workers is revoked automatically.
For details, see Roles and Permissions.
Limits and safeguards against runaway execution
To prevent excessive resource use and infinite loops, the following constraints apply when you create and run a Runbook.
Input limits
| Item | Limit | Notes |
|---|---|---|
| Runbook name | Up to 255 characters | The name that identifies the Runbook |
| Description | Up to 4,000 characters | Purpose, target environment, trigger conditions, and so on |
| Knowledge field | Up to 20,000 characters | Procedures and notes in Markdown |
| Tags | Up to 50 | For classification and search (each tag can be up to 64 characters) |
| Number of steps | Up to 100 | The number of steps you can place in one Runbook |
Limits for control flow and execution (preventing runaway execution)
| Item (control flow) | Limit or constraint | Notes |
|---|---|---|
| Retry Loop | Up to 10 times (up to 200 executions in total for the inner steps) | The maximum number of attempts until the success condition is met |
| For Each | Up to 100 items (iterations × the sum of (1 + retry count) across the inner steps can’t exceed 200) | The maximum number of list items that are processed. The total number of inner step executions is also capped |
| Parallel Group | Up to 10 branches (up to 200 executions in total for the inner steps of all branches) | The number of branches you can define in one parallel group |
| Call Sub-Runbook | Nesting is limited to 3 levels. Child executions of sub-Runbooks that one execution (including its child executions) can create in total are limited to 50. The total number of child executions, including parallel group branches, is limited to 200 | Circular calls are detected and prevented automatically |
| Jump to a step (revisiting a step) | Up to 10 times for each step | The limit on the total number of times each step can be started (including the first run and manual retries), meant to stop loops made by [Jump to step] on failure. You can’t change it on the screen |
| Condition target | Later steps only | A Condition step can’t go back to an earlier step (the same applies to the default target) |
| Cloud action rate | Per AWS account, up to 30 in a burst, then replenished at 30 per 60 seconds | A step that exceeds the limit fails and isn’t retried automatically. Wait a while, and it can run again |
| Wait For Condition (total polls) | Up to 5,000 (maximum wait time of 24 hours) | The maximum number of polls while waiting for completion |
| Step timeout | 1 to 300 seconds (30 to 300 seconds for Command and Script steps) | The maximum run time of each step |
| Estimated total run time | Up to 24 hours | You can’t save a definition where the total of the estimated maximum times of Retry Loop, For Each, Parallel Group, and Delay steps exceeds 24 hours (a Delay step outside a Parallel Group branch counts as its wait seconds × the jump limit; other step types aren’t included in the total) |
Timeout constraints
- Timeout for each step. You can set it on Command, Script, API Call, and Cloud Action steps. The range is 1 to 300 seconds (up to 5 minutes), and 30 to 300 seconds for Command and Script steps, to make sure the processing finishes safely.
- Timeout for control flow steps. Retry Loop, For Each, Parallel Group, Wait For Condition, and Call Sub-Runbook steps don’t use the per-step timeout field (1 to 300 seconds). Each step type has its own settings for time and count (such as the maximum polling wait time and the number of loops).
Limitations
These are the specifications and limitations to understand in advance when you design and operate Runbooks.
- Targets of Command and Script steps. You can specify only Amazon EC2 instances (with the SSM Agent installed). On-premises servers and ECS containers can’t be specified as targets.
- Cancelling an execution and what happens on the target instance. When you cancel an execution while a Command, Script, or API Call step is running, it goes through “Cancelling…” and then becomes “Cancelled.” If none is running, it becomes “Cancelled” immediately. A Command, Script, or API Call step that was running is recorded as “Interrupted,” and the other steps that hadn’t finished (including steps awaiting approval or waiting for children, and running Cloud Action and Notification steps) are recorded as “Skipped.” Steps that already failed, completed, or were skipped stay as they are. A process that has already started on the target instance can run to completion, but its result isn’t reflected in the Runbook’s log. Also, cancelling doesn’t roll back the results (side effects, such as command execution or API calls) of steps that ran before the cancellation.
- Security and confidential information restrictions for cloud actions. To protect security, operations such as the following are always restricted, regardless of the permissions of the account on the cloud side.
- Directly retrieving secrets from a secret management service (such as AWS Secrets Manager)
- Issuing temporary credentials (such as AWS STS)
- Creating a new IAM access key or changing login information
- Retrieving an encrypted parameter in decrypted form (such as a SecureString in AWS Systems Manager Parameter Store; retrieving an unencrypted parameter is allowed)
- Running helper functions that depend on client-side libraries, such as generating a presigned URL
- Scope of cloud actions. For an Access tagged [Allowed operations only], a cloud action runs only within the scope of operations that you selected. A manually approved Access (tagged [Arbitrary execution]) isn’t limited to a selected scope. The actions that you declare in a step (“Declaration required” and “Declared actions”) can be used only with a manually approved Access. Declaring them doesn’t lift the limits on an [Allowed operations only] Access.
- Operations on IAM, STS, Organizations, Account, and billing-related services (such as Billing), and operations that start with delete, terminate, create, or run, are denied by default. A manually approved Access can run them when you declare them in the step. However, the operations that are always restricted above can’t be run even if you declare them.
- STS operations can’t be declared. They can never run.
- One step can declare up to 16 actions, across up to 12 kinds of services.
- Communication limits for external API calls. To keep communication safe, you can’t call an unencrypted HTTP URL or a URL for an internal or private IP address (only HTTPS communication is supported).
- Steps that don’t expand variable references. In the parameters of Command and Script steps, variable references (
{{ ... }}) aren’t expanded and are treated as literal text. You can use variable references in notification bodies, in the arguments of cloud actions, in the input mapping of a sub-Runbook, and in conditional expressions. - Outputs and variables of the inner steps of a For Each. The output values of the steps that ran inside a For Each step, and the variables (
ctx.*) set inside, aren’t available to steps after the processing finishes or to the next iteration (even the result of the last iteration isn’t kept). - Setting variables in parallel execution and the number of branches that run at the same time.
- To prevent variable conflicts, you can’t place a Set Variable step inside a parallel branch.
- The number of branches in a parallel group is the maximum you can define. Depending on the system load and other conditions, the number of branches that actually run at the same time can be higher or lower.
- When the API runs in Wait For Condition. The API Call step that a Wait For Condition step references runs once in the normal flow of execution, and then runs again at every poll. The referenced API call must use GET, and the polling interval is 5 to 900 seconds.
- Asynchronous sub-Runbook calls. If you call a sub-Runbook with [Async (don’t wait)], the status of the calling (parent) execution isn’t affected even if the called (child) Runbook fails later.
- The run time of a sub-Runbook’s child execution. The time spent waiting for a synchronously called sub-Runbook counts toward the maximum run time of the calling (parent) execution. The maximum run time that you set on the child Runbook doesn’t apply to an execution that starts from a sub-Runbook.
- Behavior of each step type in test runs. A test run doesn’t change your actual environment in principle. Each step type behaves as follows.
- Command, Script, and Cloud Action. Command and Script steps aren’t run, but a read-only reachability check of the target instance is actually performed, and if it fails, the test run fails. Cloud Action steps send nothing and are simulated (mock behavior).
- Notification. A step that you newly add on the screen doesn’t send in a test run by default. Turn on [Send notifications on test runs] in the step to make it send. A step whose [Notify] toggle is off never sends.
- Delay. It really waits in a test run by default (you can skip the wait in the step’s settings).
- API Call. It is skipped in a test run by default. Turn on [Send the real request during test runs] to send it.
- Approval. It waits for a real approval, even in a test run. By default, a Project Administrator or Editor can approve or reject even if they aren’t the designated approver. Turn on [Enforce approver restrictions on test runs] in the step to limit this to the designated approvers.
Related features
- Rules Overview (detecting incidents, and the incident policies that start a Runbook automatically)
- AI Agents Overview (approving a Runbook that was proposed as a result of analyzing an incident)
- Incidents / Tasks Overview (linking a Runbook to a task and checking the execution status)
- Integration Overview (the Access that cloud actions use)
- Roles and Permissions (details of the Project Administrator, Editor, Worker, and Viewer permissions)
- Data Handling (Runbook execution history is kept for 90 days on all plans)