SAP-samples/teched2025-AI160
A hands-on session that builds a purchase-order escalation agent in JavaScript or Java with the SAP Cloud SDK for AI and the Generative AI Hub in AI Foundation, calling the S/4HANA Purchase Order API.
Two parallel tracks build the same demo in two languages, a purchase-order management agent that identifies overdue PO items and automates escalation workflows: JavaScript with LangGraphLangGraphAn agent runtime that describes a loop as a graph of nodes and edges and carries the state between turns. For the things here it is the harness an agent's planning and tool calls run in, and the state that a CDS checkpointer persists., Java with Spring AI, and identical core concepts either way. Both call the SAP S/4HANASAP S/4HANASAP's ERP suite, run on-premise or as a private cloud edition, with its business data and processes reached over OData, RFC and the ABAP platform. For the things here it is the system a tool reads from or writes to. The public cloud edition is its own entry. Purchase Order API for PO data and note creation and the SAP AI CoreSAP AI CoreSAP's AI service on BTP: the runtime for AI assets, and through the Generative AI Hub inside it the access to foundation models, the orchestration service with its templating, masking, filtering and grounding modules, the Prompt Registry and Document Grounding.sap official, btp Orchestration Service for LLM invocation, content filtering and data masking, while a React frontend takes a query such as 'Show overdue PO items for plant DE01' and the agent routes it through tools that fetch PO data, calculate overdue status, format the response and create an escalation note. The repository carries the material for two sessions, SAP TechEd 2025 and DSAG TechXchange 2026, and runs either on the hands-on test system it provides or on a reader's own AI Core instance, which needs a deployment for orchestration created by hand and its client ID, secret and authentication URL entered.
Facts
Where it sits
Who is behind it
In the atlas: maintains 222@SAP-samplesmaintainerAjay SorengContributes to this
In the atlas: contributes to 36@ajaysorengBrigittaK307Contributes to this
In the atlas: contributes to 12@BrigittaK307David KnaackContributes to this
In the atlas: contributes to 13, wrote 1@davidkna-sapDeeksha SinhaContributes to this
In the atlas: contributes to 12@deekshas8emincihangeriContributes to this
In the atlas: contributes to 12@emincihangeriJunjie TangContributes to this
In the atlas: contributes to 12@jjtang1985James RappContributes to this
In the atlas: contributes to 4@jmsrppJonas-IsrContributes to this
In the atlas: contributes to 1@Jonas-IsrThomas JungContributes to this
Developer Advocate
In the atlas: contributes to 15, wrote 6@jung-thomasKavithaSivaContributes to this
In the atlas: contributes to 12@KavithaSiva16 contributors
What it declares
Every artifact
- Type
- Sample
- Origin
- By SAP
- Use as
- A reference
- Runtime
- Node.jsJava
As a sample
- Form
- Workshop or CodeJam material
Connections
Building an agent into your own application
Calling a language model with tenant and credential handling solved
SAP's ERP suite, run on-premise or as a private cloud edition, with its business data and processes reached over OData, RFC and the ABAP platform. For the things here it is the system a tool reads from or writes to. The public cloud edition is its own entry.
AI runtime on BTP with the Generative AI Hub
Download
README
quoted from SAP-samples/teched2025-AI160 under Apache-2.0, readCaution
Access to test systems are considered temporary. However, in all cases you can still use the sample code and tutorial available in this repository.
If you are part of a workshop session (e.g., TechEd or TechEd on Tour), the speakers should share the test system credentials with the participants.
Warning
Disclaimer
While using the test system, please note the following terms:
- System Duration: The test system will be available only during the workshop session.
- Testing/Learning Purposes Only: The test system is intended solely for testing or learning purposes and must not be used for any productive or commercial activities.
- Malicious Usage: Any detection of malicious usage will result in immediate termination of your test system access. Depending on the severity of the abuse, legal action may be pursued.
- Feature Changes: Do not make any business decisions on the contents of this exercise. SAP reserves the right to change or deprecate any feature of the Orchestration Service in the future, without any prior notification.
AI160 - Build Your Own AI Agent-Based Solution with the Generative AI Hub
Description
This repository contains material for multiple sessions:
- SAP TechEd 2025 "AI160 - Build Your Own AI Agent-Based Solution with the Generative AI Hub".
- DSAG TechXchange 2026 "AI160 - Build Your Own AI Agent-Based Solution with the Generative AI Hub".
Overview
This session introduces attendees on building AI agent-based solutions using the SAP Cloud SDK for AI and the Generative AI Hub in AI Foundation.
This session offers two parallel tracks:
Both tracks cover identical core concepts and practical applications, differing only in the programming language and SDK utilized. You may choose the track that best aligns with your technology stack. You may also opt to experience multiple tracks to broaden your understanding.
Getting Started
- Software requirements:
- TechEd Berlin: The provided laptops already meet all requirements.
- Other Sessions:
- General
- Git
- JS
- IDE: VS Code or WebStrom
- Node 20+
- Java
- IDE: Eclipse or IntelliJ
- Java 21
- Maven 3
- General
-
Clone the Repository:
Clone the repository using your preferred Git client. If you’re using the Git command line interface, run the following command:
git clone https://github.com/SAP-samples/teched2025-AI160.git -
Select Your Programming Language:
- Choose between JavaScript or Java by clicking the respective links.
Please note:
- If you have your own AI Core instances for consuming Generative AI Hub capabilities, you can follow this tutorial using those instances.
Please make the following adjustments:
- You need to create a deployment for orchestration by referring the documentation.
- Before beginning the exercises, you’ll need to provide system information. Instead of using the hands-on test system provided for this tutorial, use your own AI Core instance details, such as the AI Core client ID, secret, and authentication URL.
- If you’re running your application on BTP rather than locally, the SDKs will automatically retrieve your AI Core instance information from the VCAP_SERVICES environment variable.
Demo Application
An AI-powered Purchase Order (PO) Management Agent that identifies overdue PO items and automates escalation workflows.
Architecture
The application demonstrates an AI agent workflow that orchestrates multiple specialized tools to process natural language queries about purchase order items. Available in both JavaScript (LangGraph) and Java (Spring AI) implementations.
Core Integration Points
- SAP S/4HANA: Purchase Order API for real-time PO data retrieval and note creation
- SAP AI Core Orchestration Service: Handles LLM invocation, content filtering, and data masking
- Agent Framework: LangGraph (JS) or Spring AI (Java) for workflow orchestration and tool routing
Users interact through a React frontend, submitting natural language queries like "Show overdue PO items for plant DE01". The agent intelligently routes through specialized tools — fetching PO data, calculating overdue status, formatting responses, and creating escalation notes.

Related SDKs & Resources
This tutorial is built using the SAP Cloud SDK for AI. If you’d like to learn more or integrate it into your own projects, check out the following resources:
- 📚 SDK Documentation Portal: https://sap.github.io/ai-sdk/
- 🚀 JavaScript SDK GitHub Repository: https://github.com/SAP/ai-sdk-js
- ☕️ Java SDK GitHub Repository: https://github.com/SAP/ai-sdk-java
Contributing
Please read the CONTRIBUTING.md to understand the contribution guidelines.
Code of Conduct
Please read the SAP Open Source Code of Conduct.
How to obtain support
Support for the content in this repository is available during the actual time of the session for which this content has been designed. Otherwise, you may request support via the Issues tab.
License
Copyright (c) 2025 SAP SE or an SAP affiliate company. All rights reserved. This project is licensed under the Apache Software License, version 2.0 except as noted otherwise in the LICENSE file.
Details
Sources
Sources are graph entities: the same page may back several entries, and an unreachable source flags every row that rests on it.
Compatibility and provenance
Contributors
History in the atlas
- First seen.
For your agent
- Ref
artifact:sap-samples-teched2025-ai160- JSON
- /artifacts/sap-samples-teched2025-ai160.json
- MCP
- Connecting an agent