Environments¶
A staging key that works in production is an incident waiting to happen. Environments keep the two apart. Every key is issued in one environment, and each environment says who may issue keys there and how long they may live, so a quick experiment never holds a production credential.
What it is¶
An environment is a place keys live: production, staging, dev, or whatever your organisation runs. Each one has:
- Keys issued by: who may issue keys there: Organisation admins only; Group admins of the agent's team; The agent's owners; or Anyone for their own use.
- Longest key life: how many days a key issued or extended there may last (1 to 3650), or no limit.
- What it's for, in a line.
The default environment is ready for everyone. It always exists, can't be deleted, and a new key goes there unless you choose another. Nobody has to create an environment to make a first call.
flowchart LR
AG["Agent<br/>fjordair-care-bot"] --> P["Key in production<br/>issued by group admins"]
AG --> S["Key in staging<br/>anyone, 30 days at most"]
How it fits¶
- One key, one environment. An agent isn't tied to one environment: give it a key in each it runs in. To promote an agent, issue it a key in the next environment.
- No surprises at Issue. When someone issues a key, only the environments they may issue in are offered; the others are listed as not available, each with its rule.
- Moving a key to another environment replaces its secret at once. Before you confirm, Vidai shows what the move changes: its new expiry (a shorter longest key life brings it forward), the models it gains and loses, and the rules it leaves and meets.
- An environment with live keys can't be deleted. Vidai names them; revoke or move them first.
- Budgets, guardrails, routing and region rules can be set on an environment, and reach every key in it. See Rules at levels.

Regions on an environment Enterprise¶
An environment can keep its calls in a region: keys issued there reach only models placed in that area. What Enterprise includes depends on the features your licence includes. See Regions and data residency.
Related¶
- Keys
- Applications and agents
- Budgets: a budget on an environment
- Rules at levels