a2aproject / a2aproject/a2a-js

[Clarification]: Evetbus is closed directly after executor has finished

オープン
#620 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
613
フォーク
169
平均マージ
1日 6時間
マージ済み PR(30日)
21

説明

We're using the A2A SDK in a different approach that it was actually designed for. Our Executor is basically a proxy to other Agents and in some cases we talk to target Agents via push notification to get their response.

Additionally, we overwrote the DefaultEventBus and replaces it with a Database event bus which adds additional time onto the loop. I don't want to go to much in detail how we did this.

While upgrading to A2A SDK v1 we figured out that we have non deterministic behaviour that sometimes the task was completed, and sometimes it got stuck entirely.

After investigation i found out that you call `_settleBus` in a finally call after the Executor has finished which then sends a finished event to the event bus, and closes the event bus for this task.

In normal circumstances i guess this is fine, to assume that when the Executor is finished, the Task/Loop should be finished as well. In our case never the less, due to the DB loop the event bus was closed before we could read the messages from the DB and everything breaks down. On Top, we have communication with other Agents over Push notification, which results in a very short living Executor because it's only sending the Call to the other agent and finishes - which does not mean the Task is finished.

With the previous A2A SDK 0.3.14 this was not an issue as the loop was closed based on the events status.

Our plan for a mitigation would be to override `_settleBus` and basically do nothing and check in our PersistentEventBus, which we override anyway for the finished events and call the EventBusManager to close the bus for the desired task. This is the easiest way to do this, to not override the DefaultRequestHandler entirely.

1. Do you see any issues with following this approach as we're basically overriding a `_` "private" method. Also in regards of future versions.
2. Would it be an option for you to reconsider your approach as other consumer might run into the same issue when adding more delay or using a DB EventBus as we do.
3. Maybe it can be turned on/off using specific settings/configurations

So, not really a bug, or Feature Request, more like a clarification with you guys about your plans, and talking about options.

Thanks a lot for you Support and awesome work.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。