Skip to content

Python: [Bug]: A2AAgent failed to parse message content from TaskStatusUpdateEvent #4783

@lixiaoqiang

Description

@lixiaoqiang

Description

The correct message content cannot be parsed from the TaskStatusUpdateEvent as expected.
For example, the A2A Server sends messages using the code format below:

               await event_queue.enqueue_event(
                    TaskStatusUpdateEvent(
                        status=TaskStatus(
                            state=TaskState.working,
                            message=new_agent_text_message(
                                text_content, # here is the content
                                task.context_id,
                                task.id,
                            ),
                        ),
                        final=False,
                        context_id=task.context_id,
                        task_id=task.id,
                    )
                )

However, the A2AAgent fails to extract the message content correctly.

Additionally, the test case for streaming output is also unreasonable: it only generates a single message and fails to cover scenarios with multiple messages.

Code Sample

Error Messages / Stack Traces

Package Versions

agent-framework-1.0.0rc4

Python Version

No response

Additional Context

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingpython

Type

Projects

Status

In Review

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions