{"record":{"id":"b30b68095fa0c6cb","repo":"microsoft/semantic-kernel","slug":"all-members-must-have-a-description-b30b68","errorCode":null,"errorMessage":"All members must have a description.","messagePattern":"All members must have a description\\.","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/agents/orchestration/magentic.py","lineNumber":797,"sourceCode":"        \"\"\"Initialize the Magentic One orchestration.\n\n        Args:\n            members (list[Agent]): A list of agents.\n            manager (MagenticManagerBase): The manager for the Magentic One pattern.\n            name (str | None): The name of the orchestration.\n            description (str | None): The description of the orchestration.\n            input_transform (Callable | None): A function that transforms the external input message.\n            output_transform (Callable | None): A function that transforms the internal output message.\n            agent_response_callback (Callable | None): A function that is called when a response is produced\n                by the agents.\n            streaming_agent_response_callback (Callable | None): A function that is called when a streaming response\n                is produced by the agents.\n        \"\"\"\n        self._manager = manager\n\n        for member in members:\n            if member.description is None:\n                raise ValueError(\"All members must have a description.\")\n\n        super().__init__(\n            members=members,\n            name=name,\n            description=description,\n            input_transform=input_transform,\n            output_transform=output_transform,\n            agent_response_callback=agent_response_callback,\n            streaming_agent_response_callback=streaming_agent_response_callback,\n        )\n\n    @override\n    async def _start(\n        self,\n        task: DefaultTypeAlias,\n        runtime: CoreRuntime,\n        internal_topic_type: str,\n        cancellation_token: CancellationToken,","sourceCodeStart":779,"sourceCodeEnd":815,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/agents/orchestration/magentic.py#L779-L815","documentation":"MagenticOrchestration feeds each member's description into the orchestrator's task-ledger and progress-ledger prompts so the model knows who can speak. A member with description=None cannot be advertised, so construction refuses it. This is enforced in addition to the base class's non-empty members check.","triggerScenarios":"Constructing `MagenticOrchestration(members=[...], manager=...)` where any agent in members has `description is None`. Agents default to description=None unless explicitly set.","commonSituations":"Creating ChatCompletionAgent/AzureAssistantAgent instances and forgetting the description argument. Reusing agents built for a non-Magentic orchestration (group_chat, sequential) where descriptions were optional.","solutions":["Set a concise, role-specific description on every member before constructing MagenticOrchestration.","Validate members programmatically before construction (see defense validation code).","Use distinct descriptions that match each agent's name and purpose to also improve speaker selection."],"exampleFix":"// before\nagent = ChatCompletionAgent(name=\"Researcher\")  # description defaults to None\norch = MagenticOrchestration(members=[agent], manager=manager)  # raises\n\n// after\nagent = ChatCompletionAgent(\n    name=\"Researcher\",\n    description=\"Researcher: finds and summarizes information.\",\n    service=service,\n)\norch = MagenticOrchestration(members=[agent], manager=manager)","handlingStrategy":"validation","validationCode":"# Validate descriptions before constructing MagenticOrchestration\nmissing = [m.name for m in members if not getattr(m, \"description\", None)]\nif missing:\n    raise ValueError(f\"These members lack a description: {missing}\")\norch = MagenticOrchestration(members=members, manager=manager)","typeGuard":"def all_members_described(members) -> bool:\n    return all(getattr(m, \"description\", None) for m in members)","tryCatchPattern":null,"preventionTips":["Always pass a description when constructing each agent.","Make descriptions role-specific and mention the agent.name.","Validate the members list in a helper before building the orchestration."],"tags":["semantic-kernel","magentic","configuration","init","validation"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}