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

> ## Agent Instructions
> Orq.ai is the control plane for model and MCP traffic: one key reaches the workspace's enabled models, MCP servers, and resources. The setup depends on where the agent runs.
> Hosted assistant (ChatGPT, claude.ai, a hosted sandbox): install nothing. Tell the human to add https://my.orq.ai/v2/mcp as a remote MCP connector and finish the Orq.ai sign-in. With OAuth, send no Authorization header; otherwise send an API key as a bearer token.
> Local coding agent (Claude Code, Codex, Cursor, OpenCode): run `curl -fsSL https://cli.orq.ai/install.sh | sh`. It installs the CLI and runs `orq setup`, which signs in, writes a project-scoped key to `~/.orq/env`, and wires the detected agents through the AI Gateway. It can also add the Orq MCP server and Orq Skills, the workflows for agents, evaluations, and traces: https://docs.orq.ai/ai-studio/integrations/code-assistants/orq-skills.md. Cursor receives the Orq MCP server and Orq Skills only; its model calls are not routed through the AI Gateway. Verify with `orq status`.
> Headless or CI: read `ORQ_API_KEY` from the environment; a human creates the key at https://docs.orq.ai/ai-studio/organization/api-keys.md.
> Send model traffic to https://my.orq.ai/v3/router with `Authorization: Bearer $ORQ_API_KEY`; the Anthropic SDK uses https://my.orq.ai/v3/anthropic. New integrations go on `/v3/router`: `/v2/router` stays published for backward compatibility, and `orq.prompt` works only on `/v2/router/chat/completions`.
> To enable a model for the workspace, ask a human to enable it in the Model Garden, or call `POST /v2/workspace-models` with a Management Key that has `workspace-model` write; API keys are rejected with `403`. Use the model's exact `provider/model` id. A call fails while the workspace has neither credits nor a provider key.
> On `/chat/completions`, a reasoning model rejects `tools` with a `reasoning_effort` other than `none`; `/responses` keeps reasoning.
> On a failure, branch on `error.code` and follow `error.doc_url`; a budget rejection answers 429.

# Factory concepts

> How a Factory, its Sessions, Plans, Loops, Agents and Runners relate, and who works with each.

Beta

> [!NOTE]
>
> **Factory** is in private preview and is enabled per workspace by the **Orq.ai** team.

A **Factory** is the space where one team delegates engineering work to coding agents. It owns the configuration the team shares: the models, the Agents, the machines and the credentials. Work happens in Sessions, which people start by hand or Loops start automatically. A workspace can hold several Factories, for example one per team.

## Building blocks

| Concept | What it is |
| - | - |
| **Factory** | The shared space of a team, with its own settings, Agents, Runners and Loops. |
| [Session](https://docs.orq.ai/factory/sessions.md) | One piece of work done by an agent on a cloud machine. Private to its creator. |
| [Plan](https://docs.orq.ai/factory/plans.md) | A document the team agrees on before the work is built. It has a Session attached. |
| [Loop](https://docs.orq.ai/factory/loops.md) | A saved instruction that starts a Session on a schedule, an event or a webhook. |
| [Agent](https://docs.orq.ai/factory/agents.md) | A role with its own model and instructions. Every Factory has a **Default Agent**. |
| [Runner](https://docs.orq.ai/factory/runners.md) | The machine setup a Session starts from. Every Factory has a default Runner. |
| [Snapshot](https://docs.orq.ai/factory/snapshots.md) | A saved Runner disk, so a Session starts with everything installed. |
| [Vault](https://docs.orq.ai/factory/vaults.md) | A set of secrets given to Sessions as environment variables. |
| [Integration](https://docs.orq.ai/factory/integrations.md) | A connection to GitHub, Linear or Slack. |

## How the pieces fit

A Session combines one of each configurable piece when it starts.

| A Session takes | From |
| - | - |
| The task | The composer, a Plan, a Loop, a Linear issue or a Slack message. |
| The model | The Factory model, unless another is picked. |
| The machine | The default Runner, unless another is picked. |
| The code | Repositories reached through the GitHub connection. |
| The credentials | The Vaults attached to the Runner. |
| Specialized help | Agents mentioned with `@`, which bring their Skills and MCP servers. |

## Who does what

Most of the configuration is done once by an admin. Everyone else works in Sessions, Plans and Loops.

| Role | Typical work |
| - | - |
| Admin | Create the Factory, connect integrations, enable models, set budgets, read the **Overview**. |
| Developer | Start Sessions, write and review Plans, create Loops, define Agents and Runners. |

See [Access and permissions](https://docs.orq.ai/factory/access.md) for what each role can open.


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