Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 2.5 KB

File metadata and controls

45 lines (30 loc) · 2.5 KB

Build Your Own AI Agent-Based Solution with the Generative AI Hub

This track introduces attendees to building AI agents using the SAP Cloud SDK for AI (Java) and SpringAI.

Project Structure

The project used for this session is a Purchase Order Management application with AI agent capabilities. You will get more information in the exercises.

Dependencies

The necessary dependencies for the exercises are specified in the pom files.

Related Source Code

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.

Exercises

The exercises demonstrate how to build AI agents using the SAP Cloud SDK for AI and SpringAI, focusing on:

Start from here.