upstash-workflow-js

Define, trigger, and manage serverless workflows with the Upstash Workflow TypeScript SDK.

2|1|Updated Jun 9, 2026
One-click install
npx skills add https://github.com/zester4/zilmate --skill upstash-workflow-js-zester4
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: upstash-workflow-js
Source: https://github.com/zester4/zilmate/tree/main/.agents/skills/upstash-workflow-js
Command: npx skills add https://github.com/zester4/zilmate --skill upstash-workflow-js-zester4

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @upstash/workflow, @upstash/qstash, @upstash/workflow-agents, and includes references (resource) components.

What problem does it solve? Building durable, long-running serverless workflows requires handling retries, failures, scheduling, and external callbacks manually. This Skill provides complete guidance for the Upstash Workflow TypeScript/JavaScript SDK so you can define workflow endpoints, run reliable steps, and recover from failures without building that infrastructure yourself. ## Core Features & Use Cases - Workflow Definition & Triggering: Expose workflow endpoints with serve(), run steps with context.run, and trigger runs via the Workflow Client with retries, delays, and flow control. - Reliability & Recovery: Configure automatic retries, failure functions, and use the Dead Letter Queue (DLQ) to resume or restart failed runs programmatically or via REST API. - Event-Driven Patterns: Pause workflows with waitForEvent, waitForWebhook, or context.sleep, and build human-in-the-loop flows with realtime notifications. - Multi-Agent Orchestration: Build agents, tools, and tasks with patterns like evaluator-optimizer, prompt chaining, and orchestrator-workers using @upstash/workflow-agents. - Use Case: You need to process user signups with a multi-step flow (send email, wait for verification, call a third-party API) that survives deploys and failures. Use this Skill to define the workflow, wait for the verification webhook, and automatically retry failed steps. ## Quick Start Ask the assistant to create an Upstash Workflow endpoint that runs two steps and show how to trigger it with the Workflow Client.

Frequently Asked Questions about upstash-workflow-js

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a workflow endpoint with Upstash Workflow?

Use the serve() function from @upstash/workflow to expose an async route as a workflow endpoint. Inside the handler, define steps with context.run(), then trigger the workflow from your backend using the Client's trigger method with the endpoint URL.

How do I retry or recover a failed Upstash Workflow run?

Failed runs enter the Dead Letter Queue after all retries are exhausted. Use client.dlq.resume() to continue from the failed step, client.dlq.restart() to rerun from the beginning, or the REST API endpoints under /v2/workflows/dlq for bulk operations.

Can I run Upstash Workflow locally during development?

Yes, set QSTASH_DEV=true and the SDK automatically downloads the QStash CLI binary and spawns a local dev server on port 8080 with no credentials required. Alternatively, run npx @upstash/qstash-cli dev manually and copy the printed environment variables.

Why does my workflow step fail inside a try/catch block?

Workflow steps intentionally throw WorkflowAbort after completing, and catching it prevents the engine from progressing. Rethrow WorkflowAbort inside your catch block, or move the try/catch inside the function passed to context.run.

What is the difference between resume and restart in the workflow DLQ?

Resume continues the same run from the failed step while preserving previous step results, but breaks if workflow code before the failure changed. Restart creates a fresh run from step one, discarding all prior results.

Does Upstash Workflow support multi-agent orchestration?

Yes, the @upstash/workflow-agents package provides agentWorkflow() to define models, tools, agents, and tasks. It supports patterns like evaluator-optimizer, prompt chaining, parallelization, and orchestrator-workers with a manager model.