{"record":{"id":"9cd3548676f582a4","repo":"microsoft/semantic-kernel","slug":"the-agent-type-specified-in-the-node-is-not-found","errorCode":null,"errorMessage":"The agent type specified in the node is not found.","messagePattern":"The agent type specified in the node is not found\\.","errorType":"exception","errorClass":"KernelException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.Core/Workflow/WorkflowBuilder.cs","lineNumber":210,"sourceCode":"        try\n        {\n            if (stepTypes is not null && stepTypes.TryGetValue(node.Agent.Type, out var type) && type is not null)\n            {\n                dotnetAgentType = type;\n            }\n            else\n            {\n                dotnetAgentType = Type.GetType(node.Agent.Type);\n            }\n        }\n        catch (TypeLoadException tle)\n        {\n            throw new KernelException($\"Failed to load the agent for node with id {node.Id}.\", tle);\n        }\n\n        if (dotnetAgentType == null)\n        {\n            throw new KernelException(\"The agent type specified in the node is not found.\");\n        }\n\n        var stepBuilder = processBuilder.AddStepFromType(dotnetAgentType, id: node.Id);\n        this._stepBuilders[node.Id] = stepBuilder;\n        return Task.CompletedTask;\n    }\n\n    #endregion\n\n    #region Orchestration\n\n    private Task BuildOrchestrationAsync(List<OrchestrationStep> orchestrationSteps, ProcessBuilder processBuilder)\n    {\n        // If there are no orchestration steps, return\n        if (orchestrationSteps.Count == 0)\n        {\n            return Task.CompletedTask;\n        }","sourceCodeStart":192,"sourceCodeEnd":228,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.Core/Workflow/WorkflowBuilder.cs#L192-L228","documentation":"Thrown by BuildDotNetStepAsync when type resolution returns null without throwing. Type.GetType returns null for unqualified or unresolvable names that do not raise TypeLoadException; the builder treats a null result as 'type not found'.","triggerScenarios":"node.Agent.Type is a partially-qualified name (no assembly) that Type.GetType cannot resolve and that is absent from the stepTypes dictionary, yielding null without an exception.","commonSituations":"Passing just the fully qualified namespace name without the assembly qualifier; the type lives in an assembly that Type.GetType cannot probe by default; stepTypes lookup miss.","solutions":["Use the assembly-qualified type name (typeof(MyStep).AssemblyQualifiedName) so Type.GetType can resolve it.","Provide a stepTypes dictionary mapping the name string to the Type for reliable resolution.","Ensure the type is public and the assembly is loadable in the host context."],"exampleFix":"// before: unqualified name -> null\nnode.Agent.Type = \"MyApp.Steps.MyStep\";\n\n// after: assembly-qualified\nnode.Agent.Type = typeof(MyApp.Steps.MyStep).AssemblyQualifiedName;","handlingStrategy":"validation","validationCode":"if (Type.GetType(node.Agent.Type) is null && !(stepTypes?.ContainsKey(node.Agent.Type) == true))\n    throw new KernelException($\"Agent type {node.Agent.Type} could not be resolved.\");","typeGuard":"static bool IsResolvableType(string name, Dictionary<string, Type>? preloaded) => (preloaded?.TryGetValue(name, out _) == true) || Type.GetType(name) is not null;","tryCatchPattern":"try { await builder.BuildProcessAsync(workflow, yaml, stepTypes); }\ncatch (KernelException ex) when (ex.Message.Contains(\"agent type specified in the node is not found\"))\n{ /* use assembly-qualified name or add to stepTypes */ }","preventionTips":["Use typeof(Step).AssemblyQualifiedName for node.Agent.Type.","Supply stepTypes mappings for any short names to avoid null resolution.","Ensure step types are public and their assemblies are loadable."],"tags":["semantic-kernel","process","workflow","dotnet","reflection"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}