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
- A trigger starts a Run and passes in the Run objective.
- Step 1 does its task and produces a result.
- Step 2 reads that result and does its own task.
- This repeats until the last step finishes, a rule stops the Run, or a safety limit is reached.
- 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 kind | Shown in the editor as | Use it to |
|---|---|---|
| Agent | Add step | Ask one of your working raia agents to do a task with its own knowledge and skills. |
| Loop AI | Add Loop AI | Process a result: extract facts, summarize, rewrite, score, or decide. No agent needed. |
| Approval | Add approval | Pause 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:
- Highlight 1: The status line says whether anything is published and what Run test uses.
- Highlight 2: Check lists anything that stops you publishing.
- Highlight 3: Run test runs the saved draft.
- Highlight 1: The six tabs: Steps, Triggers, Outcome, Safety, Report, Runs.
- Highlight 2: Each step is listed in the order it runs.
- Steps — the work, in order.
- Triggers — how Runs start.
- Outcome — what a successful Run must produce.
- Safety — limits on steps, tokens, time, and external actions.
- Report — optional summaries sent after a Run finishes.
- 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.