{"record":{"id":"314a37654a656e85","repo":"conductor-oss/conductor","slug":"unsupported-agenttype-agenttype-only-a2a-is","errorCode":null,"errorMessage":"Unsupported agentType '<agentType>' (only 'a2a' is supported)","messagePattern":"Unsupported agentType '<agentType>' \\(only 'a2a' is supported\\)","errorType":"validation","errorClass":"NonRetryableException","httpStatus":null,"severity":"error","filePath":"ai/src/main/java/org/conductoross/conductor/ai/tasks/worker/A2AWorkers.java","lineNumber":716,"sourceCode":"        return objectMapper.convertValue(result.getOutputData(), outputType);\n    }\n\n    private <T> T parse(Task task, Class<T> type) {\n        return objectMapper.convertValue(task.getInputData(), type);\n    }\n\n    private static <T extends TaskResult> T fail(T result, String reason, boolean nonRetryable) {\n        result.setStatus(\n                nonRetryable\n                        ? TaskResult.Status.FAILED_WITH_TERMINAL_ERROR\n                        : TaskResult.Status.FAILED);\n        result.setReasonForIncompletion(reason);\n        return result;\n    }\n\n    private static void requireA2a(String agentType) {\n        if (!A2AService.isA2aAgentType(agentType)) {\n            throw new NonRetryableException(\n                    \"Unsupported agentType '\" + agentType + \"' (only 'a2a' is supported)\");\n        }\n    }\n\n    private static void recordOutcome(TaskResult result) {\n        if (result.getStatus() != null && result.getStatus() != TaskResult.Status.IN_PROGRESS) {\n            A2AMetrics.clientCall(result.getStatus().name().toLowerCase());\n        }\n    }\n\n    private static boolean isEmptyMessage(A2AMessage message) {\n        return message == null || message.getParts() == null || message.getParts().isEmpty();\n    }\n\n    private static long asLong(Object value, long defaultValue) {\n        return value instanceof Number number ? number.longValue() : defaultValue;\n    }\n","sourceCodeStart":698,"sourceCodeEnd":734,"githubUrl":"https://github.com/conductor-oss/conductor/blob/cf7c3e4a8adfb158be778ab1ec525323c363cd3a/ai/src/main/java/org/conductoross/conductor/ai/tasks/worker/A2AWorkers.java#L698-L734","documentation":"Thrown as NonRetryableException by requireA2a when agentType is not recognized as an A2A runtime type. A2AService.isA2aAgentType returns true only for null, blank, or 'a2a' (case-insensitive); any other concrete value (e.g. 'conductor', 'azure-foundry') fails this stricter guard used in code paths that only support pure A2A. Note the main execute() path has a separate, friendlier message listing 'a2a' and 'conductor'.","triggerScenarios":"Calling a code path guarded by requireA2a() with agentType set to 'conductor', 'azure-foundry', or any custom/misspelled value. This guard is stricter than the execute() entry guard.","commonSituations":"Passing agentType='conductor' into an A2A-only helper; typo such as 'a2A' is fine (case-insensitive) but 'a2a ' with trailing space fails; a workflow copied from a conductor-agent template but executed through an a2a-only path.","solutions":["Set agentType to 'a2a' (or omit it / leave blank to default to A2A) for A2A workers.","If you intended the embedded Conductor agent runtime, route through the conductor-agent code path instead of the requireA2a-guarded one.","Trim whitespace and check for typos in the agentType input value.","Confirm the worker/endpoint you are calling actually supports the agentType you supplied."],"exampleFix":"// before\n{ \"agentType\": \"conductor\", \"agentUrl\": \"https://agent/a2a\" }\n// after\n{ \"agentType\": \"a2a\", \"agentUrl\": \"https://agent/a2a\" }","handlingStrategy":"validation","validationCode":"// Normalize/validate agentType before calling a2a-only paths\nString t = request.getAgentType();\nif (!A2AService.isA2aAgentType(t)) {\n    // either set to \"a2a\" or route to the conductor-agent path\n    request.setAgentType(\"a2a\");\n}","typeGuard":"// Narrow to an a2a-compatible agentType\nboolean isA2a = A2AService.isA2aAgentType(request.getAgentType());","tryCatchPattern":null,"preventionTips":["Default agentType to 'a2a' (or leave blank) for A2A workflows.","Whitelist agentType values at the workflow definition level.","Trim whitespace from agentType inputs."],"tags":["a2a","input-validation","non-retryable","configuration"],"backgroundTag":null,"analyzedSha":"cf7c3e4a8adfb158be778ab1ec525323c363cd3a","analyzedAt":"2026-08-14T03:33:19.897Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}