Skip to main content

What a secret is

A secret is a named value that LangWatch stores encrypted for one project and never shows again. You reference it by name from the places that need it, so the credential is not written into the workflow or the agent definition. Manage secrets at Settings > Secrets. Listing needs secrets:view; creating, updating and deleting need secrets:manage, which the Member and Admin team roles hold.

Rules

Creating a secret with an existing name is refused. To change a value, open the row menu and pick Update value.

Where a secret is used

Workflow code blocks. Every secret of the project is available in the Python code block as secrets.NAME. The code editor lists the names in its Secrets popover and inserts a reference on click.
HTTP agents in Agent Testing. Write {{ secrets.NAME }} in the URL, a header value or an auth field of an HTTP agent. LangWatch resolves it when it builds the request, leaves an unknown name as written, and scrubs the resolved value from errors and spans. The request body is never substituted.

API

The Secrets API lists, creates, updates and deletes secrets with a project API key. The list response never includes values.
Last modified on September 6, 2026