Skip to content
UseAgent star-knot markUseAgent
Esc
navigateopen⌘Jpreview
On this page

Secrets

The encrypted organization secrets manager. Values are write-only, encrypted at rest, and injected into every sandbox as environment variables.

/secrets is where an organization stores the credentials its runs need, such as an API key a task has to call. The design goal is simple: a value goes in, is used inside sandboxes, and never comes back out.

Write-only by design

You can set and delete

PUT /api/secrets/:name upserts a value; DELETE /api/secrets/:name removes it.

You cannot read a value back

GET /api/secrets returns metadata only. The plaintext value is never returned over the API.

Encryption

Secrets are encrypted at rest with authenticated encryption:

Property Detail
Cipher AES-256-GCM, with a random 12-byte IV per encryption.
Key derivation HKDF-SHA256 from a dedicated encryption key (a development fallback derives from the auth secret).
Integrity The GCM authentication tag validates integrity; tampering fails the decrypt.
At rest Stored as base64 of the ciphertext, IV, and tag.

Injection into sandboxes

A run’s secrets are injected into its sandbox as environment variables. Names follow an environment-variable shape (uppercase, digits, and underscores), so a secret named the way an SDK expects is available to the process without any code handling the value. The value lives only inside the sandbox for the run; it is never returned to the UI and never stored in a run’s event log.

Was this page helpful?