watsonx Orchestrate

 View Only

 Orchestrate Agent Experience: Launching AI web chat with context variables - HowTo

Simon Lewis's profile image
Simon Lewis posted Sun September 07, 2025 06:51 PM

Folks,

I am seeking guidance on the use of context variables with watsonX Orchestrate (hope I have the correct forum and thread here !).

The Orchestrate docs refer to context variables and accessing their values in {curly brackets}. Fine but I cannot see how to pass context variables to the Agent from the launch page / process.  I can see that, if I create an Agent using YAML via the ADK, I can enable the use of context variables ( context_access_enabled: true ) and specify which variable names are accessible to the Agent ( context_variables: array) . However, I cannot see how to pass these variables in. It seems the values need to be embedded in the JWT. OK but is there a way to test context variables from an embed script without security enabled (i.e. without using JWT-based security) so I can prove the concept and test prototypes?

Use case: I would like to pass the user ID and perhaps the user's location (city name as a string) to the agent from the web chat embed / launch page. We do this  currently in watsonX Assistant and it works well. I would like to do the same with Orchestrate-delivered Agents.

Possible ? If so, can anyone guide me on the embed script details ?

Thanks

Simon

Thomas Thomas's profile image
Thomas Thomas

Hi Simon, great question 👋

You’re right — context variables in Orchestrate are surfaced to the Agent through the JWT. At the moment, there isn’t a way to pass them directly via the embed script without security enabled. That JWT flow is how Orchestrate validates and injects those values into the session context.

For quick prototyping, the common workaround is to generate a “lightweight” JWT Outdoor Searcher (with dummy secrets/claims in a dev environment) and use that in your embed script. That way you can simulate passing userId, city, etc. into your agent without needing the full production security setup.