You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|**a2a-server/a2a-payment-server**| 8083 | 결제·환불 상태 에이전트 (주문 취소 시 환불 가능 여부 조회) |
11
11
|**a2a-client**| 8080 | 진입점 + LLM 의도 분석 → 해당 에이전트 호출 |
@@ -14,37 +14,129 @@ Spring Boot samples using the Agent2Agent (A2A) Protocol
14
14
15
15
에이전트 간에는 **A2A 프로토콜**로만 통신합니다. 각 에이전트에 `a2a-java-sdk-client`를 넣고, 상대 에이전트의 Agent Card를 resolve한 뒤 `Client.sendMessage()`로 메시지를 보내고, 응답 Task의 artifact 텍스트를 파싱해 사용합니다.
16
16
17
-
-**주문 취소 시**: Order Agent가 **배송 에이전트**와 **결제 에이전트**를 **병렬**로 호출합니다. `[A2A-INTERNAL] delivery-status TRACK-xxx`로 배송 상태, `[A2A-INTERNAL] payment-status ORD-xxx`로 환불 가능 여부를 조회한 뒤, 배송중/배송완료이거나 환불 불가이면 취소 불가 메시지를 반환합니다.
18
-
-**배송 조회 시**: Delivery Agent가 Order Agent에게 `[A2A-INTERNAL] order-info TRACK-xxx` 메시지를 보냅니다. 주문 에이전트는 `orderNumber:...`, `orderDate:...`, `status:...` 등 한 줄씩 응답하고, 배송 에이전트는 이걸 파싱해 조회 결과 아래에 주문 연동 정보를 붙여 반환합니다.
17
+
### 주문 취소 가능 여부 확인 시
18
+
19
+
Order Agent는 다음 두 에이전트를 **병렬 호출**합니다:
20
+
21
+
-**Delivery Agent**
22
+
-`[A2A-INTERNAL] delivery-status TRACK-xxx`
23
+
- 배송 상태가 `배송중` 또는 `배송완료`이면 취소 불가
24
+
25
+
-**Payment Agent**
26
+
-`[A2A-INTERNAL] payment-status ORD-xxx`
27
+
- 환불 불가 상태이면 취소 불가
28
+
29
+
두 결과를 종합하여 최종 취소 가능 여부를 판단합니다.
30
+
31
+
## 배송 조회 시
32
+
33
+
Delivery Agent는 주문 정보를 함께 보여주기 위해\
34
+
Order Agent에 내부 A2A 메시지를 보냅니다.
35
+
36
+
[A2A-INTERNAL] order-info TRACK-xxx
37
+
38
+
Order Agent는 운송장번호로 주문을 조회한 뒤, 다음과 같은 구조의 텍스트
39
+
응답을 반환합니다:
40
+
41
+
orderNumber: ORD-1001
42
+
orderDate: 2026-02-27
43
+
status: PAID
44
+
45
+
Delivery Agent는 해당 응답을 파싱하여 배송 상태와 함께 주문 정보를
46
+
결합해 최종 응답을 생성합니다.
47
+
48
+
49
+
## 실행 방법
19
50
20
51
## 실행 방법
21
52
22
-
1. Order Agent 실행: `./gradlew :a2a-server:a2a-order-server:bootRun`
0 commit comments