workflow AGENTS.md

A repository guide for Vercel's Workflow SDK, a JavaScript and TypeScript toolkit for running long-lived, stateful tasks on ordinary server infrastructure.

In plain words
What is it for?
Use it when developing the workflow runtime, its Next.js integration, command-line tools, storage backends, examples, or documentation.
Why use it?
It explains the project structure and rules that keep workflow state, documentation pages, and branch changes from being accidentally broken.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/vercel/workflow/agents-md
Clone the repo
git clone --depth 1 https://github.com/vercel/workflow

Made for: Codex, OpenCode.

Per session 8,698 This file is loaded in full into every session.
When invoked 8,698 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.08698 $0.08698
Opus 5 $0.04349 $0.04349
Sonnet 5 $0.01740 $0.01740
Haiku 4.5 $0.00870 $0.00870

Measured yesterday against content hash f6fabb8c5999, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

workflow AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 543 lines

How it starts

The opening of the file, as written. The whole thing — 543 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agent instructions

CRITICAL RULES:

  • NEVER push directly to the main or stable branches
  • Do not remove or break agent-discoverable docs sitemap behavior: keep docs/app/sitemap.md/route.ts and docs/app/[lang]/sitemap.md/route.ts, and keep the sitemap link in docs/app/[lang]/llms.mdx/[[...slug]]/route.ts.

Overview

Workflow SDK is a durable functions framework for JavaScript/TypeScript that enables writing long-running, stateful application logic on top of stateless compute. The runtime persists progress as an event log and deterministically replays code to reconstruct state after cold starts, failures, or scale events.

This repository contains the client-side SDK code for workflows, along with example apps that showcase Workflow SDK in action.

Architecture

Core components

  • packages/core: Core workflow runtime and primitives (@workflow/core)
  • packages/next: Next.js integration (@workflow/next)
  • packages/cli: Command-line interface (@workflow/cli)
  • packages/world: Core interfaces and types for workflow storage backends (@workflow/world)
  • packages/world-local: Filesystem-based workflow backend for local development and testing (@workflow/world-local)
  • packages/world-vercel: Production workflow backend for Vercel platform deployments (@workflow/world-vercel)
  • packages/swc-plugin-workflow: SWC compiler plugin for workflow transformations
  • workbench/example: Basic workflow examples using the CLI (aka "standalone mode")
  • workbench/nextjs-turbopack: Workflow examples using the Next.js integration

Workflow execution model

Workflows consist of two types of functions:

  1. Workflow functions ("use workflow"): Orchestrators that run in a sandboxed VM without full Node.js access
  2. Step functions ("use step"): Individual pieces of logic with full Node.js runtime access

The framework uses compiler transformations to split workflow files into separate bundles for client, workflow, and step execution contexts.

Read the full file on GitHub · 543 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 543 lines · 8,698 tokens per session scan A f6fabb8c5999

Subscribe to this mod's changes

workflow AGENTS.md is an instructions file published in the GitHub repository vercel/workflow (2,363 stars, last pushed 3d ago), licensed Apache-2.0. It adds 8,698 tokens to every session, about $0.0435 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.