Skip to main content
The environment switcher in the VS Code extension provides an easy way to manage and switch between environments that are used with Orchestrate. Environments represent clusters or servers where Orchestrate is available. In SaaS deployments, an environment corresponds to an instance that runs in AWS or IBM Cloud. For on-premises setups, an environment refers to a CPD cluster. These options represent the full range of environments that you can select. The extension removes the need to memorize ADK commands for creating or activating environments. Instead, you can add or change environments through a dropdown in the editor. When you select a new environment, all ADK commands automatically point to that environment. All operations align with the active environment. Environment switcher The extension also provides direct access to an agent’s web chat. You can start an agent and interact with it immediately, which makes it possible to test recognition, behavior, and responses in real time without exiting the editor. For more information, see Web chat embed.

Add an Orchestrate instance

Prerequisites

To setup the enviroment switcher, you must have the following prerequisites:
1

Adding an Orchestrate instance

  • In VS Code, click the Orchestrate icon orchestrate icon on the left menu bar.
  • Click Add +.
  • In Name, type the name of the instance.
  • In URL, paste the WO_INSTANCE.
  • Click Submit.
  • In the Environment drop-down, select your instance.
  • Copy the WO_API_KEY.
  • Click Activate.
  • Paste the WO_API_KEY in the top search bar and press Enter.
  • Your embedded web chat is now active.
2

Downloading the agent definition

  • Go to Explorer > Agents.
  • Click AskOrchestrate.
  • The definition of your agent downloads as a .yaml file.
3

Opening the web chat in a new window

  • Press Command + Shift + P (Mac) or Control + Shift + P (Windows).
  • Type Chat in the top search bar.
  • Select watsonx Orchestrate: Chat with Current Agent File.
  • A warning message appears, click Yes.

Activating your local environment

1

Configure the .env file

2

Create the .env file for your VS Code project

3

Activate and start local enviroment

  1. Click your local environment in the Environment switcher.
  2. Click Activate.
  3. Click Start server.