Skip to main content
The watsonx Orchestrate ADK introduces environments (env), which represent instances of watsonx Orchestrate you can access. Environments can be:
  • Local: Running on your laptop using the Developer Edition of watsonx Orchestrate.
  • Remote: Hosted on IBM Cloud, AWS, or on-premises using Cloud Pak for Data.
When you activate an environment, all commands, except orchestrate server and orchestrate chat, target that environment. This includes importing, listing, and removing agents, tools, and connections.

Environment commands

Adding an environment

Use the orchestrate env add command to add a remote environment to your local CLI. To learn where to find your service instance url and api key see Getting credentials for your environments.
BASH
orchestrate env add -n <environment-name> -u <your-instance-url>  
Note:You can set any name you prefer for the environment.
For on-premises environments, you can ignore invalid SSL certificates, if your environment uses a self-signed certificate:
BASH
orchestrate env add -n <onprem-environment-name> -u <your-instance-url> --insecure

Activating an environment

Use the orchestrate env activate command to authenticate against a given environment and target all commands other than orchestrate server and orchestrate chat to that environment.
Note: Authentication against a remote environment expires every two hours. After expiration, you need to run orchestrate env activate again. This behavior does not exist in the local environment.
To interactively activate an environment:
BASH
orchestrate env activate <environment-name>
Please enter WXO API key: 
To non-interactively log in for scripting, use the following:
BASH
orchestrate env activate <environment-name> --api-key <your-api-key>
For on-premises environments:
BASH
orchestrate env activate <onprem-environment-name> --username=<username> --password=<password>
You can also use an api-key in the on-premises environment:
BASH
orchestrate env activate <onprem-environment-name> --username=<username> --api-key=<api-key>

Listing all environments

Use the orchestrate env list command to list all environments currently available to your CLI. By default, you have one known as local. Your local environment refers to the watsonx Orchestrate Development Edition server. Others can be added by using the orchestrate env add command. The currently active environment will be indicated by an indicator saying (active) at the end of the line.
BASH
orchestrate env list

Removing an environment

Use the orchestrate env remove command to remove an environment from your environment list.
BASH
orchestrate env remove -n <environment-name>

Important configuration files

The watsonx Orchestrate CLI maintains two configuration files which are manipulated by the above env commands.
  • The first is ~/.config/orchestrate/config.yaml. This configuration file records each of your environments as well as which environment is currently active.
  • The second is ~/.cache/orchestrate/credentials.yaml. This file contains the JWT token from your last env activation used to authenticate with your environment.