a2aproject / a2aproject/a2a-java

[Feat]: A2A Client Support fallback to re-select url and transport when first choise fails.

未關閉
#445 3 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
490
分支
172
平均合併
1 天 6 小時
30 天內合併 PR
55

描述

### Is your feature request related to a problem? Please describe.

According to the spec of A2A. Clients **SHOULD** implement fallback logic to try alternative transports if their first choice fails. Whice in No.4 from https://a2a-protocol.org/latest/specification/#563-client-transport-selection-rules.

I see the a2a-java client only choise trasport and url during building step and no the fallback to re-choice in any time. Once the transport that choised request fail, the client will be unavailable and users should re-get agentcard and re-build a2a client to used. I think it's not `Graceful degradation`.

I'm not sure whether there is plan to implement this feature in a2a-java communities. I’m excited to see this fallback mechanism implemented in the client.

### Describe the solution you'd like

I think there are two way to implement this featrure.

1. when client.sendRequest fails with threadhold, client do re-choice transport without current AgentInterface. And let next request use new choised transport.

2. client not only build one best matched transport during building, but build all matched protocol transport and marked which is current choice. When request failed, client do fallback with other protocol transport to do retry.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_

### Code of Conduct

- [x] I agree to follow this project's Code of Conduct

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。