Import
import { branch, createWorkflowClient, parallel, step, waitForApproval, workflow,} from "veryfront/workflow";Examples
Simple sequential workflow
import { step, workflow } from "veryfront/workflow"; const pipeline = workflow({ id: "summarize", steps: () => [ step("fetch", { tool: "webScraper" }), step("summarize", { agent: "writer" }), ],});Parallel steps and human-in-the-loop
import { branch, parallel, step, waitForApproval, workflow } from "veryfront/workflow"; const contentPipeline = workflow({ id: "content-pipeline", steps: ({ input }) => [ step("research", { agent: "researcher" }), parallel("generate", [ step("write", { agent: "writer" }), step("images", { tool: "imageGenerator" }), ]), branch("review", { condition: () => input.requiresApproval, then: [waitForApproval("human-review", { timeout: "24h" })], }), step("publish", { agent: "publisher" }), ],});API
workflow(options)
Create a workflow definition.
Returns: <code>Workflow<TInput, TOutput></code>
Type Reference
StepOptions
Options accepted by step.
BranchOptions
Options accepted by branch.
ParallelOptions
Options accepted by parallel.
Exports
Functions
Classes
Types
Constants
Deep imports
These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.
veryfront/workflow/blob
Provider-neutral blob storage contracts and built-in first-party storage.
import { assertSafeBlobId, BlobStorageContractName, isSafeBlobId } from "veryfront/workflow/blob";Components
Functions
Classes
Types
veryfront/workflow/claude-code
Claude Agent SDK Integration Provides Claude Code agentic capabilities within Veryfront workflows. Uses your local Claude Code installation - no separate API key needed.
import { createAgent, createClaudeCodeTool, createEventPublisher,} from "veryfront/workflow/claude-code";Functions
Classes
Types
Constants
veryfront/workflow/claude-code/react
React hooks for Claude Code streaming
import { useClaudeCodeStream, useClaudeCodeText, useClaudeCodeWebSocket,} from "veryfront/workflow/claude-code/react";Functions
Types
veryfront/workflow/claude-code/types
Claude Agent SDK Integration Types Type definitions for the Claude Agent SDK workflow tools.
import { MAX_CLAUDE_CODE_WIRE_ARRAY_ITEMS, MAX_CLAUDE_CODE_WIRE_FIELD_LENGTH, MAX_CLAUDE_CODE_WIRE_IDENTIFIER_LENGTH,} from "veryfront/workflow/claude-code/types";Components
Types
veryfront/workflow/discovery
Workflow Discovery Module Provides utilities for discovering workflow definitions from user code.
import { createWorkflowRegistry, discoverWorkflows, findWorkflowById,} from "veryfront/workflow/discovery";Functions
Types
veryfront/workflow/registry
import { getAllWorkflowIds, getWorkflow, registerWorkflow } from "veryfront/workflow/registry";Functions
Types
Constants
veryfront/workflow/worker
Workflow worker module Provides distributed workflow execution support. Two execution profiles are available: 1. WorkflowWorker - In-process polling worker - Polls for stalled workflows and resumes them - Good for trusted code or single-tenant deployments - Simple setup, lower overhead 2. WorkflowRunManager + ProcessRunExecutor - Local process execution - Spawns child processes for each workflow - Good for local development without K8s/Docker A workflow run can be backed by a run executor without introducing another user-visible execution type.
import { createDynamicWorkflowRunEntrypoint, createWorkflowRunEntrypoint, createWorkflowRunManager,} from "veryfront/workflow/worker";