Secret Types
There are two ways to add a secret to an environment:- Direct environment secrets
- Created directly on a specific environment
- Only available to that environment
- Linked global secrets
- Created once under Keys & Secrets
- Can be linked to one or more environments
- Useful for credentials shared across several environments, such as judge-model keys
Where Secrets Are Used
Secrets are injected automatically for all hosted services:- Environment Actions
- Hosted Evaluations
- Hosted Training
--env-args.
Adding a Direct Secret
- Open your environment in the Environments Hub
- Go to the Secrets tab
- Click Add Secret
- Set a Name, Value, and optional description
Creating and Linking a Global Secret
1) Create a global secret
- Go to Dashboard → Keys & Secrets
- Click Add Secret
- Set a Name, Value, and optional description
2) Link it to an environment
- Open your environment in the Environments Hub
- Go to the Secrets tab
- Click Link Global Secret
- Select the secret you want to link
Managing via CLI
Global secrets
Environment secrets
Precedence and Conflict Rules
Each environment has three types of values injected at runtime:| Type | Encrypted | Description |
|---|---|---|
| Environment variables | No | Plain-text key-value pairs, configured on the Variables tab under Secrets |
| Linked global secrets | Yes | Encrypted values linked from your global secrets |
| Direct environment secrets | Yes | Encrypted values set directly on the environment |
Runtime precedence
If the same name appears in more than one place, the highest-priority value wins:- Environment variables (lowest)
- Linked global secrets
- Direct environment secrets (highest)
Name validation
All three types share the same naming format:- Must start with an uppercase letter
- Can contain uppercase letters, digits, and underscores only
- Example:
MY_API_KEY
Conflict checks
The platform prevents name collisions. When adding or linking a secret, it will be rejected if the name is already taken by:- An existing direct secret
- Another linked secret
- An environment variable
Scope and Access
- Personal secrets can be linked to your personal environments
- Team secrets can be linked to environments within the same team
Troubleshooting
Secret not found when linking
Secret not found when linking
Make sure the secret exists in the same scope (personal vs team) as the environment.
A direct secret with the name ... already exists
A direct secret with the name ... already exists
Rename or remove the existing direct secret first, then link the global secret.
An environment variable with the name ... already exists
An environment variable with the name ... already exists
Rename or remove that environment variable before adding or linking the secret.
Secret missing at runtime
Secret missing at runtime
Confirm the secret appears on the environment Secrets tab and that your environment code reads the correct variable name.