User Story 02: One Request, One Response
Implementation-oriented user story for SDK development.
Send a Task Request and Receive a Single Reply
Goal
Agent A sends one request to Agent B and receives exactly one response message on the reply topic.
Preconditions
- Agent B is discoverable on:
$a2a/v1/discovery/{org_id}/{unit_id}/{agent_id}
- Agent A has selected Agent B and has a writable request topic plus a subscribed reply topic.
End-to-End Flow
- Agent A subscribes to reply topic:
$a2a/v1/reply/{org_id}/{unit_id}/{agent_id}/{reply_suffix}
- Agent A publishes one request to:
$a2a/v1/request/{org_id}/{unit_id}/{agent_id}- QoS:
1(recommended) - MQTT v5 properties:
Response Topic: reply topic aboveCorrelation Data: unique request correlation bytes
- Agent B processes request and publishes one response message to
Response Topic:- Echoes the same
Correlation Data
- Echoes the same
- Agent A matches response by
Correlation Dataand completes the request.
Expected Payload Outcome
- Response payload may contain:
messagetask
- If
taskis present,task.idechoes the requester-generated UUIDv4 and identifies any follow-up task operations.
SDK Requirements Checklist
- Generate unique
Correlation Dataper request. - Route response strictly by
Correlation Data. - Handle one-shot completion without waiting for stream updates.
- Persist returned
task.idwhen present.