Skip to main content
Create custom interfaces to interact with your work factory. The Worklayer web app covers standard chat and factory setup. The headless Factory API lets you build purpose-built, visual interfaces for your team or customers—like an issue-resolution dashboard with impact scores, PR links, CI status, and one-click actions, or a support console with inline refund approvals—while Worklayer runs the orchestration, connected apps, skills, memory, files, and human-in-the-loop Reviews underneath. Each API key connects your application to one Worklayer factory. With the Factory API, you can:
  • Open Rooms to isolate workstreams—for example, one Room per issue, support ticket, or customer.
  • Send Events to tell your factory what happened in your app and control whether it reacts immediately, queues the work, or stores it as background context.
  • Read Room History to display conversations and factory replies in your UI.
  • Follow, stream, and steer Workers as they execute multi-step tasks across your connected apps in the background.
  • Surface and resolve Reviews right inside your UI whenever work needs human approval, an answer, or an app connection.
  • Configure Subscriptions to receive signed webhooks the moment your factory responds, updates status, or needs input.

Why Factory API?

Chat boxes flatten complex work into walls of text. Real operational workflows work better in structured, interactive interfaces: an engineering dashboard showing user impact, merge risk, live agent progress, and a one-click “Fix with Agent” button; a support console embedded inside your help desk; or an ops queue where leads approve actions with a single keystroke. You focus on the user experience and structured data display. Worklayer handles the hard agent infrastructure underneath:
  • Connected apps and guardrails. Connect built-in apps (GitHub, Sentry, PostHog, Stripe, Slack, Cursor Cloud Agents, and more), custom remote MCP servers, or your own OpenAPI specs—with per-tool policies (allow, ask, auto, disable) that protect sensitive actions.
  • Durability. Every accepted Event is persisted before the API responds. Retrying with the same Idempotency-Key never duplicates work, and failed webhook deliveries retry automatically for nearly 24 hours.
  • Channels, Signals, and timers. Combine API Events with first-party Channels (like Slack), app Signals (like Gmail), scheduled runs, and self-managed Monitors—without maintaining your own cron jobs or event queues.
  • Isolated workstreams, shared knowledge. Each Room keeps its own history, Events, notes, and Workers strictly isolated, while the factory shares apps, skills, long-term memory, and files across everything it does.
  • Human-in-the-loop by default. When a task hits a sensitive action or an ambiguous decision, the factory pauses and opens a Review. People can respond from your custom UI, the Worklayer web app, or Slack.

What you can build

Auto issue resolve factory

Rank incoming bugs by user impact and criticality, trigger a Worker with one click (“Fix with Agent”) to investigate and dispatch a connected coding agent to open a PR, surface CI status and merge risk, pause for human sign-off, and track post-merge health or rollbacks in a live dashboard.

Support factory

Create one Room per ticket, stream customer replies as Events, let Workers look up orders and prepare resolutions, require lead approval before issuing refunds, and post updates back to your help desk.

Operations factory

Combine Slack Channels, Gmail Signals, and custom API Events to triage inbound requests, update internal systems, and escalate exceptions to your team.

Get started

The fastest way to build on the Factory API is UI-first: describe the interface you want, let your coding agent mock it with static data, then hand it these docs to wire up Rooms, Events, Reviews, Worker streams, and Subscriptions.

Create your first factory

Follow the UI-first coding-agent workflow—with copy-paste prompts—or walk through every endpoint with cURL.

Core concepts

Understand Factories, Apps, Rooms, Events, Channels, Workers, Review, and Subscriptions.

API reference

Explore every endpoint, payload schema, and error response.

Worklayer MCP

Connect Claude Code, Cursor, Codex, and other MCP clients directly to your Worklayer workspace.

Core concepts at a glance

API conventions

Base URL

All Factory API routes are served under /v1. Most endpoints are scoped to a Room (/v1/rooms/{roomId}/...), while Subscription routes (/v1/subscriptions) apply across the entire factory.
Requests and responses use JSON, except the Worker stream, which uses Server-Sent Events (text/event-stream).

Server-side only

The API does not enable cross-origin browser requests (CORS). Keep your API key on your backend and call the Factory API from server-side code. All fetch examples in these docs work in Node.js 18+.
Factories, connected apps, skills, tool approval policies, API keys, Channels, Signals, and scheduled runs are configured in the Worklayer web app rather than through /v1 API endpoints.

Rate limits

The API currently enforces a limit of 100 requests per 5 seconds. Exceeding the limit returns 429 Too Many Requests.

Error responses

Error responses follow a consistent JSON shape: