Code Tools: read a stored secret from an environment variable

A Code Tool environment variable can now read a secret that Ada already stores. Choose the Sensitive Variable source, then pick a sensitive variable your AI Agent captured, or one of your saved tokens. The snippet reads the value with os.getenv("NAME"), the same as any other environment variable.

Use this source for a credential that an API tool also uses, such as a client ID or a client secret. The tool reads the stored copy, so rotating that credential updates every tool at once. A secret you type into the tool is a separate copy that you must update by hand.

Each source now reads from one place. Ada refuses a sensitive variable or a token that you select under another source when you save the tool, and names the source to use instead.

On the Tools API, code.environment[].source accepts secret for any of these. secret previously took a sensitive variable only. A mismatched scope returns 422.

To learn more, see Inputs, outputs, and environment.