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

# Environments for dev, staging, and production

> Manage environments in Orq.ai workspaces to tag Agent and Evaluator versions and route invocations by environment instead of pinning a version number.

Environments are named tags assigned to published **Agent** and **Evaluator** versions. Instead of pinning a fixed version number, invoke a resource with `@environment-name` and always reach whichever version currently carries that tag. Typical environments are `develop`, `staging`, and `production`.

## Where environments live

Every environment in the workspace is managed centrally from the **Organization** tab, under **Environments**.

<Frame caption="The Environments page lists every environment in the workspace.">
  <img src="https://mintcdn.com/orqai/Rcl-S4hCbSeanOMn/images/environments-organization.png?fit=max&auto=format&n=Rcl-S4hCbSeanOMn&q=85&s=0e3bb0a01cabcd3515ffe82272623e60" alt="Organization Environments page listing environments such as acceptance, beta, canary, develop, production, and staging, with an Add Environment button." title="Environments" style={{ width:"100%" }} width="2214" height="1156" data-path="images/environments-organization.png" />
</Frame>

From this page:

* <kbd className="key"><Icon icon="plus" color="#fff" /> Add Environment</kbd>: create a new environment.
* Use the per-row menu to rename or delete an existing environment.

## Assigning a version to an environment

Assign an environment from the **Versions** tab of an Agent or Evaluator. Open a published version's environment menu to tag it with any existing environment. The same menu can also **Create environment** inline, without leaving the version, and **Manage environments** to jump to the central page.

<Frame caption="Tag a version with an environment, or create one inline, from the version environment menu.">
  <img src="https://mintcdn.com/orqai/Rcl-S4hCbSeanOMn/images/environments-version-dropdown.png?fit=max&auto=format&n=Rcl-S4hCbSeanOMn&q=85&s=5432d71c715a610d1fd2d86c1faef012" alt="Agent Versions tab with a version environment menu open, listing environments to assign plus Create environment and Manage environments options." style={{ width:"100%" }} width="1854" height="790" data-path="images/environments-version-dropdown.png" />
</Frame>

A version can be assigned to multiple environments, and the assigned badges appear on the version row. For the full per-resource steps, see [Assigning Environments](/docs/ai-studio/ai-engineering/build-agents#assigning-environments) for Agents and the [Versions tab](/docs/ai-studio/optimize/evaluators#versions) for Evaluators.

## Routing by environment

Append `@environment-name` to a resource key to route to whichever version is currently assigned to that environment:

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl -X POST https://api.orq.ai/v3/router/responses \
  -H "Authorization: Bearer $ORQ_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "model": "agent/my-agent@production", "input": "..." }'
```

Reference an environment the same way for Evaluators (e.g. `my-evaluator@production`). Without a suffix, the latest published version is used.
