{"record":{"id":"11e9ea47ff3b6feb","repo":"conductor-oss/conductor","slug":"get-agent-card-requires-agenturl","errorCode":null,"errorMessage":"GET_AGENT_CARD requires 'agentUrl'","messagePattern":"GET_AGENT_CARD requires 'agentUrl'","errorType":"validation","errorClass":"NonRetryableException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/tasks/worker/A2AWorkers.java","lineNumber":168,"sourceCode":"            synchronized (agentClients) {\n                if (!agentClientsLoaded) {\n                    applicationContext\n                            .getBeansOfType(ConductorAgentClient.class)\n                            .values()\n                            .forEach(this::register);\n                    agentClientsLoaded = true;\n                }\n            }\n        }\n        return agentClients;\n    }\n\n    /** Fetch a remote agent's Agent Card. */\n    @WorkerTask(GET_AGENT_CARD)\n    public A2AAgentCardResult getAgentCard(A2AAgentCardRequest request) {\n        requireA2a(request.getAgentType());\n        if (StringUtils.isBlank(request.getAgentUrl())) {\n            throw new NonRetryableException(\"GET_AGENT_CARD requires 'agentUrl'\");\n        }\n        AgentCard agentCard = a2aService.getAgentCard(request.getAgentUrl(), request.getHeaders());\n        return new A2AAgentCardResult(agentCard);\n    }\n\n    /**\n     * Start or advance an agent call.\n     *\n     * <p>The output is returned as a plain POJO. Task lifecycle state is applied through {@link\n     * TaskContext}; {@code IN_PROGRESS} with a callback delay requeues the task without holding a\n     * worker thread. Streaming is the one exception and enables lease extension because it blocks\n     * while consuming the remote SSE response.\n     */\n    @WorkerTask(value = AGENT, leaseExtendEnabled = true)\n    public A2ACallResult agent(A2ACallRequest request) {\n        Task task = TaskContext.get().getTask();\n        TaskResult result;\n        ConductorAgentClient client =","sourceCodeStart":150,"sourceCodeEnd":186,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/tasks/worker/A2AWorkers.java#L150-L186","documentation":"Thrown by A2AWorkers.getAgentCard as NonRetryableException when the A2AAgentCardRequest.agentUrl is blank. The GET_AGENT_CARD worker first validates agentType is 'a2a' (via requireA2a), then requires a non-blank agentUrl before fetching the remote Agent Card. NonRetryableException marks the task FAILED_WITH_TERMINAL_ERROR so Conductor will not retry it.","triggerScenarios":"A GET_AGENT_CARD task whose input omits agentUrl or supplies an empty/whitespace value, or an agentType other than 'a2a' (which fails requireA2a first with a different message).","commonSituations":"Workflow author forgetting the agentUrl input field, a dynamic input parameter that resolved to empty, or copy-pasting a task definition without the URL.","solutions":["Add a non-blank 'agentUrl' to the GET_AGENT_CARD task input (the Agent Card well-known URL).","If the URL is dynamic, ensure the upstream task producing it always yields a non-empty value.","Validate the task input at authoring time before running the workflow."],"exampleFix":"// before\n{\n  \"name\": \"fetch_card\",\n  \"taskReferenceName\": \"fetch_card\",\n  \"type\": \"GET_AGENT_CARD\",\n  \"inputParameters\": { \"agentType\": \"a2a\" }\n}\n\n// after\n{\n  \"type\": \"GET_AGENT_CARD\",\n  \"inputParameters\": {\n    \"agentType\": \"a2a\",\n    \"agentUrl\": \"https://agent.example.com/.well-known/agent.json\"\n  }\n}","handlingStrategy":"validation","validationCode":"if (StringUtils.isBlank(request.getAgentUrl())) {\n    throw new IllegalArgumentException(\n        \"GET_AGENT_CARD task requires a non-blank 'agentUrl' input\");\n}\nif (!\"a2a\".equalsIgnoreCase(request.getAgentType())) {\n    throw new IllegalArgumentException(\"GET_AGENT_CARD requires agentType='a2a'\");\n}","typeGuard":null,"tryCatchPattern":"// NonRetryableException marks the task terminal; catch it to degrade gracefully\n// (e.g. in a worker wrapper) rather than retry.\ntry {\n    workers.getAgentCard(request);\n} catch (NonRetryableException e) {\n    // log and fail the task without retry\n}","preventionTips":["Always include a non-blank 'agentUrl' in GET_AGENT_CARD task input.","Set agentType to 'a2a'.","Validate workflow input parameters at authoring time.","Ensure dynamic agentUrl producers never emit empty values."],"tags":["a2a","agent-card","validation","non-retryable","input-validation"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}