routinesL4 automation

Workflows that survive a restart.

A routine is a YAML or JSON definition: inputs, triggers and steps that call B3OS products, marketplace actions or other routines. Each publish is an immutable version. Runs pin their version, and after a crash they resume from the journal on the node.

API
/v1/routines
CLI
b3os routine deploy · b3os routine run · b3os routine logs
MCP tools
routine_*

[01/03] What it does

Familiar syntax

steps with uses, with, needs, if, retry, timeout_ms, map and wait. Expressions are CEL inside ${{ }}, with GitHub-style helpers such as contains, startsWith and toJSON.

PUT /v1/routines/{name}

Triggers

Cron with seconds and a time zone, intervals, signed webhooks and marketplace triggers. Every schedule declares what happens to missed runs.

triggers: [cron, interval, webhook, action]

Durability you choose

ephemeral, standard or strict, per routine or per step. Durable steps commit to a journal on the node's disk before they report done.

defaults.durability

Versions and rollback

Triggers switch to a new version atomically. Rollback moves them back to a version you name, in one call.

POST /v1/routines/{id}/rollback

Runs

Wait for the result in the same request, stream events, send a signal to a waiting step, or cancel.

POST /v1/routines/{id}/runs

A run, step by step
  1. triggercron · nightlysucceeded
  2. pagevision/scrape@1succeeded
  3. summaryinfer/chat@1running
  4. postio.b3os/slack/post-message@1pending

An example run. Each step's state comes from the run's events; durable steps are journaled before they report done.

name: nightly-digest
description: Scrape the news page and post a summary
triggers:
  - type: cron
    id: nightly
    cron: "0 0 6 * * *"
    tz: America/Los_Angeles
    catch_up: latest
steps:
  - id: page
    uses: vision/scrape@1
    with:
      url: https://news.example.com
  • Durable means a run survives process crashes and restarts. It does not survive the loss of the node.
  • Runs execute as the key that published the version, with the scopes it had then.

[02/03] Measured

What we measure for routines

Values appear here only from published benchmark runs, each with its raw data. A row that says measuring has no published run yet.

Pure step dispatch

Dispatch of steps with no side effects in an ephemeral run, 1 KB payloads.

Measuringp50, server side

Pure step dispatch, p99

The same at the 99th percentile.

Measuringp99, server side

Action call from a step

A routine step calling a pack action in-process, upstream excluded, 1 KB payloads.

Measuringp50, server side

Durable step, standard

An effect step with standard durability, journal commit included.

Measuringp50, server side

Durable step, strict

An effect step with strict durability: an intent commit and a result commit.

Measuringp50, server side

Webhook to first step

From a hook delivery received to the first step started.

Measuringp50, server side

Cron lateness

How late a per-second cron starts its runs: start time minus scheduled time.

Measuringp99, server side

Pure step throughput

Pure steps completed per second across concurrent ephemeral runs.

Measuringthroughput, server side

Durable record throughput

Standard-durability effect records journaled per second, records up to 256 B.

Measuringthroughput, server side
How we measure, and what others publish

[03/03] Beta limits

Free during the beta, with caps

Caps per organization

Routine steps per day
50,000

Metered units

Routine effect steps
routines.effect_step
Pricing details