---
title: getWorldHandlers
description: "Build-time-safe access to the World's queue handlers without binding to runtime environment variables."
docs_index: /llms.txt
lastUpdated: 2026-10-21
type: reference
summary: Use getWorldHandlers at build time to access queue handler creation without caching an environment-bound World.
prerequisites:
  - /docs/api-reference/workflow-runtime/get-world
---

> For an index of all documentation, see [/llms.txt](/llms.txt).

Returns a restricted view of the [World](/docs/api-reference/workflow-runtime/world) exposing only the members that are safe to use at build time: `createQueueHandler` and `specVersion`. Framework adapters use it while generating workflow route handlers, before the deployment's runtime environment variables exist.

Unlike [`getWorld()`](/docs/api-reference/workflow-runtime/get-world), this function does not cache a fully configured World instance: caching at build time would lock in incomplete environment configuration.

```typescript lineNumbers
import { getWorldHandlers } from "workflow/runtime";

const handlers = await getWorldHandlers(); // [!code highlight]
console.log(handlers.specVersion);
```

## API signature

### Parameters

This function does not accept any parameters.

### Returns

Returns a `Promise<WorldHandlers>`, where:

```typescript
import type { World } from "@workflow/world";

type WorldHandlers = Pick<World, "createQueueHandler" | "specVersion">;
```

> This is SDK infrastructure used by framework adapters at build time. Runtime routes and application code should use [`getWorld()`](/docs/api-reference/workflow-runtime/get-world) instead.

## Related functions

- [`getWorld()`](/docs/api-reference/workflow-runtime/get-world): Resolve the full World instance at runtime.
- [`workflowEntrypoint()`](/docs/api-reference/workflow-runtime/workflow-entrypoint): Create the runtime route handler that shares the full World instance.

---

For a semantic overview of all documentation, see [/sitemap.md](/sitemap.md)

For an index of all available documentation, see [/llms.txt](/llms.txt)

For agent-facing discovery, including API and MCP surfaces, see [/agents.md](/agents.md)