Skip to Content
Recodocs

Routines

Durable multi-step workflows that retry, wait and resume without repeating a finished step.

2 min read

Think of a monthly invoice import with the same approved steps every month. A routine is that fixed, repeatable process, started by a schedule or a person. It uses a durable Temporal workflow that records completed steps so work can survive waits, failures and restarts without repeating finished steps. No model chooses the next action in a routine. Status: Live workflow.

Execution semantics

GuaranteeBehaviour
StepsAn ordered list of steps. A step runs only after the previous step has completed and its result is stored.
RetriesA failed step is retried with backoff, up to its retry limit. Steps that are not safe to repeat are not retried automatically.
Wait and resumeA step can wait for a time or a decision. The routine is parked and resumes when the condition is met.
Restart survivalIf the service restarts, the routine resumes from the last completed step.
No repeated stepA completed step is never run again, including after a restart or a retry of a later step.
FailureAfter the retry limit the run ends as failed and records the failing step and error.
Durable routine retry & restart recoveryClick to inspect
Schedule
Temporal Runner
Tools & APIs
Trigger routine
Step 1: fetch items
Step 1 succeeded (checkpointed)
Step 2: file for review
Retryable error
Wait (backoff)
Service restarts — resumes at Step 2 (Step 1 not repeated)
Step 2 retry
14 items filed
Step 3: notify finance
Run succeeded

Because the step result is stored before the next step begins, step 3 uses the exact list step 1 fetched, even if the source changes between retries.

Routine, AI step or agent

Use the task's need for judgment to distinguish them: a routine has fixed steps, an AI step supplies a bounded result, and an agent chooses which permitted step to take next.

RoutineRecobot
PathFixed steps in a fixed orderThe model chooses tools and order
Best forPredictable, repeated, auditable processesJudgement over messy input
Model useNoneThe core of the loop
WritesSame gateway and approval rulesSame gateway and approval rules
FailureRetry, then failed with the step shownRun ends with a reason

A routine step that needs approval creates a decision, and the routine waits.

The Routines page

Open Routines under System. It shows each routine with its schedule, health and a run timeline.

  • Pause stops new runs; a run in flight finishes its current step.
  • Retry on a failed run resumes from the failed step.
  • A run that takes much longer than expected is flagged in health.

Retries need safe steps

A retried step calls its tool again. Tools that declare themselves safe to retry are retried; tools that are not stop the routine for a person to review.

How is this page?

Last updated on