a2aproject / a2aproject/a2a-samples

Support for long-running background after original `EventQueue`

未關閉
#357 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Jupyter Notebook
星號
1.8k
分支
751
PR 合併指標
30 天內沒有已合併 PR

描述

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

**Description:**
When using the `EventQueue` in the current A2A examples, the queue is closed automatically after the request completes. This causes issues for long-running background tasks (like reminders or notifications) that attempt to enqueue events after the request has finished.

**Observed behavior:**

* Background tasks finish successfully.
* Attempting to enqueue events via the original `EventQueue` results in warnings like:

```
Queue is closed. Event will not be enqueued.
```
* Any updates or artifacts pushed after the request cannot be delivered through the closed queue.

**Context / use case:**
This is needed for features like reminders, scheduled notifications, or other tasks that run asynchronously and complete after the original agent request has finished.

---

**Questions:**

* Does A2A currently support this pattern?
* Can this behavior be reproduced using the protocol as it stands?
* Are there any recommended examples or best practices for implementing long-running background tasks that deliver updates back to the client?

Thank you!

### Describe the solution you'd like

* Support a mechanism for long-running tasks to send updates or final artifacts back to the client even after the request has completed.

### 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

貢獻指南

開啟貢獻指南

研究方向

Look at the A2A samples repository for examples using EventQueue, particularly how queues are opened and closed. Examine the protocol specification for lifecycle management. The goal is to understand the current closure behavior and design a mechanism for persistent or reconnectable queues for background tasks.

由索引模型根據 Issue 內容生成。

評估

領域
api, backend
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
45/100

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

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