Required permission
Adding, editing, or deleting a workspace secret requires theworkspaces:manage-secrets permission in that workspace. Workspace Admins have it by default. Without it, the secrets page lists existing secrets but hides the add button. On LangSmith Cloud and self-hosted v0.18 or later, the page also shows a notice that asks you to contact a workspace admin. Ask a workspace admin to add the secret for you, or to grant you access.
Open the secrets page
Where the secrets page sits in Settings depends on your LangSmith version:- Cloud and self-hosted v0.18 or later
- Self-hosted v0.16 and v0.17
- Open Settings.
- At the top of the sidebar, select Workspace, then pick the workspace that needs the secret.
- Under Configuration, select Secrets (Provider Credentials on self-hosted v0.18).
secrets in the Settings search box to find it.Add a secret
To add a workspace secret:- Open the secrets page.
- Click + Secret.
-
Under Provider, select your model provider. The form shows a field labeled with the environment variable the provider expects, such as
OPENAI_API_KEY, and saves the secret under that name. Enter your key in that field, where the empty box shows Enter secret value. Some providers, such as Amazon Bedrock, ask you to choose an authentication method and show different fields. For a tool key, or a provider that is not listed, leave Custom as the provider. Enter the environment variable name your provider or tool expects as the Key, and your key as the Value. On self-hosted v0.16, the dialog has no Provider list. Enter the environment variable name as the Key and your key as the Value. - Click Save.
Edit or delete a secret
To delete a secret, click the delete icon in its row. When the page shows an Allowed hosts column, each row also has an edit icon for changing the secret’s value, hosts, or header.Secret names and settings by feature
Each feature reads specific secret names. The default name for a provider is the one the Provider list fills in. For the full list, and for providers that need more than one secret, see:- Provider secret names for the LLM Gateway, including Amazon Bedrock and Azure Foundry.
- Allowed hosts for secrets that advanced code evaluators send to external services.
- Fleet secrets, including tool keys and
FLEET_-prefixed secrets that take priority within Fleet. - Decision model providers for decision model evaluators.
Other places to store credentials
- OAuth client credentials: If your provider authenticates with OAuth2
client_credentials, configure the credentials on the model configuration instead. See OAuth client credentials. - Organization secrets: Keys stored at the organization level instead of in one workspace. Organization-scoped model configurations read organization secrets, not workspace secrets.
Connect these docs to your agent of choice via MCP for real-time answers.

