{"record":{"id":"51910fabea8dc36b","repo":"microsoft/semantic-kernel","slug":"the-agent-specified-in-the-node-with-id-node-id","errorCode":null,"errorMessage":"The agent specified in the Node with id {node.Id} is not fully specified.","messagePattern":"The agent specified in the Node with id (.+?) is not fully specified\\.","errorType":"validation","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.Core/Workflow/WorkflowBuilder.cs","lineNumber":187,"sourceCode":"            //agentBuilder.WithNodeInputs(node.Inputs); TODO: What to do here?\n        }\n\n        this._stepBuilders[node.Id] = stepBuilder;\n        return Task.CompletedTask;\n    }\n\n    private Task BuildPythonStepAsync(Node node, ProcessBuilder processBuilder)\n    {\n        throw new KernelException(\"Python nodes are not supported in the dotnet runtime.\");\n    }\n\n    private Task BuildDotNetStepAsync(Node node, ProcessBuilder processBuilder, Dictionary<string, Type>? stepTypes = null)\n    {\n        Verify.NotNull(node);\n\n        if (node.Agent is null || string.IsNullOrEmpty(node.Agent.Type))\n        {\n            throw new ArgumentException($\"The agent specified in the Node with id {node.Id} is not fully specified.\");\n        }\n\n        // For dotnet node type, the agent type specifies the assembly qualified namespace of the class to be executed.\n        Type? dotnetAgentType = null;\n        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);","sourceCodeStart":169,"sourceCodeEnd":205,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.Core/Workflow/WorkflowBuilder.cs#L169-L205","documentation":"Thrown by BuildDotNetStepAsync when a dotnet node's agent is missing or its Type string is empty. The builder needs node.Agent with a non-empty Type (the assembly-qualified name of the step class) to load the step type.","triggerScenarios":"A node with Type 'dotnet' whose node.Agent is null, or whose node.Agent.Type is null/empty. The guard fires before any type resolution attempt.","commonSituations":"Workflow YAML with a dotnet node missing the agent.type field; partial agent blocks; typos in the 'type' property name causing it to deserialize as null.","solutions":["Populate node.Agent.Type with the assembly-qualified type name of the target KernelProcessStep subclass.","Use typeof(MyStep).AssemblyQualifiedName to obtain the exact string rather than hand-typing it.","Validate node.Agent?.Type is non-empty for every dotnet node before building."],"exampleFix":"// before\nnode.Type = \"dotnet\"; node.Agent = new AgentDefinition { Type = \"\" };\n\n// after\nnode.Agent = new AgentDefinition { Type = typeof(MyStep).AssemblyQualifiedName };","handlingStrategy":"validation","validationCode":"foreach (var n in workflow.Nodes.Where(x => x.Type == \"dotnet\"))\n    if (n.Agent is null || string.IsNullOrEmpty(n.Agent.Type))\n        throw new ArgumentException($\"Node {n.Id} agent is not fully specified.\");","typeGuard":"static bool DotNetNodeIsSpecified(Node n) => n.Agent is not null && !string.IsNullOrEmpty(n.Agent.Type);","tryCatchPattern":"try { await builder.BuildProcessAsync(workflow, yaml); }\ncatch (ArgumentException ex) when (ex.Message.Contains(\"not fully specified\"))\n{ /* set node.Agent.Type to an assembly-qualified name */ }","preventionTips":["Always set agent.type to typeof(Step).AssemblyQualifiedName.","Validate dotnet node agents in a pre-build pass.","Use templates that require agent.type for dotnet nodes."],"tags":["semantic-kernel","process","workflow","dotnet","agent"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}