upstash/skills · Official

upstash-workflow-js

Work with the @upstash/workflow TypeScript/JavaScript SDK for durable, long-running workflows in serverless functions, multi-step processes that survive timeouts, retries, and restarts (built on QStash). Use when defining a workflow endpoint with serve(), running steps with context.run, sleeping for minutes to days without holding a function open, calling external APIs with context.call, waiting for an external event or webhook, invoking other workflows, configuring retries, failure callbacks, …

All-time #9527 Trending #5734 First seen Apr 1, 2026
8-week activity · all time api

Installation

$ npx skills add upstash/skills --skill upstash-workflow-js

Summary

  • Work with the @upstash/workflow TypeScript/JavaScript SDK for durable, long-running workflows in serverless functions, multi-step processes that survive timeouts, retries, and restarts (built on QStash).
  • Use when defining a workflow endpoint with serve(), running steps with context.run, sleeping for minutes to days without holding a function open, calling external APIs with context.call, waiting for an external event or webhook, invoking other workflows, configuring retries, failure callbacks, and a DLQ, controlling concurrency, rate, and parallelism, triggering, cancelling, or inspecting runs with the Workflow client, building AI agents and orchestrators, human-in-the-loop approvals, realtime updates, local development with the QStash dev server, adding middleware, or migrating workflows safely.
  • Also use when the user asks for durable execution, step functions, saga or orchestration patterns, background jobs with checkpoints, or long-running tasks on Vercel, Next.js, Cloudflare Workers, or other serverless platforms.

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from upstash/skills · top by installs.

npx skills add upstash/skills

Browse all from upstash/skills

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Repository health

Stars 25
License LICENSE
Default branch main
Open issues 0
Status Active

Skill metadata

Parsed from SKILL.md frontmatter.

LicenseMIT
More metadata
author
Upstash
homepage
https://upstash.com

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 3,163 B
  • docs SUMMARY.md 1,057 B

History

  1. First seen on skills.sh
  2. First recorded snapshot · 1,100 installs

SKILL.md

Upstash Workflow SDK

Quick Start

The Upstash Workflow SDK lets you expose serverless workflow endpoints and run them reliably using QStash under the hood.

Install:

npm install @upstash/workflow

Define a simple workflow endpoint:

import { serve } from "@upstash/workflow";

export const { POST } = serve(async (context) => {
  await context.run("step-1", () => console.log("step 1"));
  await context.run("step-2", () => console.log("step 2"));
});

Trigger it from your backend:

import { Client } from "@upstash/workflow";

const client = new Client({ token: process.env.QSTASH_TOKEN! });
await client.trigger({ url: "https://your-app.com/api/workflow" });

Other Skill Files

These files contain the full documentation. Use them for details, patterns, and advanced behavior.

  • basics:

- basics/serve – How to expose workflow endpoints. - basics/context – Full API for workflow context (steps, waits, webhooks, events, invoke, etc.). - basics/client – Using the Workflow client to trigger, cancel, inspect, and notify runs.

  • features:

- features/invoke – Cross‑workflow invocation. - features/reliability – Retries, failure callbacks, and DLQ. - features/flow-control – Rate limits, concurrency, and parallelism. - features/wait-for-event – Notify and wait-for-event patterns. - features/webhooks – Webhook creation and consumption.

  • how to:

- how-to/local-dev – Local QStash dev server (auto via QSTASH_DEV=true) and tunneling. - how-to/realtime – Realtime and human‑in‑the‑loop workflows. - how-to/migrations – Migrating workflows safely. - how-to/middleware – Adding middleware to workflows.

  • other files:

- rest-api – Low-level REST endpoints for interacting with QStash/Workflow. - troubleshooting – Common debugging and environment issues. - agents – Using Workflow with agents, orchestrators, and automation patterns.