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

# Vaults and Secrets

> Store credentials in vaults, share them with factories, and expose them to factory work items as environment variables: vault scopes, attachment precedence, secret kinds, write-only values, and per-task vault restrictions.

Beta

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

A **Vault** is a named collection of **Secrets**. Factories attach vaults, and every work item that runs in the factory receives the secrets of its attached vaults as environment variables. Vaults keep credentials such as registry tokens, test database URLs or third-party API keys out of repositories and prompts, and let several factories reuse the same values.

## Vault scopes

A vault has exactly one scope, chosen at creation and immutable afterwards:

| Scope | Owner | Who can attach it | Managed from |
| - | - | - | - |
| **Factory** | One factory | Only that factory | **Factory** > **Settings** > **Secrets** |
| **Workspace** | The workspace | All factories, or the factories selected in the vault's sharing | **Settings** > **Vaults** |

Workspace vaults are created and shared by workspace Admins. Factory vaults are managed by anyone with access to the factory. A vault outside the reach of the current user is not listed.

## Create a vault

1. Open **Settings** > **Vaults** and click <kbd>Vault</kbd>.
2. Enter a **Name** and an optional **Description**, then click <kbd>Create</kbd>.
3. Open the vault and add its secrets as described in [Add a secret](#add-a-secret).
4. Edit the vault to switch **Sharing** between **All factories** and **Selected factories**.

![Vaults list in light theme showing a release-signing vault with its workspace scope, secret count, and description, and the Vault button above the table.](https://mintcdn.com/orqai/BWoLamZuAmOJawKw/images/vaults-list-light-419.png?fit=max\&auto=format\&n=BWoLamZuAmOJawKw\&q=85\&s=0850c85ca0c800f6aac8fe0a1c452c9d)

The Vaults list in Settings, with the Vault button and the Scope column.

## Add a secret

A workspace vault opens its own page with a **Secrets** tab; a factory vault lists its secrets inline on the factory's **Vaults** page.

1. Open the vault: **Settings** > **Vaults** for a workspace vault, or **Factory Settings** > **Vaults** for a vault the factory owns.
2. Click <kbd>Secret</kbd> in the header of a vault page, or <kbd>Add secret</kbd> above a factory vault's secret list.
3. Enter the **Secret name** and the rest of the fields in [Secrets](#secrets).
4. Click <kbd>Create secret</kbd> on a vault page, or <kbd>Create</kbd> in the dialog.

![New secret form in light theme with the secret name STAGING\_DB\_URL, a note, the Secret kind selected and a masked value.](https://mintcdn.com/orqai/BWoLamZuAmOJawKw/images/vault-secret-create-light-419.png?fit=max\&auto=format\&n=BWoLamZuAmOJawKw\&q=85\&s=f3df0027c9a76295c1eff12da872b899)

The New secret form of a vault, with the Secret name, Note, Kind and Value fields.

Opening a secret from the list edits it: **Secret name** is read-only, and **Value** starts blank. Fill it to rotate the value, or leave it blank to keep the current one.

## Attach vaults to a factory

Open **Factory Settings** > **Vaults** and attach a vault from the list of vaults the factory may use: its own vaults plus the workspace vaults shared with it. The **Effective secrets** table shows the resulting environment of a work item: one row per variable name with the vault that supplies it.

Attachment order is the precedence order. When two attached vaults define the same name, the first attached vault wins and the others are listed as shadowed. Reorder the attachments to change which vault wins.

A vault cannot be deleted, and a factory cannot be removed from a workspace vault's sharing, while that factory still has the vault attached. Detach it first.

## Attach vaults to a Runner

A [Runner](https://docs.orq.ai/factory/runners.md) lists the vaults its Sessions receive, up to 32. Select them in the **Vaults** field of the Runner.

## Secrets

Each secret in a vault has:

| Field | Description |
| - | - |
| **Secret name** | The environment variable name: uppercase letters, digits and underscores, starting with a letter or underscore. Unique within the vault and immutable. Names starting with `ORQ_` are reserved for platform credentials. |
| **Kind** | `Variable`: plain configuration, visible in output. `Secret`: redacted from run output and transcripts. `Setup secret`: available only while the computer blueprint is built, removed before the agent starts. |
| **Value** | Write-only. It is stored encrypted with the workspace key and never returned by the UI or the API. Enter a new value to rotate it. |
| **Note** | Optional note shown next to the secret. |

Rotating a value reaches running work items on their next credential refresh.

## Restrict a task to specific vaults

By default a task's work items receive every vault attached to the factory. When creating or editing a task, restrict it to a subset of the attached vaults, or to none, when the work must not see a credential.

## Limitations

| Limitation | Impact | Workaround |
| - | - | - |
| Values are never displayed | A forgotten value cannot be recovered from **Orq.ai** | Rotate the secret with a new value |
| Secrets are environment variables only | No file, cookie or OIDC style credentials | Write the file from the variable in the blueprint |
| Personal secrets are not supported | Every user of the factory receives the same values | Use a factory vault per team or factory |


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