{"record":{"id":"ca8ce5facb01257b","repo":"microsoft/semantic-kernel","slug":"missing-agent-description-agent-name-agent-id","errorCode":null,"errorMessage":"Missing agent description: {agent.Name ?? agent.Id}","messagePattern":"Missing agent description: (.+?)","errorType":"exception","errorClass":"ArgumentException","httpStatus":null,"severity":"error","filePath":"dotnet/src/Agents/Orchestration/AgentActor.cs","lineNumber":184,"sourceCode":"            lastStreamedResponse = streamedResponse.Message;\n        }\n\n        await HandleStreamedMessage(lastStreamedResponse, isFinal: true).ConfigureAwait(false);\n\n        async ValueTask HandleStreamedMessage(StreamingChatMessageContent? streamedResponse, bool isFinal)\n        {\n            if (this.Context.StreamingResponseCallback != null && streamedResponse != null)\n            {\n                await this.Context.StreamingResponseCallback.Invoke(streamedResponse, isFinal).ConfigureAwait(false);\n            }\n        }\n    }\n\n    private AgentInvokeOptions GetInvokeOptions(Func<ChatMessageContent, Task> messageHandler) => this._options ??= this.CreateInvokeOptions(messageHandler);\n\n    private static string VerifyDescription(Agent agent)\n    {\n        return agent.Description ?? throw new ArgumentException($\"Missing agent description: {agent.Name ?? agent.Id}\", nameof(agent));\n    }\n}\n","sourceCodeStart":166,"sourceCodeEnd":187,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/dotnet/src/Agents/Orchestration/AgentActor.cs#L166-L187","documentation":"Thrown by AgentActor.VerifyDescription when agent.Description is null. Orchestration actors embed each agent's description in prompts (e.g. so a group-chat manager can decide who speaks next), so a missing description makes the orchestration unable to function and is rejected up front with ArgumentException.","triggerScenarios":"Constructing/invoking any orchestration (GroupChat, Handoff, Sequential, etc.) that uses AgentActor with an Agent whose Description was never set.","commonSituations":"Creating agents with only Name/Id and instructions but forgetting Description; reusing a minimal agent factory in orchestration code.","solutions":["Set a meaningful Description on every agent passed into an orchestration.","Add a build-time/factory assertion that Description is non-null before registering agents."],"exampleFix":"// before\nvar agent = new OpenAIAssistantAgent(client, id: \"writer\") { Name = \"writer\" /* no Description */ };\nnew GroupChatOrchestration(agent, manager).InvokeAsync(...); // throws\n\n// after\nvar agent = new OpenAIAssistantAgent(client, id: \"writer\")\n{\n    Name = \"writer\",\n    Description = \"Drafts clear, concise prose.\"\n};","handlingStrategy":"validation","validationCode":"foreach (var agent in agents)\n{\n    if (string.IsNullOrWhiteSpace(agent.Description))\n        throw new InvalidOperationException($\"Agent '{agent.Name ?? agent.Id}' needs a Description for orchestration.\");\n}","typeGuard":"static bool HasOrchestrationDescription(Agent agent) => !string.IsNullOrWhiteSpace(agent.Description);","tryCatchPattern":null,"preventionTips":["Always set a concise, meaningful Description on orchestration agents.","Assert Description at the agent-factory level so it cannot be omitted.","Descriptions are used in prompts — keep them accurate for routing quality."],"tags":["orchestration","configuration","agents","validation"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}