Durable workflows in TypeScript.

React to a write, a schedule or a webhook. Every step is recorded, so after a sleep or a retry an email still goes once.

Workflow runs in the Logs tab: slot-on-update, notes-ready and notify-reminder runs, each succeededWorkflow runs in the Logs tab: slot-on-update, notes-ready and notify-reminder runs, each succeeded
Created, updated, transition, deleted, cron, webhook
Six triggers
Each step runs once, then answers from its record
Durable steps
Hours, days, or until a signal arrives
Sleep and wait
Every effect listed, nothing sent
Dry runs

What you get

  • Schedules in your time zone

    cron with a time zone, once on clock-change days.

  • Signed webhooks

    Stripe, Razorpay, GitHub or HMAC signatures, checked first.

  • Retries and replay

    Failed runs retry, then replay from the failed step.

  • Typed messages

    Email, SMS and in-app templates with typed variables.

How a workflow runs

workflows/booking.ts
import { cron, on } from "@appbricx/workflows";

export const bookingConfirmed = on.transition("booking", "status", "confirmed",
  async ({ row }, step) => {
    await step.send.email("booking-confirmed", {
      to: row.email,
      vars: { ref: row.ref, link: step.url("/bookings") },
    });
    await step.sleep("1d");
    const feedback = await step.waitFor<{ stars: number }>("feedback",
      { key: row.id, timeout: "7d" });
    if (feedback) await step.run("keep the stars", () =>
      step.ctx.db.update("booking", row.id, { notes: feedback.stars + " stars" }));
  });

export const morningDigest = cron("06:00", { tz: "Asia/Kolkata" },
  async (_e, step) => { /* … */ });
Relay, a help desk that answers on time, on desktop
Relay turns emails into tickets and escalates late onesOpen Relay

Questions

What can start a workflow?

A row being created, updated or deleted, a row moving into a state, a schedule with a time zone, or a signed inbound webhook. An action can also wake a workflow that is waiting for a signal.

What happens when a workflow fails?

The run is retried. When it runs out of retries it waits in the dead letters, where replay runs it again, from the failed step if you choose. The console's Workflows page and the run tool show every step.

How do I test a workflow without sending email?

Dry-run it. The run executes once with nothing written or sent, and every email, write and wait comes back as a list of effects.

Ship it with your agent.

claude mcp add --transport http appbricx https://appbricx.com/api/mcp