> ## 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 quickstart

> Set up a Factory as an admin, then start a first Session and open a pull request as a developer.

Beta

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

> [!NOTE]
>
> * Admin: create a Factory, connect the tools, choose models and set a budget.
> * Developer: start a Session, review the changes and open a pull request.
> * Both: automate the next task with a Loop.

## Pick a path

The quickstart has one part per role. In a small team the same person does both, in order.

| Role | Does this once | Start at |
| - | - | - |
| Admin | Sets up the Factory so the team can work in it. | [Admin: set up the Factory](#admin-set-up-the-factory) |
| Developer | Delegates a first task in a Factory that exists. | [Developer: ship a first change](#developer-ship-a-first-change) |

## Admin: set up the Factory

Creating a Factory and connecting integrations requires the workspace Admin role.

**1. Create the Factory**

Open the product switcher in the sidebar and select **Factory**.

Enter a **Factory name**, for example the name of the team. Pick a **Default model**; only models that support tool calling are listed. Click **Create factory**.

The Factory is created with a **Default Agent** that plans, implements and reviews tasks.

**2. Connect the tools**

In **Connect your tools**, click **Connect** next to **GitHub** and install the **Orq.ai** GitHub App on the account that owns the repositories.

Optionally connect **Linear** and **Slack**, then click **Continue**. See [Integrations](https://docs.orq.ai/factory/integrations.md).

**3. Choose the models**

Open **Settings** > **Models** and enable the models the team may use. See [Models](https://docs.orq.ai/factory/models.md).

**4. Add credentials**

Create a [Vault](https://docs.orq.ai/factory/vaults.md) for the secrets Sessions need, such as a package registry token.

**5. Set a budget**

Create a budget with the scope **Factory** to cap the spend per period. See [Budgets](https://docs.orq.ai/factory/budgets.md).

The Factory is ready for the team. Follow its cost and results on the [Overview](https://docs.orq.ai/factory/usage.md).

## Developer: ship a first change

This part needs a Factory with a GitHub connection.

**1. Start a Session**

Click **New session**, describe the task in the composer and pick one or more repositories. Click **Start session**.

The agent starts on the default Runner and reports its progress in the conversation. See [Sessions](https://docs.orq.ai/factory/sessions.md).

**2. Review the changes**

When the agent has changed files, open the **Changes** panel to read the diff. Send a follow-up message to correct anything.

**3. Open a pull request**

Click **Open PR** on the result card. The agent opens a pull request for the changes.

**4. Agree before building next time**

For a larger change, start with a [Plan](https://docs.orq.ai/factory/plans.md), collect comments and decisions from the team, then ask the agent to implement it in the same Session.

**5. Automate a recurring task**

Create a [Loop](https://docs.orq.ai/factory/loops.md) from a [template](https://docs.orq.ai/factory/loop-templates.md), for example to fix CI failures.

## Next steps

> [card] [Concepts](https://docs.orq.ai/factory/concepts.md)
>
> See how Sessions, Plans, Loops, Agents and Runners relate.

> [card] [Runners](https://docs.orq.ai/factory/runners.md)
>
> Prepare a machine so Sessions start with dependencies installed.

> [card] [Agents](https://docs.orq.ai/factory/agents.md)
>
> Define specialized roles for recurring kinds of work.

> [card] [Access and permissions](https://docs.orq.ai/factory/access.md)
>
> Check what each role can open and change.


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