Skip to content

This repository demonstrates an end-to-end scenario where multiple organizations collaborate through domain-specific agents (discovered via ORD and communicating via A2A) to resolve a customer dispute.

License

Notifications You must be signed in to change notification settings

SAP-samples/btp-a2a-dispute-resolution

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Dispute Resolution with Multi-Agent Orchestration

REUSE status

Note

Experimental: The current source code and architecture are experimental, intended for research and proof-of-concept purposes, and are subject to change.

This repository demonstrates an end-to-end scenario where multiple organizations collaborate through domain-specific AI agents to resolve a customer dispute. The agents use an open Agent-to-Agent (A2A) communication protocol and Open Resource Discovery (ORD) to dynamically discover each other's capabilities and collaborate on complex tasks that exceed the scope of a single agent.

Scenario

XStore disputes an invoice from Cymbal Direct after receiving a short shipment of 900 t-shirts instead of the expected 1,000. Vicky, an employee of Cymbal Direct, uses Joule to resolve the issue with the help of several backend agents representing different organizations and capabilities.

Scenario Breakdown

  • User Prompt: Vicky reports a shipment discrepancy via Joule.
  • Joule as Orchestrator Agent Planning:
    • Identifies required agents from the Agent Catalog.
    • Creates a task plan for orchestration.
  • Agent Orchestration:
    • Dispute Resolution Agent (SAP): Confirms invoice and shipment data from SAP S/4HANA; expected 1,000 units.
    • Warehouse Insights Agent (Google): Analyzes logistics and retrieves a packaging slip showing only 900 t-shirts shipped.
    • Dispute Policy & Email Agent (Microsoft): Retrieves communication logs and creates an email draft to the customer according to the dispute policy.
  • Response to User:
    • Confirmation of dispute resolution creation and customer email.

Architecture

Architecture Diagram

Note

This architecture illustrates AI agents integrated via point-to-point connections, as currently implemented. Alternatively, a centralized orchestrator per platform could be introduced.

Repository Structure

agent-catalog: Agent discovery and routing services

  • ord-aggregator: Acts as AGENT_CATALOG, aggregates Agent Cards across catalogs (SAP, GCP, Azure) using ORD.
  • a2a-router: Acts as AGENT_ROUTER which connects to ord-aggregator and routes requests to appropriate agents using A2A protocol (A2A Client)

agents: A2A agents on SAP, GCP and Azure

  • sap-agent-builder-a2a
    • agent-builder-a2a-agent-conntector: CAP application that wraps an Agent running on Agent Builder (SAP BTP) to enable A2A and exposing its Agent Card via Open Resource Discovery (ORD).
    • agent-builder-agent-exports: Exported agents from BAF
      • orchestrator: Joule's main entry point for the scenario
      • dispute-resolution-agent: Agent running on Agent Builder (SAP BTP) that handles dispute resolution.
  • gcp-adk-a2a: Agent deployed on GCP based on A2A and exposed Agent Card via Open Resource Discovery (ORD).
    • warehouse-insights-agent: Tracks stock movements across the warehouse and their causes in real-time.
  • azure-ai-foundry-a2a: Agent deployed on Azure based on A2A and exposed Agent Card via Open Resource Discovery (ORD).
    • dispute-email-agent: Agent that creates email drafts according to specific dispute policies for dispute resolution.

Known Issues

No known issues.

How to obtain support

Create an issue in this repository if you find a bug or have questions about the content.

For additional support, ask a question in SAP Community.

Contributing

If you wish to contribute code, offer fixes or improvements, please send a pull request. Due to legal reasons, contributors will be asked to accept a DCO when they create the first pull request to this project. This happens in an automated fashion during the submission process. SAP uses the standard DCO text of the Linux Foundation.

License

Copyright (c) 2024 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.

About

This repository demonstrates an end-to-end scenario where multiple organizations collaborate through domain-specific agents (discovered via ORD and communicating via A2A) to resolve a customer dispute.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published