a2aproject/a2a-python

[Bug]: TaskUpdater's start_work publishes TaskStatusUpdateEvent instead of Task

jasoncheow opened this issue · 1 comments

What happened?

start_work in TaskUpdater uses the update_status method, which publishes a TaskStatusUpdateEvent. However, from the 9.3. Streaming Task Execution (SSE) example in the specifications, when a task is started, it should be a Task event, with status being submitted (or working should be ok too?).

async def start_work(self, message: Message | None = None) -> None:
"""Marks the task as working and publishes a status update."""
await self.update_status(
TaskState.working,
message=message,
)

Relevant log output

N/A

Code of Conduct

  • I agree to follow this project's Code of Conduct

hi, you can create a new task object, enqueue the task and use the TaskUpdater to mutate the task.

Here is an example - https://github.com/a2aproject/a2a-samples/blob/883c8906a60cb48e43599db0480d2217bd02c320/samples/python/agents/langgraph/app/agent_executor.py#L45