Skip to content

raia Command · Section

Loops

Reusable AI workflows with runs, approvals, triggers, guardrails, and reports.

Beginner guide

New to Loops? Read these in order. Start small: your first Loop takes one piece of text and turns it into something useful.

  1. 1Loop concepts: Loops, Runs, and StepsThe few words you need before you build anything, and who can do what.
  2. 2Build your first LoopTurn a sample support request into a short internal summary with two Loop AI steps, then test it.
  3. 3Write clear stepsChoose the right step kind, write prompts that stay on task, and route between steps.
  4. 4Approvals and external actionsAsk a person to decide before work continues, and control anything that leaves raia Command.
  5. 5Start Loops automaticallyManual starts, schedules, webhooks, and email triggers — and when to use each.
  6. 6Outcomes and safety limitsDefine what a finished Run must produce, and cap steps, tokens, time, and external actions.
  7. 7Test, publish, and maintainSave, test, check, publish, and switch on a Loop — then change it safely later.
  8. 8Runs and troubleshootingRead a Run's Journey, find the step that failed, and fix common problems.

Loops let teams turn a repeatable business process into a governed AI workflow. A Loop is the reusable design; each Run is one execution with its own inputs, step history, approvals, outcome evidence, and report trail. Examples in this guide use made-up data. When you test, use sample information, not real customer data.

In this section

  • Understand the difference between a Loop design and a Run.
  • Build manual, AI-assisted, agent, and approval steps into one workflow.
  • Start Loops manually or through schedules, webhooks, and email triggers.
  • Use safety limits, outcome checks, and reports to keep work auditable.
01

What's inside

  1. 01

    Loop library

    Browse, search, filter, duplicate, import, export, and organize reusable Loops. Folders help keep the library tidy without changing who can run or manage a Loop.

  2. 02

    Loop builder

    Create a Loop manually or describe the process in plain language and let AI draft a starting structure. Teams can then review the steps, connect agents, add approvals, and publish only when the design is ready.

  3. 03

    Step types

    Agent steps ask a selected raia Agent to complete a bounded task. Loop AI steps summarize, transform, score, or decide from prior results. Approval steps pause the workflow until the required people approve, send back, or stop the Run.

  4. 04

    Deterministic routing

    Each step can move to the next step, jump to another step when a condition matches, finish, stop, or fail. Routes are rule-based, so the workflow path is predictable instead of being guessed by a model.

  5. 05

    Triggers

    Runs can start manually, on a schedule, from a webhook, or from accepted inbound email. Automatic triggers use the published Loop, while draft tests let owners and admins validate changes before publishing.

  6. 06

    Runs and approvals

    The Runs view shows queued, running, waiting, completed, failed, and cancelled work. A Run detail page shows the journey, input, step outputs, approval decisions, external actions, usage, events, and outcome.

  7. 07

    Outcomes and reports

    The Outcome tab defines the evidence a successful Run should produce. When a Run finishes, reports can include the objective, trigger, timing, inputs, usage, outcome verdict, step journey, approvals, and actions.

02

At a glance

CapabilityWhat it doesBest for
Agent stepsSend one bounded task to a selected raia Agent and capture a normalized result.Delegating specialist work
Loop AI stepsSummarize, transform, score, or decide using earlier step results.Keeping multi-step work moving
Approval stepsPause a Run for human approve, send-back, or stop decisions.Compliance and high-impact actions
SchedulesStart a published active Loop on a recurring cadence.Daily or weekly operational checks
WebhooksStart a Loop from an external system with a signed delivery.Event-driven automations
Email intakeStart a Loop from accepted inbound email and optional attachments.Shared inbox and request workflows
Safety limitsSet maximum steps, token budget, elapsed time, and external-action limits per Run.Bounded, predictable automation
Completion reportsSend a structured summary by email or webhook after a Run finishes.Audit trails and downstream systems

Best practice

Publish only after testing the draft with realistic inputs. Treat approval steps and outcome checks as part of the workflow design, not as afterthoughts.
03

Related