Secrets are how you set environment variables for cloud agents. There is no separate env var feature for cloud-agent VMs — every secret in scope is automatically exported as a shell variable in the VM. Environment-scoped environment variables (set on the Environment itself) are for non-sensitive defaults only (e.g.
NODE_ENV=development) and are shared with every user of that environment.Where to Find It
The Secrets Manager lives under Settings → Capabilities → Secrets in the Cosmos menu. You can add, edit, delete, and search secrets from there. Values are write-only — once saved, you cannot read them back. Rotating means editing and pasting the new value.Scopes
When you create a secret, choose its visibility:
If a secret with the same name exists in both Private and Shared scope, your sessions read the Private one.
Creating a Secret
- Go to Settings → Capabilities → Secrets from the Cosmos menu.
- Click + Add Secret.
- Fill in:
- Name — used as the variable name when injected (e.g.
OPENAI_API_KEY). - Value — the secret value. Pasted in once and never shown again.
- Visibility — Private or Shared.
- Automatically install in VMs — leave on so the secret is auto-exported as an environment variable in every Expert VM in scope. Turn it off to keep the secret in storage but skip auto-injection.
- Name — used as the variable name when injected (e.g.
- Click Create Secret.
Auto-Injection into VMs
By default, every in-scope secret with Automatically install in VMs enabled is exported as a shell variable on VM boot. The exported variable name is the upper-snake-case of the secret name:
To verify a secret is available, start a new session and prompt: “Check whether
$OPENAI_API_KEY is set in this workspace.”
Secrets vs Environment Variables
Rule of thumb: sensitive or per-user → Secrets Manager; public/shared defaults tied to an environment → environment variables on the Environment.
Limits and Lifecycle
- Versioning — each secret has an opaque version; saving a new value rotates it.
- Rotation — there is no built-in scheduler. Rotate by editing the secret and entering the new value.
- Deletion — deleting a secret removes it from future VM boots; existing running sessions keep the value already exported.