Technology Blog Posts by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ryota_Ito
Product and Topic Expert
Product and Topic Expert
796

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 / 連載ロードマップ

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環境 & pip
  • VSCode, 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 はエンドポイントや認証情報を取得できません。

  1. Open your AI Core instance in BTP Cockpit → Instances & Subscriptions.
    BTP Cockpit の Instances & Subscriptions で AI Core インスタンスを開きます。

    AI Coreインスタンス画面.png
  2. Go to the Service Keys tab and click Create. Give it any name.
    Service Keys タブで Create をクリックし、任意の名前を入力して作成します。

    New Service Key作成画面.png
  3. Download the generated JSON; you’ll need it later.
    生成された JSON をダウンロードして保管します。

    Service key画面.png

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 へ安全に接続するための経路を準備しましょう。

  1. From Subscriptions open AI LaunchpadGo to Application.
    Subscriptions から AI LaunchpadGo to Application で起動します。

    SAP AI Launchpad 画面.png
  2. Click Add (top‑right) → API Connection and upload the Service Key JSON.
    右上の AddAPI Connection を選び、Service Key JSON をアップロードします。

    AI API 接続画面.pngAI API 接続設定画面.png
  3. Select the default Resource Group in the side panel and save.
    サイドパネルで Resource Group に default を選択して保存します。

    リソースグループ選択画面.png

 

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 を指定します。

  1. Navigate ML Operations → Settings and click Create.
    左メニュー ML 運用 → 設定作成 をクリックします。

    ML運用 設定画面.png
  2. Fill in: Name = <any‑name‑you‑like>, Scenario = foundation_models, Version = 0.0.1, Executable = azure-openai.
    設定名 <ご自由に>, シナリオ foundation_models, バージョン 0.0.1, 実行可能 azure-openai を入力します。

    名前および実行可能オブジェクト入力.png
  3. On the parameter screen leave modelName = gpt-4o-mini, modelVersion = latest and click Next → Create.
    パラメータ画面では modelName = gpt-4o-mini, modelVersion = latest をそのままに 次へ → 作成

    入力パラメータ.png
  4. You’ll land on the new Setting detail page—check that all fields look correct; no extra edits needed.
    作成後に設定詳細の画面へ遷移します。入力内容に誤りがないかざっと確認しましょう(基本的にそのままで OK です)。

    設定詳細画面.png
  5. Click Create Deployment (top‑right), breeze through the wizard by clicking Next until Create.
    右上の 「デプロイメント作成」 を押し、ウィザードは特に変更せず 「次へ」 → 「作成」 で進めます。

    デプロイメント作成.png
  6. 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 を控えておきましょう。

    デプロイメント詳細画面.png

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 ハブ > モデルライブラリ」画面を開くと、それらの一覧が確認できます。

モデルライブラリ画面.png

The Leaderboard also allows you to compare models based on accuracy, token cost, and other metrics.

また、リーダーボード機能では、各モデルの精度やトークンコストなどを比較することもできます。 

モデルライブラリ-リーダーボード画面.png

 

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 は本ブログの内容について一切の責任を負いません。