Skip to content
12 changes: 10 additions & 2 deletions tck/sut_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import a2a.types.a2a_pb2_grpc as a2a_grpc

from a2a.compat.v0_3.grpc_handler import CompatGrpcHandler
from a2a.helpers.proto_helpers import new_task_from_user_message
from a2a.server.agent_execution.agent_executor import AgentExecutor
from a2a.server.agent_execution.context import RequestContext
from a2a.server.events.event_queue import EventQueue
Expand Down Expand Up @@ -87,6 +88,13 @@ async def execute(

self.running_tasks.add(task_id)

# 1.0 semantics: the Task itself must be enqueued before any
# TaskStatusUpdateEvent (the SDK enforces this ordering).
task = context.current_task
if not task:
task = new_task_from_user_message(user_message)
await event_queue.enqueue_event(task)

logger.info(
'[SUTAgentExecutor] Processing message %s for task %s (context: %s)',
user_message.message_id,
Expand Down Expand Up @@ -157,11 +165,11 @@ def serve(task_store: TaskStore) -> None:
),
AgentInterface(
url=f'http://localhost:{http_port}{REST_URL}',
protocol_binding='REST',
protocol_binding='HTTP+JSON',
protocol_version='1.0.0',
),
AgentInterface(
url=f'http://localhost:{grpc_port}',

@mykytanetipa mykytanetipa Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wont this break current TCK CI on a2a 0.3.x (e.g. assertions like https://github.com/a2aproject/a2a-tck/blob/0.3.0.beta3/tests/optional/capabilities/test_agent_card_optional.py#L286)?

This will leave CI both not working on 0.3.x and 1.x.x, I think we should submit the full 1.x.x migration work at the same time (i.e. with TCK_VERSION v1) but it would include more changes. (please provide explanation, I may lack context on the TCK migration plan)

url=f'localhost:{grpc_port}',
protocol_binding='GRPC',
protocol_version='1.0.0',
),
Expand Down
Loading