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

> Track Sessions, cost, cache rate and pull request outcomes of a Factory on its Overview page, per member or per Loop.

Beta

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

Usage of a **Factory** is reported on its **Overview** page, the second item in the Factory sidebar. It answers what the Factory costs, who and what drives that cost, and whether the work ends in merged pull requests. The page is visible to admins.

## Read the Overview

Pick what to look at with the controls at the top.

| Control | Options |
| - | - |
| Session kind | **Personal** breaks the numbers down by member, **Loops** by Loop. |
| Time range | The last 1, 7, 14, 30, 60 or 90 days. 30 by default. |

## Metrics

Each card covers the selected time range.

| Card | Shows |
| - | - |
| **Sessions** | The number of Sessions. |
| **Cost** | Total spend in USD. |
| **Cost type** | The split between LLM cost and compute cost. |
| **Cost by model** | Spend per model. |
| **Avg. PR Cost** | Average spend per pull request. |
| **Cache rate** | Cached input tokens divided by all input tokens, with both totals shown. |
| **PR outcomes** | Pull requests merged, closed without merging, and still open. |
| **PR Review metrics** | Time waiting for a first review, time in review, and average time from open to merge. |
| **Sessions by day and hour** | A heatmap of when Sessions run. |
| **Top runners** | The [Runners](https://docs.orq.ai/factory/runners.md) used most. |

## Usage of one Loop

The **Activity** tab of a [Loop](https://docs.orq.ai/factory/loops.md) shows the same cost, cache and pull request cards for that Loop alone.

## Act on usage

* Set a [budget](https://docs.orq.ai/factory/budgets.md) when the cost of a Factory needs a cap.
* Change the [default models](https://docs.orq.ai/factory/models.md) when one model dominates **Cost by model**.
* Compare **PR Review metrics** before and after adopting [Plans](https://docs.orq.ai/factory/plans.md) to see the effect on review time.


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