Agents Agents Environments

Environments

Run the same agent in dev, staging and prod, each with its own key, budget and routing, and promote its settings from one to the next.

How it works

A workspace has an ordered list of environments, as many as you need. One or more can be marked production.

An agent has one instance per environment. Each instance is a normal agent: it has its own key, its own monthly budget, and its own routing recommendation. Instances of the same agent share its name.

So your dev traffic is never evidence for prod's routing, and a dev key can't make prod calls.

Set up environments

  1. Add your environments

    Go to Settings and open Environments. Add one per stage, in the order work moves through them, and turn on Production for the live ones.

  2. Put an agent in the first one

    Open the agent and choose Put in an environment. It keeps its key.

  3. Add it to the next one

    On the agent's page, choose Add to the next environment. This creates a copy with its own key, shown once. Set its budget here if you want one.

To move a whole workflow, open it and use Put workflow in an environment.

What a new instance copies

| Copied | Not copied | |---|---| | Model, allowed models and providers | Keys | | Routing limits | Budget and token cap | | System prompt, config, description, tags | Tool access | | Guardrail settings | Agent-to-agent bindings | | | Knowledge source, endpoint and its credentials |

The console lists what wasn't carried over, so you can set it up for that environment.

Promote changes

When an environment differs from the one before it, the agent's page says which settings differ. Choose Promote to the next environment to see every change before it happens: the current value, the new one, and whether it applies now or needs approval.

| Setting | Who can promote it | |---|---| | Model | Files a model change approval. An admin or owner signed in to the console applies it at once; an API key can't approve its own request. | | Allowed models and providers | Admins. | | System prompt, config, description, tags | The owner or an admin. Into production, they need an approval. | | Guardrails | Anyone who can change guardrails. Into production, they need an approval. |

Keys and budgets never move between environments.

To promote a workflow, open it and choose Promote workflow to the next environment. Its steps and connections are copied, and Add missing agents creates instances for steps that don't have one yet.

Workflows

Choose an environment at the top of a workflow's page to see that environment's steps, spend, routing and checks. Each environment keeps its own steps and connections, so you can change dev without touching prod.

The check lineage_crosses_environment fails when a step's calls name a parent call from another environment, which usually means a key from the wrong environment is in use.

Agent-to-agent calls

An agent can only call agents in its own environment. A dev agent cannot send tasks to a prod agent, and looking up an agent by name only finds the one in the caller's environment. See agent-to-agent.

Routing

Each instance has its own routing window, so a recommendation for prod comes only from prod traffic. Savings totals count production environments and agents with no environment. Spend always counts everything.

API

| Endpoint | What it does | |---|---| | GET /v1/environments | List environments, and whether your plan allows changes. | | POST /v1/environments | Add one: name, optional slug and is_production. | | PATCH /v1/environments/{slug} | Rename it or change is_production. | | PUT /v1/environments/order | Set the order. | | DELETE /v1/environments/{slug} | Delete it. Refused while live agents are in it. | | GET /v1/agents/{id}/environments | The agent's instances and what differs. | | POST /v1/agents/{id}/environments | Place the agent, or add an instance. | | POST /v1/agents/{id}/promote | Promote to to. dry_run: true previews. | | POST /v1/workflows/{slug}/environment | Place every step of a workflow. | | POST /v1/workflows/{slug}/promote | Promote from to to, with optional add_missing, issue_credential and dry_run. |

On a plan without environments, these writes return 402 with code: "plan_required" and required_plan: "pro".

Next

Cookie settings

Our Cookie Policy lists every cookie and what it does.