This track introduces attendees to building AI agents using the SAP Cloud SDK for AI (Java) and SpringAI.
The project used for this session is a Purchase Order Management application with AI agent capabilities. You will get more information in the exercises.
The necessary dependencies for the exercises are specified in the pom files.
The application consists of the following main components:
-
Main class (Application.java): This class governs the main application flow of the demo app you are using.
-
The two task classes(GetPurchaseOrdersTask.java and EscalateTask.java): These classes contain the code to run the agent we are using in this demo. These are the only classes you have to change to solve the exercises.
-
UI (ui/): The code to generate the frontend for interacting with the AI agent.
-
Tools (tools/): A collection of tools that the AI agent will use during the exercises.
Note
The agent will not function properly until the exercises are completed.
Tip
The solutions to the exercises are provided but have been commented out. We strongly recommend that you attempt to solve the exercises by writing the code yourself instead of just uncommenting or copying the solution. This approach will allow you to experience the full developer workflow, including useful features like auto-completion and debugging. By typing the code, you'll better understand the agent logic, discover useful functions, and build muscle memory, all of which contribute to a deeper learning experience.
The exercises demonstrate how to build AI agents using the SAP Cloud SDK for AI and SpringAI, focusing on:
-
Building AI agents with tool calling capabilities
-
Implementing business logic through agent tools
-
Managing agent workflows
-
Exercise 1 - Working with PO Items: Tool Usage and Data Fetching from S/4
-
Exercise 2 - Escalating overdue Items: Human-in-the-loop Workflow and Writing Data to S/4
Start from here.