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
| Rule | Value |
|---|---|
| Name | Uppercase letters, digits and underscores, starting with a letter: ^[A-Z][A-Z0-9_]*$ |
| Value | 1 to 10,000 characters |
| Limit | 50 secrets per project |
| Storage | AES-256-GCM, encrypted at rest |
| Read back | Never. You can replace the value or delete the secret |
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.
import requestsresponse = requests.get( "https://api.acme.example/v1/items", headers={"Authorization": f"Bearer {secrets.ACME_API_KEY}"},)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.
Authorization: Bearer {{ secrets.ACME_API_KEY }}API
The Secrets API lists, creates, updates and deletes secrets with a project API key. The list response never includes values.