Challenge 3: Diving Deeper - Collaborative Agents with Google ADK

Previous Challenge

 Important This challenge dives into building sophisticated, collaborative AI agents using the Google Agent Development Kit (ADK). This is where you bring the power of AI to automate complex SAP business processes.

Introduction

Beyond simple conversational queries, AI agents can be orchestrated into teams to automate complex, multi-step business processes. In this challenge, you will explore how to design and implement a team of custom AI agents using the Google Agent Development Kit (ADK) to streamline a common SAP workflow: creating Purchase Requisitions (PRs) from email requests. This involves not just data extraction but also vendor selection and integration with your SAP backend. This demonstrates how AI can significantly enhance procurement efficiency and compliance.

Description

Your primary objective is to implement and deploy a collaborative team of AI agents that automate the creation of Purchase Requisitions in an SAP ERP system, triggered by email requests. The agents will work together to:

  • Initiate the Process: A “Greeter agent” will start the PR creation workflow by receiving email text from a user.
  • Vendor Discovery: An “SAP vendor retriever agent” will interact with SAP to find existing or potential vendors.
  • Data Extraction: A “PR intake agent” will extract all necessary Purchase Requisition details (e.g., item description, quantity) from the raw email text.
  • Vendor Vetting: A “Vendor due diligence agent” will validate and select the most appropriate vendor(s) by checking their status in SAP, preferred supplier lists, and compliance flags.
  • SAP PR Creation: An “SAP_PR_creator agent” will use the extracted data and vetted vendor information to automatically create the Purchase Requisition in the SAP system via APIs.

You will achieve this by:

  1. Environment Setup: Reviewing pre-configured Application Integration components essential for connecting your agents to the SAP environment. This includes examining a Network Endpoint Attachment for private connectivity and creating the SAP Gateway Integration Connector (s4-vendors).
  2. Coding Exercises: Modifying existing code (provided with TODOs) within a Google Cloud Run service (purchasing-agent-service). You will need to implement the logic for the various agents to perform their specific roles, involving API calls to SAP through the Application Integration connector.
    • Access the Cloud Run service, modify the code, and redeploy.
    • Refer to the provided GitLab repository for potential solutions or guidance on the TODO tasks.

 Important The focus is on understanding the interaction between agents and their integration with SAP. While code snippets or solutions may be provided as a reference, strive to understand the underlying logic and design principles of a collaborative agent system.

Success Criteria

  • Verify the existence and configuration of the saps4hana-endpoint-attachment in Integration Connectors.
  • Confirm the successful creation and configuration of the s4-vendors SAP Gateway Connection in Integration Connectors, including its region, service, and authentication details.
  • Successfully complete the TODOs within the purchasing-agent-service on Cloud Run, effectively implementing the collaborative agent team.
  • Show that the team of agents can successfully process an email request for a Purchase Requisition, culminating in the creation of a PR in the simulated SAP system.

Tips

  • Pay close attention to the roles and responsibilities of each agent. How do they pass information to each other?
  • Familiarize yourself with the concept of Application Integration and its role as a bridge between Google Cloud services and SAP.
  • Use Cloud Run Code Editor to quicker make changes in the code of your agents. Make sure you don’t overwrite each other changes.
  • When debugging your agents, check the Cloud Run logs for errors or unexpected behavior.
  • Consider how you would handle edge cases or error conditions in a real-world multi-agent system.
  • Use the email generated on the previous step with the Agentspace while triggering the workflow with the ADK.

Learning Resources

Previous Challenge