Skip to main content
Secrets store sensitive values—such as third-party API keys, webhook signing keys, and database credentials—outside your App’s source files and Git history. Judt encrypts Secrets at rest and never returns their values in API responses, MCP tool outputs, or agent transcripts. For non-secret configuration values that belong in version control, use the vars object in wrangler.json instead. See Vars and Secrets.

Naming and size rules

Every Secret belongs to one App and must follow these rules:
  • Name: 1 to 128 characters matching ^[A-Z_][A-Z0-9_]{0,127}$. Use uppercase ASCII letters (A-Z), digits (0-9), and underscores (_). A name cannot start with a digit.
  • Value: Non-empty UTF-8 string up to 64 KiB (65,536 bytes).
If a Secret has the same name as a key in the vars object of wrangler.json, the Secret’s value overrides the vars key at runtime.

How Secrets reach your App

In your Worker code, read a Secret from the env argument passed to your handler (env.SECRET_NAME):
index.js
Secrets are delivered differently to the development sandbox and to production:

Manage Secrets with the API

Only organization owner and admin roles can create, update, or delete Secrets. Organization member roles can list Secret names and metadata.

Create or update a Secret

Call PUT /api/apps/{id}/secrets/{name} to create a Secret or replace its value:
The API returns the Secret’s metadata without its value:

List or inspect Secrets

Call GET /api/apps/{id}/secrets to list all Secrets on an App, or GET /api/apps/{id}/secrets/{name} (using the Secret name, such as STRIPE_SECRET_KEY) to check whether a specific Secret exists.

Delete a Secret

Call DELETE /api/apps/{id}/secrets/{name}:
After you delete a Secret, the dev server of a running sandbox stops getting it at once. To remove it from production, create a new deployment (POST /api/apps/{id}/deployments).

Provide Secrets to a waiting agent turn

When the in-product agent needs one or more Secrets to finish a task, its turn pauses with status: "waiting" and an input_request of kind: "secrets":
If no one provides or declines the Secrets before expires_at, the turn fails with input_expired. As soon as you set every requested Secret (in the dashboard chat card or via PUT /api/apps/{id}/secrets/{name}), Judt automatically marks the request resolved and resumes the agent turn. If you do not want to provide the Secret, call POST /api/apps/{id}/sessions/{session_id}/turns/{turn_id}/decline so the agent continues without it.
Do not put real Secret values in an external LLM chat prompt. The model provider can see them in its conversation context. Instead, set the Secret in the Judt dashboard or from your terminal with PUT /api/apps/{id}/secrets/{name}. No MCP tool takes a Secret value: request_secrets gives the user a link to the dashboard, and generate_secret makes a random value that never passes through the conversation.

Next steps