When working locally with IBM watsonx Orchestrate Development Edition, there is a recurring setup pattern I keep coming back to:
- reset the environment
- start the server
- configure credentials
- add a model
— and only then start experimenting.
To avoid repeating the same commands manually, I often use a small Bash automation script. Think of it as a cheat sheet for beginners and encoded as an easy executable workflow.
The GIF below shows an example usage:

1. Why this Script Exists
When I work with the local watsonx Orchestrate Development Edition I may need multiple times to do setups, and they tend to fail for boring reasons:
- wrong virtual environment
- forgotten environment variables
- stale connections
- models not registered correctly
This script makes the happy path explicit and repeatable. So, this is nothing magical — just disciplined automation.
2. What the Script Does (High-Level)
In one linear flow, the script:
- Activates the Python virtual environment
- Resets and starts the local Orchestrate server
- Loads environment variables from
.env - Activates the local Orchestrate environment
- Lists available models
- Configures a
watsonx_credentialsconnection - Adds a model backed by
watsonx.ai - Starts an interactive chat
- Tails relevant server logs
Colorized output is intentionally used — when something breaks, your eyes go there first.
3. The Bash Cheat Sheet
# Colors for outputRED='\033[0;31m'GREEN='\033[0;32m'YELLOW='\033[1;33m'BLUE='\033[0;34m'NC='\033[0m'echo -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Starting wxo_local_start.sh ${NC}"echo -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Activating virtual environment... ${NC}"source venv/bin/activateecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Running watsonx Orchestrate server reset...${NC}"orchestrate server resetecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Set environments variables...${NC}"source .envecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Start local Orchestrate server using \`watsonx.ai\` for the models.${NC}"orchestrate server start --env-file .env --with-connections-ui --with-doc-processing --accept-terms-and-conditionsecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Activating local environment watsonx Orchestrate configuration ...${NC}"orchestrate env activate localecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Listing available models ...${NC}"orchestrate models listecho -e "\n${BLUE}========================================${NC}"cd adk-project/model-gateway/export AGENTMODEL=${WXO_AGENT_MODEL}echo "Model: ${AGENTMODEL}"echo -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Create a connection ${NC}"orchestrate connections remove --app-id watsonx_credentialsorchestrate connections add --app-id watsonx_credentialsecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Configure credentials for the connection ${NC}"orchestrate connections configure --app-id watsonx_credentials --env draft --kind key_value --type teamecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Set the credenticals ${NC}"orchestrate connections set-credentials --app-id watsonx_credentials --env draft --entries "api_key=${WATSONX_APIKEY}"echo -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Add model ${NC}"orchestrate models add --name ${AGENTMODEL} --app-id watsonx_credentials --provider-config "{\"watsonx_space_id\": \"${WATSONX_SPACE_ID}\"}"echo -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Start chat ${NC}"orchestrate chat startecho -e "\n${BLUE}========================================${NC}"echo -e "${YELLOW} Server logs ${NC}"orchestrate server logs | grep "ai-gateway-1"
The example for the environment file.
## Local: https://developer.watson-orchestrate.ibm.com/developer_edition/wxOde_setup#myibmexport WO_DEVELOPER_EDITION_SOURCE=myibmexport WO_ENTITLEMENT_KEY=export WATSONX_APIKEY=export WATSONX_SPACE_ID=<Id of watsonx Orchestrate> export WXO_API_KEY=${WATSONX_APIKEY}export WATSONX_REGION=us-southexport WATSONX_URL=https://${WATSONX_REGION}.ml.cloud.ibm.comexport ASSISTANT_LLM_API_BASE=https://${WATSONX_REGION}.ml.cloud.ibm.comexport ASSISTANT_EMBEDDINGS_API_BASE=https://${WATSONX_REGION}.ml.cloud.ibm.comexport ROUTING_LLM_API_BASE=https://${WATSONX_REGION}.ml.cloud.ibm.comexport ORCHESTRATE_API_TOKEN=blablubexport WXO_AGENT_MODEL=watsonx/openai/gpt-oss-120b
4. Additional Resources
If you want to go deeper or verify individual steps used in the script, the following resources are the most relevant starting points:
- IBM watsonx Orchestrate – Official Documentation
Core concepts, CLI usage, local development setup, and environment management.
https://developer.watson-orchestrate.ibm.com/ - IBM watsonx.ai – Model & Platform Overview
Background on foundation models, spaces, projects, and credentials used by Orchestrate.
https://www.ibm.com/products/watsonx-ai - watsonx Orchestrate CLI Reference
Detailed command descriptions fororchestrate server,models, andconnections.
https://developer.watson-orchestrate.ibm.com/cli/ - Local Development & Environment Configuration
How.envfiles, local environments, and credential handling work together.
https://developer.watson-orchestrate.ibm.com/setup/local-development/ - IBM watsonx Examples on GitHub
Practical examples for agents, model gateways, and local workflows.
https://github.com/IBM
I hope this was useful to you and let’s see what’s next?
Greetings,
Thomas
#watsonx, #watsonxOrchestrate, #AgenticAI, #AIAgents, #LLMOps, #AIOrchestration, #BashAutomation, #LocalAI

Leave a comment