{"record":{"id":"897bef46e8ac5fac","repo":"microsoft/semantic-kernel","slug":"the-step-this-name-has-no-functions","errorCode":null,"errorMessage":"The step {this.Name} has no functions.","messagePattern":"The step (.+?) has no functions\\.","errorType":"exception","errorClass":"KernelException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Experimental/Process.Core/ProcessStepBuilder.cs","lineNumber":133,"sourceCode":"        if (this.IncomingEdgeGroups.ContainsKey(edgeGroup.GroupId))\n        {\n            return;\n        }\n\n        // Register the group by GroupId.\n        this.IncomingEdgeGroups[edgeGroup.GroupId] = edgeGroup;\n    }\n\n    /// <summary>\n    /// Resolves the function name for the step.\n    /// </summary>\n    /// <returns></returns>\n    /// <exception cref=\"KernelException\"></exception>\n    private string ResolveFunctionName()\n    {\n        if (this.FunctionsDict.Count == 0)\n        {\n            throw new KernelException($\"The step {this.Name} has no functions.\");\n        }\n        else if (this.FunctionsDict.Count > 1)\n        {\n            throw new KernelException($\"The step {this.Name} has more than one function, so a function name must be provided.\");\n        }\n\n        return this.FunctionsDict.Keys.First();\n    }\n\n    /// <summary>\n    /// Links the output of the current step to the an input of another step via the specified event type.\n    /// </summary>\n    /// <param name=\"eventId\">The Id of the event.</param>\n    /// <param name=\"edgeBuilder\">The targeted function.</param>\n    internal virtual void LinkTo(string eventId, ProcessStepEdgeBuilder edgeBuilder)\n    {\n        if (!this.Edges.TryGetValue(eventId, out List<ProcessStepEdgeBuilder>? edges) || edges == null)\n        {","sourceCodeStart":115,"sourceCodeEnd":151,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Experimental/Process.Core/ProcessStepBuilder.cs#L115-L151","documentation":"Thrown by ProcessStepBuilder.ResolveFunctionName (a private method called during target resolution) when FunctionsDict is empty — the step has no kernel functions at all. Resolution requires at least one function to infer or select from.","triggerScenarios":"Targeting a step that has zero [KernelFunction] methods, then attempting to resolve a function name without specifying one (relying on auto-resolution). Also triggered when a step type is loaded but its function metadata is empty.","commonSituations":"Using a step class with no [KernelFunction]-decorated methods; the step type was loaded dynamically but reflection found no kernel functions (e.g. methods are private or not decorated); using an abstract base class or a state-only step as a process step; version change where functions were removed.","solutions":["Ensure the step class has at least one method decorated with [KernelFunction(\"name\")].","Verify the step type is the correct concrete class, not an abstract base or state-only class.","Check that kernel function methods are public and properly decorated if using a dynamic loading scenario."],"exampleFix":"// before — step has no kernel functions\npublic class EmptyStep : KernelProcessStep { }\nprocess.AddStepFromType<EmptyStep>();\n// any edge targeting EmptyStep throws\n\n// after — add a kernel function\npublic class MyStep : KernelProcessStep\n{\n    [KernelFunction]\n    public void DoWork() { }\n}\nprocess.AddStepFromType<MyStep>();","handlingStrategy":"validation","validationCode":"if (step.FunctionsDict.Count == 0)\n    throw new InvalidOperationException(\n        $\"Step '{step.Name}' has no kernel functions. Add at least one [KernelFunction] method.\");\n\n// proceed with edge targeting","typeGuard":"bool HasKernelFunctions(ProcessStepBuilder step) => step.FunctionsDict.Count > 0;","tryCatchPattern":null,"preventionTips":["Ensure every step class has at least one [KernelFunction]-decorated public method.","Validate step function metadata after AddStepFromType before wiring edges.","Avoid using state-only or marker classes as process steps."],"tags":["step-builder","kernel-function","function-resolution","dotnet"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}