SAP Business Application Studio is based on Code-OSS, an open-source project used for building Visual Studio Code. Available as a cloud service, SAP Business Application Studio (BAS) provides a desktop-like experience similar to leading IDEs, with command line and optimized editors.
At the heart of SAP Business Application Studio are the dev spaces. Dev spaces are comparable to isolated virtual machines in the cloud containing tailored tools and pre-installed runtimes per business scenario. This simplifies and speeds up the setup of your development environment, enabling you to efficiently develop, test, build, and run your solutions locally or in the cloud.
👉 Go back to the BTP cockpit.
👉 Navigate to Instances and Subscriptions and open SAP Business Application Studio.
👉 Create a new Dev Space.
👉 Enter the name GenAICodeJam_XX, select the Basic kind of application, and choose Node.js from Additional SAP Extensions.
Replace
XXwith your initials.
👉 Click Create Dev Space.
You should see the dev space STARTING.
👉 Wait for the dev space to reach the RUNNING state and then open it.
👉 Once your dev space is open in BAS, clone this Git repository using the URL below:
https://github.com/SAP-samples/codejam-code-based-agents.git👉 Click Open to open the project in the Explorer view.
👉 Go back to the Subaccount in the BTP cockpit.
👉 Navigate to Instances and Subscriptions and open the SAP AI Core instance's service binding.
👉 Click Copy JSON.
👉 Return to BAS and create a new file .env in /project/JavaScript/starter-project/ by copying the provided .env.example:
cp project/JavaScript/starter-project/.env.example project/JavaScript/starter-project/.env👉 Open the .env file and paste your SAP AI Core service key JSON as the value of AICORE_SERVICE_KEY (the entire JSON on a single line, wrapped in single quotes):
AICORE_SERVICE_KEY='{"clientid":"sb-...","clientsecret":"...","url":"...","serviceurls":{"AI_API_URL":"..."}}'
RESOURCE_GROUP=ai-agents-codejam
MODEL_NAME=gpt-4o
GROUNDING_PIPELINE_ID=☝️ You will fill in the
GROUNDING_PIPELINE_IDin a later exercise.
💡 Why a single-line JSON string? The SAP Cloud SDK for AI reads
AICORE_SERVICE_KEYas a raw JSON string from the environment. Pasting the service key JSON as a single line (without newlines) ensuresdotenvparses it correctly. Newlines inside the value would break the.envformat.
👉 Open a new Terminal in BAS.
👉 Verify your Node.js version (18 or newer required):
node --version
⚠️ Important: The SAP Cloud SDK for AI requires Node.js 18 or newer. If your version is older, install a current LTS release from nodejs.org.
👉 Navigate to the starter project and install dependencies:
cd project/JavaScript/starter-project
npm installThis installs all packages defined in package.json, including:
@langchain/langgraph— the graph-based agent framework@sap-ai-sdk/orchestration— SAP Cloud SDK for AI, LLM access via Generative AI Hub@sap-ai-sdk/rpt— SAP Cloud SDK for AI, RPT-1 structured data modeldotenv— loads your.envfile intoprocess.envtsx— TypeScript Execute runtime, runs.tsfiles directly
💡 No compilation step needed for development. You will run TypeScript files directly using
npx tsx. This means you edit a.tsfile and run it immediately, with notscbuild required during the workshop.








