World SDK

Low-level API for inspecting and managing workflow runs, steps, events, hooks, streams, and queues.

The World SDK provides direct access to workflow infrastructure (runs, steps, events, hooks, streams, and queues). Use it to build observability dashboards, admin panels, debugging tools, and custom workflow management logic.

import { getWorld } from "workflow/runtime";

const world = await getWorld();

Interfaces

The World SDK is the low-level foundation that higher-level functions like getRun() and start() are built on. Use it when you need capabilities beyond what those functions provide.

Data hydration

Step input/output data is serialized using the devalue format. To display this data in your user interface (UI), use the hydration utilities from workflow/observability:

import { hydrateResourceIO, observabilityRevivers } from "workflow/observability";

const step = await world.steps.get(runId, stepId);
const hydrated = hydrateResourceIO(step, observabilityRevivers);
console.log(hydrated.input, hydrated.output);

See workflow/observability for the full API.