Skip to content

Loops guide · 1 of 8

Loop concepts: Loops, Runs, and Steps

The few words you need before you build anything, and who can do what.

Before you build a Loop, learn five words. They appear on every screen, and they make the rest of this guide easier to follow.

The five words

Loop. A reusable plan for a piece of work. You design it once and use it many times. Think of it as a recipe.

Run. One execution of a Loop. Each time the Loop starts, raia Command creates a new Run with its own input, results, and history. If the Loop is the recipe, a Run is one meal.

Step. One task inside a Loop. Steps run one after another, top to bottom, unless a rule sends the Run somewhere else.

Run objective. The text you give a Run when it starts. It tells the Loop what this particular Run is about — for example, a customer message to summarize.

Trigger. The thing that starts a Run. You can always start a Run by hand. You can also add a schedule, a webhook, or an email address.

How a Run moves

  1. A trigger starts a Run and passes in the Run objective.
  2. Step 1 does its task and produces a result.
  3. Step 2 reads that result and does its own task.
  4. This repeats until the last step finishes, a rule stops the Run, or a safety limit is reached.
  5. When an Outcome is defined, raia Command evaluates the Run against it and records the result. Treat the verdict as a check against your definition, not proof that the work is factually correct.

A step receives the context allowed by its What it can see setting. Limiting context can make a step easier to inspect, but check that it still receives the information needed for its task.

Three kinds of step

Step kindShown in the editor asUse it to
AgentAdd stepAsk one of your working raia agents to do a task with its own knowledge and skills.
Loop AIAdd Loop AIProcess a result: extract facts, summarize, rewrite, score, or decide. No agent needed.
ApprovalAdd approvalPause the Run until a person decides.

You will use Loop AI steps first. They need no setup beyond a prompt.

The six tabs

Open any Loop and you will see six tabs:

Draft status, validation and test controls.
  1. Highlight 1: The status line says whether anything is published and what Run test uses.
  2. Highlight 2: Check lists anything that stops you publishing.
  3. Highlight 3: Run test runs the saved draft.
Section tabs and ordered step list.
  1. Highlight 1: The six tabs: Steps, Triggers, Outcome, Safety, Report, Runs.
  2. Highlight 2: Each step is listed in the order it runs.
  1. Steps — the work, in order.
  2. Triggers — how Runs start.
  3. Outcome — what a successful Run must produce.
  4. Safety — limits on steps, tokens, time, and external actions.
  5. Report — optional summaries sent after a Run finishes.
  6. Runs — every Run of this Loop, with full detail.

Draft and published

A Loop has a draft and a published version.

  • Draft — what you are editing. Saving changes the draft only.
  • Published — the version that automatic triggers use.

When a Run starts, it takes a snapshot of the version it uses. Editing the draft later does not change Runs that already exist. That means you can improve a Loop without breaking work in progress.

Who can do what

Loops belong to an organization. Everyone in that organization sees the same Loops, subject to their role.

  • Owners and admins create, edit, publish, and manage Loops.
  • Contributors and above can start Runs, subject to their permissions.

If you cannot see the New Loop button, ask an owner or admin in your organization.

Checkpoint

You can explain the difference between a Loop and a Run, and you know the three step kinds. Next, build one.