Skip to content

Commit df5dffe

Browse files
committed
fix(a2a): await enqueue_event calls in agent executors
The enqueue_event coroutine was called without await in the contact extractor and currency converter executors. This silently dropped A2A streaming events (artifact, status updates), causing the UI to never receive agent responses despite the agent processing correctly. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
1 parent b094654 commit df5dffe

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

a2a/a2a_contact_extractor/agent_executor.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ async def execute(
7171
)
7272

7373
if require_user_input:
74-
event_queue.enqueue_event(
74+
await event_queue.enqueue_event(
7575
TaskStatusUpdateEvent(
7676
status=TaskStatus(
7777
state=TaskState.input_required,
@@ -87,7 +87,7 @@ async def execute(
8787
)
8888
)
8989
elif is_task_complete:
90-
event_queue.enqueue_event(
90+
await event_queue.enqueue_event(
9191
TaskArtifactUpdateEvent(
9292
append=False,
9393
contextId=task.context_id,
@@ -96,7 +96,7 @@ async def execute(
9696
artifact=artifact,
9797
)
9898
)
99-
event_queue.enqueue_event(
99+
await event_queue.enqueue_event(
100100
TaskStatusUpdateEvent(
101101
status=TaskStatus(state=TaskState.completed),
102102
final=True,
@@ -105,7 +105,7 @@ async def execute(
105105
)
106106
)
107107
else:
108-
event_queue.enqueue_event(
108+
await event_queue.enqueue_event(
109109
TaskStatusUpdateEvent(
110110
status=TaskStatus(
111111
state=TaskState.working,

a2a/a2a_currency_converter/app/agent_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ async def execute(
5151
if not task:
5252
task = new_task(context.message)
5353
logger.info(f"Created task for message : {context.message}")
54-
event_queue.enqueue_event(task)
54+
await event_queue.enqueue_event(task)
5555
updater = TaskUpdater(event_queue, task.id, task.context_id)
5656
try:
5757
async for item in self.agent.stream(query, task.context_id):

0 commit comments

Comments
 (0)