Skip to content

A2A delegation

%%{init: {'look': 'handDrawn', 'theme': 'base', 'themeVariables': {'primaryColor': '#eef2ff', 'primaryBorderColor': '#1e40af', 'primaryTextColor': '#1e293b', 'lineColor': '#1e3a8a', 'edgeLabelBackground': '#ffffff', 'clusterBkg': '#fbfcff', 'clusterBorder': '#2563eb', 'fontFamily': '-apple-system, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif', 'fontSize': '15px'}, 'flowchart': {'nodeSpacing': 50, 'rankSpacing': 58, 'padding': 14, 'htmlLabels': true, 'curve': 'basis'}}}%%
flowchart LR
  R(["Request"]) --> A("Hand it to an agent<br/>someone else runs")
  A --> X("It works on it<br/>over A2A")
  X --> O(["Artifacts come back"])

Outcome: call an independently deployed A2A agent while preserving a durable, observable workflow boundary.

Prerequisites and contract

The remote endpoint must expose a compatible A2A Agent Card and honor idempotent request IDs. Input is agentUrl, request, and idempotencyKey; output is remote state and artifacts. agentType: "a2a" selects the remote protocol runtime; it does not identify the remote authoring framework.

Runnable definition

Save this as remote-a2a-delegation.json:

{
  "name": "remote_a2a_agent_delegation",
  "description": "Delegates research to a remote A2A agent with a deterministic request id supplied by the caller.",
  "version": 1,
  "schemaVersion": 2,
  "timeoutSeconds": 360,
  "timeoutPolicy": "TIME_OUT_WF",
  "inputParameters": [
    "agentUrl",
    "request",
    "idempotencyKey"
  ],
  "tasks": [
    {
      "name": "delegate_remote_agent",
      "taskReferenceName": "delegate_remote_agent",
      "type": "AGENT",
      "inputParameters": {
        "agentType": "a2a",
        "agentUrl": "${workflow.input.agentUrl}",
        "text": "${workflow.input.request}",
        "idempotencyKey": "${workflow.input.idempotencyKey}",
        "pollIntervalSeconds": 5
      }
    }
  ],
  "outputParameters": {
    "state": "${delegate_remote_agent.output.state}",
    "artifacts": "${delegate_remote_agent.output.artifacts}"
  }
}

Register and run

conductor workflow create remote-a2a-delegation.json
conductor workflow start -w remote_a2a_agent_delegation --sync -i '{"agentUrl":"https://REPLACE.example/a2a","request":"Research durable execution.","idempotencyKey":"research-REPLACE"}'

Production notes

  • Reuse the same idempotency key on retry, and query the remote task before sending again.
  • Treat what comes back as untrusted. Validate artifacts before using them.
  • pollIntervalSeconds controls how often Conductor checks in. Tune it to how long the remote agent usually takes.
  • Put consequential actions after a local approval, not inside the delegation.