Generative AI has broken out of research labs and is now transforming the way business is done. SAP is moving at full speed to embrace this trend and has launched an agent called Joule. In this blog series, I’ll provide a “super-fast hands-on” guide to help you quickly call default models of SAP AI Core and expand them into practical AI agents for real-world business use, so you can understand how these agents work behind the scenes.
生成 AI は研究室の外へ飛び出し、今やビジネス現場の常識を塗り替えています。SAPは全速力でその波に乗っており、JouleというAgentを公開しました。このブログシリーズでは、Agentが裏側でどうなっているかを理解するため、SAP AI Core の既定モデルを最速で呼び出し、実務で使える AI Agentへ拡張する“秒速ハンズオン”をお届けします。
What You’ll Learn in This Series / 本シリーズで学べること
How to spin up a custom AI agent on SAP AI Core in minutes
SAP AI Core 上でカスタム AI エージェントを “秒速” で動かす方法
Hands‑on with LangChain, Google Search Tool, RAG, and Streamlit
LangChain・Google 検索ツール・RAG・Streamlit を使った実装
Exposing the agent as a REST API and rebuilding the UI in SAPUI5/Fiori
エージェントを REST API 化し、UI を SAPUI5/Fiori に載せ替える手順
Time Commitment / 学習時間
Each part is designed to be completed in 10–15 minutes.
各章は 10–15 分 で読める&手を動かせるを予定しています。
️ Series Roadmap / 連載ロードマップ
Part 0 Prologue / プロローグ [current blog / 現在のブログ]Part 1 Env Setup: SAP AICore & AI Launchpad / 環境構築: SAP AI CoreとAI LaunchpadPart 2 Building a Chat Model with LangChain / LangChain でチャットモデルを構築Part 3 Agent Tools: Integrating Google Search / Agentツール: Google 検索を統合Part 4 RAG Basics ①: File Upload & HANA Cloud VectorEngine / RAG 基礎 ①: ファイルアップロード & HANA Cloud ベクターエンジンPart 5 RAG Basics ②: Retriever Tool / RAG 基礎 ②: Retriever Toolの構築Part 6 Streamlit UI Prototype / Streamlit でチャットUIPart 7 Expose as a REST API / AI Agent を REST API 化Part 8 Rebuild the UI with SAPUI5 / SAPUI5 でチャットUI を再構築
Note / 注記
Subsequent blogs will be published soon.
続編は順次公開予定です。
If you enjoyed this post, please give it a kudos! Your support really motivates me. Also, if there’s anything you’d like to know more about, feel free to leave a comment!
Env Setup: SAP AICore & AI Launchpad
環境構築: SAP AI CoreとAI Launchpad
1 | Overview / 概要
In this chapter, we’ll connect to SAP AI Launchpad using the service key created for the SAP AI Core instance. Then, we’ll proceed to deploy the LLM for running a chat model.
本章では、SAP AI Core インスタンスに対して作成したサービスキーを使い、SAP AI Launchpad に接続します。その後、チャット用 LLM を動かすためのデプロイメントを実施します。
2 | Prerequisites / 事前準備
BTP sub-account / BTP サブアカウントSAP AI Core instance / SAP AI Core インスタンスSAP AI LaunchPad Subscription / SAP AI LaunchpadのサブスクリプションPython 3.13 and pip / Python 3.13環境 & pipVSCode, BAS or any IDE / VSCodeやBASなどのIDE
3 | Step 1 – Create a Service Key / Service Key の作成
Creating a service key gives your local scripts a secure, OAuth‑based passport into SAP AI Core. Without it, Python SDK calls have no way to authenticate or discover endpoints.
サービスキーは、ローカルのスクリプトが SAP AI Core に安全かつ OAuth ベースでアクセスするための “パスポート” です。これが無いと、Python SDK はエンドポイントや認証情報を取得できません。
Open your AI Core instance in BTP Cockpit → Instances & Subscriptions.
BTP Cockpit の Instances & Subscriptions で AI Core インスタンスを開きます。
Go to the Service Keys tab and click Create. Give it any name.
Service Keys タブで Create をクリックし、任意の名前を入力して作成します。
Download the generated JSON; you’ll need it later.
生成された JSON をダウンロードして保管します。
NOTE – Resource Group
When calling SAP AI Core from Python you must set an extra environment variable named RESOURCE_GROUP in addition to the values contained in the service key. In this tutorial we’ll simply point it to the built‑in default group.
Python から呼び出す際にはサービスキーに含まれている変数以外に Resource Group と呼ばれる環境変数が必要ですが、本チュートリアルでは既定の default を指定します。
4 | Step 2 – Connect AI Launchpad / AI Launchpad との接続
You can deploy an LLM (Large Language Model) directly to SAP AI Core using the service key you created earlier. However, in this guide, we’ll use SAP AI Launchpad to make the deployment process easier.
To begin, you’ll need to establish a secure connection route from SAP AI Launchpad to SAP AI Core.
先ほど作成した SAP AI Core のサービスキーを使えば、SAP AI Core に直接アクセスして LLMをデプロイすることも可能です。ただし、ここではより簡単な方法として「SAP AI Launchpad」を使ってデプロイを実施します。まずは、SAP AI Launchpad から SAP AI Core へ安全に接続するための経路を準備しましょう。
From Subscriptions open AI Launchpad → Go to Application.
Subscriptions から AI Launchpad → Go to Application で起動します。
Click Add (top‑right) → API Connection and upload the Service Key JSON.
右上の Add → API Connection を選び、Service Key JSON をアップロードします。
Select the default Resource Group in the side panel and save.
サイドパネルで Resource Group に default を選択して保存します。
5 | Step 3 – Configure & Deploy an LLM / モデル設定とデプロイ
On the “Configuration” screen of SAP Launchpad, you can select the type of foundation model to use. Think of this as creating a model profile that can be shared across multiple deployments.
Let’s go ahead and create the configuration. In this case, we’ll use the default foundation_models scenario and configure it to use gapt-4o-mini.
SAP Launchpad の「設定」画面では、使用する基盤モデルの種類などを選びます。これは、複数のデプロイメントで共有できる “モデルのプロファイル” のようなものと考えると理解しやすいでしょう。
それでは設定を作成してみましょう。今回は、デフォルトで提供されている foundation_models というシナリオを選択し、gapt-4o-mini を指定します。
Navigate ML Operations → Settings and click Create.
左メニュー ML 運用 → 設定 で 作成 をクリックします。
Fill in: Name = <any‑name‑you‑like>, Scenario = foundation_models, Version = 0.0.1, Executable = azure-openai.
設定名 <ご自由に>, シナリオ foundation_models, バージョン 0.0.1, 実行可能 azure-openai を入力します。
On the parameter screen leave modelName = gpt-4o-mini, modelVersion = latest and click Next → Create.
パラメータ画面では modelName = gpt-4o-mini, modelVersion = latest をそのままに 次へ → 作成。
You’ll land on the new Setting detail page—check that all fields look correct; no extra edits needed.
作成後に設定詳細の画面へ遷移します。入力内容に誤りがないかざっと確認しましょう(基本的にそのままで OK です)。
Click Create Deployment (top‑right), breeze through the wizard by clicking Next until Create.
右上の 「デプロイメント作成」 を押し、ウィザードは特に変更せず 「次へ」 → 「作成」 で進めます。
Wait until Status = Running—hit the Refresh icon every few seconds. Copy the Deployment ID shown in the title bar for later use.
ステータスが 「実行中」 になるまで、更新ボタンで数秒おきにリフレッシュします。タイトルバーに表示される Deployment ID を控えておきましょう。
By the way, there are various LLMs available to run on SAP AI Core. You can browse them in the Generative AI Hub > Model Library section.
ちなみに、SAP AI Core 上で利用可能な LLM はさまざまです。「生成 AI ハブ > モデルライブラリ」画面を開くと、それらの一覧が確認できます。
The Leaderboard also allows you to compare models based on accuracy, token cost, and other metrics.
また、リーダーボード機能では、各モデルの精度やトークンコストなどを比較することもできます。
6 | Next Up / 次回予告
Part 2 Building a Chat Model with LangChain / LangChain でチャットモデルを構築
We’ll finally implement the chat model! Make sure your Python development environment is ready—VS Code or a similar IDE will work perfectly!
Part 2では、いよいよチャットモデルの実装に入ります!VS Code などを使って Python の開発環境を準備しておきましょう!
Disclaimer / 免責事項
Disclaimer – All the views and opinions in the blog are my own and is made in my personal capacity and that SAP shall not be responsible or liable for any of the contents published in this blog.
免責事項 – 本ブログに記載された見解および意見はすべて私個人のものであり、私の個人的な立場で発信しています。SAP は本ブログの内容について一切の責任を負いません。
Generative AI has broken out of research labs and is now transforming the way business is done. SAP is moving at full speed to embrace this trend and has launched an agent called Joule. In this blog series, I’ll provide a “super-fast hands-on” guide to help you quickly call default models of SAP AI Core and expand them into practical AI agents for real-world business use, so you can understand how these agents work behind the scenes.生成 AI は研究室の外へ飛び出し、今やビジネス現場の常識を塗り替えています。SAPは全速力でその波に乗っており、JouleというAgentを公開しました。このブログシリーズでは、Agentが裏側でどうなっているかを理解するため、SAP AI Core の既定モデルを最速で呼び出し、実務で使える AI Agentへ拡張する“秒速ハンズオン”をお届けします。 What You’ll Learn in This Series / 本シリーズで学べることHow to spin up a custom AI agent on SAP AI Core in minutesSAP AI Core 上でカスタム AI エージェントを “秒速” で動かす方法Hands‑on with LangChain, Google Search Tool, RAG, and StreamlitLangChain・Google 検索ツール・RAG・Streamlit を使った実装Exposing the agent as a REST API and rebuilding the UI in SAPUI5/Fioriエージェントを REST API 化し、UI を SAPUI5/Fiori に載せ替える手順Time Commitment / 学習時間Each part is designed to be completed in 10–15 minutes.各章は 10–15 分 で読める&手を動かせるを予定しています。
Series Roadmap / 連載ロードマップPart 0 Prologue / プロローグ [current blog / 現在のブログ]Part 1 Env Setup: SAP AICore & AI Launchpad / 環境構築: SAP AI CoreとAI LaunchpadPart 2 Building a Chat Model with LangChain / LangChain でチャットモデルを構築Part 3 Agent Tools: Integrating Google Search / Agentツール: Google 検索を統合Part 4 RAG Basics ①: File Upload & HANA Cloud VectorEngine / RAG 基礎 ①: ファイルアップロード & HANA Cloud ベクターエンジンPart 5 RAG Basics ②: Retriever Tool / RAG 基礎 ②: Retriever Toolの構築Part 6 Streamlit UI Prototype / Streamlit でチャットUIPart 7 Expose as a REST API / AI Agent を REST API 化Part 8 Rebuild the UI with SAPUI5 / SAPUI5 でチャットUI を再構築Note / 注記Subsequent blogs will be published soon.続編は順次公開予定です。If you enjoyed this post, please give it a kudos! Your support really motivates me. Also, if there’s anything you’d like to know more about, feel free to leave a comment!Env Setup: SAP AICore & AI Launchpad環境構築: SAP AI CoreとAI Launchpad1 | Overview / 概要In this chapter, we’ll connect to SAP AI Launchpad using the service key created for the SAP AI Core instance. Then, we’ll proceed to deploy the LLM for running a chat model.本章では、SAP AI Core インスタンスに対して作成したサービスキーを使い、SAP AI Launchpad に接続します。その後、チャット用 LLM を動かすためのデプロイメントを実施します。 2 | Prerequisites / 事前準備BTP sub-account / BTP サブアカウントSAP AI Core instance / SAP AI Core インスタンスSAP AI LaunchPad Subscription / SAP AI LaunchpadのサブスクリプションPython 3.13 and pip / Python 3.13環境 & pipVSCode, BAS or any IDE / VSCodeやBASなどのIDE 3 | Step 1 – Create a Service Key / Service Key の作成Creating a service key gives your local scripts a secure, OAuth‑based passport into SAP AI Core. Without it, Python SDK calls have no way to authenticate or discover endpoints.サービスキーは、ローカルのスクリプトが SAP AI Core に安全かつ OAuth ベースでアクセスするための “パスポート” です。これが無いと、Python SDK はエンドポイントや認証情報を取得できません。Open your AI Core instance in BTP Cockpit → Instances & Subscriptions.BTP Cockpit の Instances & Subscriptions で AI Core インスタンスを開きます。Go to the Service Keys tab and click Create. Give it any name.Service Keys タブで Create をクリックし、任意の名前を入力して作成します。Download the generated JSON; you’ll need it later.生成された JSON をダウンロードして保管します。NOTE – Resource GroupWhen calling SAP AI Core from Python you must set an extra environment variable named RESOURCE_GROUP in addition to the values contained in the service key. In this tutorial we’ll simply point it to the built‑in default group.Python から呼び出す際にはサービスキーに含まれている変数以外に Resource Group と呼ばれる環境変数が必要ですが、本チュートリアルでは既定の default を指定します。 4 | Step 2 – Connect AI Launchpad / AI Launchpad との接続You can deploy an LLM (Large Language Model) directly to SAP AI Core using the service key you created earlier. However, in this guide, we’ll use SAP AI Launchpad to make the deployment process easier.To begin, you’ll need to establish a secure connection route from SAP AI Launchpad to SAP AI Core.先ほど作成した SAP AI Core のサービスキーを使えば、SAP AI Core に直接アクセスして LLMをデプロイすることも可能です。ただし、ここではより簡単な方法として「SAP AI Launchpad」を使ってデプロイを実施します。まずは、SAP AI Launchpad から SAP AI Core へ安全に接続するための経路を準備しましょう。From Subscriptions open AI Launchpad → Go to Application.Subscriptions から AI Launchpad → Go to Application で起動します。Click Add (top‑right) → API Connection and upload the Service Key JSON.右上の Add → API Connection を選び、Service Key JSON をアップロードします。Select the default Resource Group in the side panel and save.サイドパネルで Resource Group に default を選択して保存します。 5 | Step 3 – Configure & Deploy an LLM / モデル設定とデプロイOn the “Configuration” screen of SAP Launchpad, you can select the type of foundation model to use. Think of this as creating a model profile that can be shared across multiple deployments.Let’s go ahead and create the configuration. In this case, we’ll use the default foundation_models scenario and configure it to use gapt-4o-mini.SAP Launchpad の「設定」画面では、使用する基盤モデルの種類などを選びます。これは、複数のデプロイメントで共有できる “モデルのプロファイル” のようなものと考えると理解しやすいでしょう。それでは設定を作成してみましょう。今回は、デフォルトで提供されている foundation_models というシナリオを選択し、gapt-4o-mini を指定します。Navigate ML Operations → Settings and click Create.左メニュー ML 運用 → 設定 で 作成 をクリックします。Fill in: Name = <any‑name‑you‑like>, Scenario = foundation_models, Version = 0.0.1, Executable = azure-openai.設定名 <ご自由に>, シナリオ foundation_models, バージョン 0.0.1, 実行可能 azure-openai を入力します。On the parameter screen leave modelName = gpt-4o-mini, modelVersion = latest and click Next → Create.パラメータ画面では modelName = gpt-4o-mini, modelVersion = latest をそのままに 次へ → 作成。You’ll land on the new Setting detail page—check that all fields look correct; no extra edits needed.作成後に設定詳細の画面へ遷移します。入力内容に誤りがないかざっと確認しましょう(基本的にそのままで OK です)。Click Create Deployment (top‑right), breeze through the wizard by clicking Next until Create.右上の 「デプロイメント作成」 を押し、ウィザードは特に変更せず 「次へ」 → 「作成」 で進めます。Wait until Status = Running—hit the Refresh icon every few seconds. Copy the Deployment ID shown in the title bar for later use.ステータスが 「実行中」 になるまで、更新ボタンで数秒おきにリフレッシュします。タイトルバーに表示される Deployment ID を控えておきましょう。By the way, there are various LLMs available to run on SAP AI Core. You can browse them in the Generative AI Hub > Model Library section.ちなみに、SAP AI Core 上で利用可能な LLM はさまざまです。「生成 AI ハブ > モデルライブラリ」画面を開くと、それらの一覧が確認できます。The Leaderboard also allows you to compare models based on accuracy, token cost, and other metrics.また、リーダーボード機能では、各モデルの精度やトークンコストなどを比較することもできます。 6 | Next Up / 次回予告Part 2 Building a Chat Model with LangChain / LangChain でチャットモデルを構築We’ll finally implement the chat model! Make sure your Python development environment is ready—VS Code or a similar IDE will work perfectly!Part 2では、いよいよチャットモデルの実装に入ります!VS Code などを使って Python の開発環境を準備しておきましょう! Disclaimer / 免責事項Disclaimer – All the views and opinions in the blog are my own and is made in my personal capacity and that SAP shall not be responsible or liable for any of the contents published in this blog.免責事項 – 本ブログに記載された見解および意見はすべて私個人のものであり、私の個人的な立場で発信しています。SAP は本ブログの内容について一切の責任を負いません。 Read More Technology Blogs by SAP articles
#SAP
#SAPTechnologyblog