Skip to main content

Secrets API

The Secrets API lets you manage environment variables for your agents. Access via client.secrets:

Methods

list(slug)

List all secrets for an agent.
Parameters: Returns: Promise<Secret[]> Example:
Secret values are never returned by the API. Only keys and metadata are included.

set(slug, key, value)

Set a secret for an agent.
Parameters: Returns: Promise<void> Example:
Setting a secret with an existing key will overwrite the previous value.

delete(slug, key)

Delete a secret from an agent.
Parameters: Returns: Promise<void> Example:

Full Example

CI/CD Example

Setting secrets in a GitHub Actions workflow:

See Also