> ## Documentation Index
> Fetch the complete documentation index at: https://docs.myworklayer.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Factory

> A factory is an always-on workspace with its own apps, skills, memory, files, and members. Your API key targets one factory.

A **factory** is where your team's automated work runs in Worklayer. Give it connected apps, skills, instructions, and memory—then send it Events from your product, Slack, or Gmail. Your factory decides what needs to happen, spins up background Workers to execute in parallel, pauses for human approval when required, and reports outcomes back to your team.

> [!NOTE]
>
> In parts of the Worklayer web app, a factory is also called an **Environment**. In webhook payloads, `environmentId` is the ID of your factory.

For example, in a **support factory**, new tickets arrive from a help desk, the factory investigates each issue, asks a support lead to approve refunds, and posts the outcome back to your app.

![Support factory flow: your app sends an Event, the factory spawns a Worker, a support lead approves a Review, and the factory posts a room.response reply.](https://mintcdn.com/worklayer-17401167/cpUXFKQRIMsNdzrq/images/diagrams/factory-flow-light.svg?fit=max\&auto=format\&n=cpUXFKQRIMsNdzrq\&q=85\&s=db9f2cdb5a3d66f8099f5a3bb0bda4e3)

## What lives inside a factory

Everything a factory needs to do reliable work is scoped to that factory:

| Component | Role |
| - | - |
| **[Apps & integrations](https://docs.myworklayer.com/apps.md)** | Connected third-party apps (GitHub, Stripe, Sentry, PostHog, Slack, Cursor Cloud Agents, and more), custom remote MCP servers, OpenAPI specs, and per-tool approval policies. |
| **Skills** | Reusable playbooks for specific workflows, such as *"How we handle duplicate-charge refunds"* or *"Investigate a production error and open a fix PR"*. |
| **Memory** | Persistent long-term knowledge the factory builds and carries across conversations. |
| **Files** | Shared documents and artifacts the factory and its members can read and write, such as reports, evidence bundles, and exports. |
| **Databases** | Lightweight structured databases the factory can create and query. |
| **Instructions** | System-level guidance, model configuration, and tool approval policies. |
| **Rooms** | Isolated conversations with the factory: API-created [Rooms](https://docs.myworklayer.com/rooms.md), [Channel](https://docs.myworklayer.com/channels.md) conversations, and the [main Room](https://docs.myworklayer.com/rooms.md#the-main-room). |
| **Schedules** | Recurring tasks configured in the web app (such as Loops) that run on a cadence. |
| **Members** | People who can interact with, configure, or approve work for the factory. |
| **API keys & Subscriptions** | Credentials and webhook endpoints that connect your custom interface or backend to the factory. |

Workers always execute using the **factory's connected accounts**, not the personal accounts of whoever triggered the work. In the support example, refunds always run through the company Stripe account regardless of who submitted or approved the ticket.

Apps, skills, memory, and files are shared across the entire factory, while conversations stay isolated inside each [Room](https://docs.myworklayer.com/rooms.md)—with its own history, Events, Room notes, and Workers.

## How a factory operates

You don't script every branch or retry loop. Whenever a message or [Event](https://docs.myworklayer.com/events.md) arrives, the factory evaluates the situation and decides what to do next:

* **Reply directly** in the Room.
* **Start a [Worker](https://docs.myworklayer.com/workers.md)** to run a multi-step task in the background.
* **Steer or stop** a Worker that is already running.
* **Stay quiet** if the Event is informational and doesn't need action yet.

A single factory can run up to **20 Workers concurrently**. As each Worker completes, it reports its outcome back to the factory, which decides what to share in the Room. Internal reasoning and tool calls stay inside Worklayer—people and your app see clean responses in [Room History](https://docs.myworklayer.com/rooms.md#room-history) and `room.response` webhooks.

## Who can use a factory

Team members access a factory based on their role:

| Role | Capabilities |
| - | - |
| **Owner** | Full control. Only the owner can rename or delete the factory, transfer ownership, and manage API keys and Subscriptions. |
| **Full access** | Use the factory, edit instructions and model settings, invite or remove members, connect apps, and manage skills, memory, and files. |

New members receive **Full access** by default. Older memberships may still hold legacy **Runner** (can use the factory and files, but cannot connect apps or change settings) or **Viewer** (read-only) roles.

> [!NOTE]
>
> Only the **Owner** and members with **Full access** can connect, reconnect, or remove app accounts on a factory.

## Personal factories

Every Worklayer user also has a personal factory (**Worky**) backed by their own connected accounts and private to them. Factories are strictly isolated from one another—work running in one factory never accesses the apps, accounts, skills, or files of another.

## Scoping in the Factory API

| Resource | Scope |
| - | - |
| **API key** | Bound to one factory. No factory ID header or path parameter is needed. See [Authentication](https://docs.myworklayer.com/authentication.md). |
| **Subscription** | Scoped to one factory and receives events across all Rooms of that factory. See [Subscriptions](https://docs.myworklayer.com/subscriptions.md). |

> [card] [Apps & integrations](https://docs.myworklayer.com/apps.md)
>
> Connect built-in apps, custom remote MCP servers, OpenAPI specs, and approval policies.

> [card] [Rooms](https://docs.myworklayer.com/rooms.md)
>
> Isolate conversations per issue, ticket, customer, or work item.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.