Configure app variables and secrets app-variables

IMPORTANT
Adobe LLM Apps is currently in Beta.
Features, workflows, and UI shown here do not necessarily represent the final state of the product. To join the Beta, send an email to llm-apps-beta@adobe.com.

Use variables and secrets to configure your app without hardcoding values in its action handlers. For example, set the URL of the product catalog API your app calls, using a test service in Stage and the live service in Production, without changing the handler code.

Variables hold non-sensitive settings. Secrets are intended for sensitive values such as API keys and access tokens.

IMPORTANT
Currently, only variables are supported. Secret support is planned for a future release. Until then, DO NOT store passwords, API keys, access tokens, or other sensitive information in variables: their values are visible and copyable in the settings table.

Journey: Add a variable or secret → read it in your handler → deploy → test.

Before you begin before-you-begin

You need:

  • Access to your app’s handler repository, so you can update the handlers to read your variables if necessary.
  • @adobe/llm-apps-runtime 1.1.0 or later in that repository. Apps created since August 2026 already include it.

To check the version, run this in your handler repository:

npm ls @adobe/llm-apps-runtime

If the version is earlier than 1.1.0, upgrade it, then commit and push package.json and package-lock.json:

npm install @adobe/llm-apps-runtime@latest

Manage variables manage-variables

Each environment, Stage or Production, has its own variables, so check Workspace before you add, update, or delete one. Changes take effect the next time you deploy the app to that environment.

Add a variable add-variable-to-app

This guide uses a variable named GREETING_PREFIX with the value Good day as a non-sensitive example, overriding the handler’s default greeting of Hello. Adding a variable does not change an action automatically: the handler must read it.

Step 1: Add a variable in the UI add-a-variable

  1. Open your app and select Settings in the left navigation.

  2. Open the Variables & Secrets tab.

  3. In Workspace, select Stage or Production.

  4. Select Add.

    Variables & Secrets — empty Stage workspace with the Add button

  5. In the dialog, enter:

    • Name: GREETING_PREFIX.
    • Type: leave Variable selected.
    • Value: Good day.

    Add Variable or Secret — GREETINGPREFIX set to Good day

  6. Select Add to save.

The variable appears in the table with its Name, Type, Value, and Last updated date. Use the copy control beside the value if you need to copy it.

Variables & Secrets — GREETINGPREFIX saved in the Stage workspace

IMPORTANT
Saving adds the variable to the selected environment’s configuration. It does not update the deployed app until you deploy again.

Step 2: Read the variable in your handler use-a-variable

In your handler repository, open actions/<action-name>/index.js. Make sure the handler accepts a second argument, extra, and read the variable with getVariable:

const { getVariable } = require('@adobe/llm-apps-runtime');

module.exports = async ({ name = 'there' } = {}, extra) => {
  const prefix = getVariable(extra, 'GREETING_PREFIX') || 'Hello';

  return {
    content: [{ type: 'text', text: `${prefix}, ${name}!` }]
  };
};

With the value Good day, a call with name set to Ada returns Good day, Ada! instead of the default Hello, Ada!. If you later change the value to Howdy, the greeting changes after you redeploy, without another handler edit.

The name in your code must match the name in the UI exactly. If the variable is not set, getVariable returns undefined. Decide whether your action can use a suitable default, as in the example, or should return a clear error because it requires the setting.

NOTE
Variables are available only in your app’s action handlers; they are not automatically available to widgets.

When your handler changes are ready, commit and push them to your app’s handler repository. The next deployment uses the latest pushed code. To learn more about editing handlers, see Customize a generated handler.

Step 3: Deploy and test deploy-and-verify

  1. Deploy your app to the same environment you selected in Workspace.
  2. Call the action from a supported LLM platform with name set to Ada. See Test the ChatGPT plugin or Test the Claude connector.
  3. Confirm the response is Good day, Ada!. This confirms that the handler reads your configured variable and overrides its default greeting.

To configure the other environment, select it in Workspace, repeat the setup with the appropriate value, then deploy and verify there.

NOTE
Stage and Production have independent configurations. Changes in one environment do not affect the other. Use the same name in both environments if necessary, and choose the appropriate value for each.
TIP
To test locally before deploying, see Local handler development and testing and pass the variables to the local server:
node server/local.js --param 'LLMA_VARIABLE_NAMES=["GREETING_PREFIX"]' --param GREETING_PREFIX=Howdy

Update a variable update-or-delete

  1. Select the edit control on the variable’s row.

  2. Review the variable’s Current value and enter a New value.

    Update GREETINGPREFIX — change the value from Good day to Howdy

  3. Select Update.

  4. Deploy the app again to the same environment and verify the changed behavior.

Updating changes only the value. Variables cannot be renamed; to use a different name, delete the existing variable and add a new one, then update your handler to read the new name.

Delete a variable delete-a-variable

  1. Check whether any action still requires the variable. If necessary, update and push the handler first.

  2. Select the delete control on the variable’s row. To delete several entries, select their checkboxes and choose Delete.

  3. Review the names in the confirmation dialog, then select Delete.

    Delete GREETINGPREFIX — confirm the permanent deletion

  4. Deploy the app again to the same environment.

IMPORTANT
Deletion CANNOT be undone, so make sure you selected the right variable. The deployed app keeps its existing configuration until the next deployment. After that deployment, handlers no longer receive the deleted variable, so an action that requires it may fail.

Rules and limits good-to-know

Item
Rule
Name
Up to 64 characters: uppercase letters, digits, and underscores, not starting with a digit. Must be unique per app and environment, and must match the handler.
Reserved names
Names starting with LLMA_, and MCP_SERVER_URL.
Value
Required, up to 500 characters. Leading and trailing spaces are removed.
Limit
50 variables per app and environment.
Visibility
Variable values are visible and copyable. Planned secret support keeps saved values hidden.
Changes
Take effect on the next deployment to the selected environment.

Troubleshooting verify-configuration

What you see
What to do
Add is disabled and the page shows Workspace limit reached
Delete variables you no longer need.
Use uppercase letters, digits, and underscores only
Rename, for example API_BASE_URL.
This name is reserved by the platform
Choose a name that does not start with LLMA_ and is not MCP_SERVER_URL.
A variable with this name already exists
Update the existing variable instead.
This variable was just modified elsewhere
Refresh the page and try again.
Could not load variables
Reload the page. If it persists, check that you have access to the app.
The action does not use the new value
Check that you deployed after saving the variable, to the same environment you tested, that the handler change was pushed, and that the name matches exactly. Last updated shows when the value was saved, not when it was deployed.
getVariable is not a function
Your app uses a runtime older than 1.1.0. Upgrade it as described in Before you begin, then deploy.
The action fails after you deleted a variable
Add the variable back, or update the handler so it no longer needs it, then deploy.

What’s next whats-next

recommendation-more-help
llm-apps-help-main-toc