{"record":{"id":"343f067d57437f9b","repo":"microsoft/semantic-kernel","slug":"agent-type-agent-type-is-not-supported","errorCode":null,"errorMessage":"Agent type '{agent_type}' is not supported.","messagePattern":"Agent type '(.+?)' is not supported\\.","errorType":"exception","errorClass":"AgentInitializationException","httpStatus":null,"severity":"error","filePath":"python/semantic_kernel/agents/agent.py","lineNumber":815,"sourceCode":"\n        Returns:\n            An instance of the requested agent.\n\n        Raises:\n            AgentInitializationException: If the dictionary is missing a 'type' field or the agent type is unsupported.\n\n        Example:\n            agent = await AgentRegistry.create_agent_from_dict(agent_data, kernel=kernel)\n        \"\"\"\n        _preload_builtin_agents()\n\n        agent_type = data.get(\"type\", \"\").lower()\n\n        if not agent_type:\n            raise AgentInitializationException(\"Missing 'type' field in agent definition.\")\n\n        if agent_type not in AGENT_TYPE_REGISTRY:\n            raise AgentInitializationException(f\"Agent type '{agent_type}' is not supported.\")\n\n        agent_cls = AGENT_TYPE_REGISTRY[agent_type]\n\n        if not isinstance(agent_cls, DeclarativeSpecProtocol):\n            raise AgentInitializationException(\n                f\"Agent class '{agent_cls.__name__}' does not support declarative spec loading.\"\n            )\n\n        return await agent_cls.from_dict(\n            data,\n            kernel=kernel,\n            plugins=plugins,\n            settings=settings,\n            extras=extras,\n            **kwargs,\n        )\n\n    @staticmethod","sourceCodeStart":797,"sourceCodeEnd":833,"githubUrl":"https://github.com/microsoft/semantic-kernel/blob/c028a0c7dc4f0814cdcbaba9d998f187a41197bf/python/semantic_kernel/agents/agent.py#L797-L833","documentation":"The dict-path counterpart of error 700: create_agent_from_dict found a 'type' value but it is not present in AGENT_TYPE_REGISTRY. Same cause (typo, unregistered custom type, missing optional dependency) but reached through the dict entry point instead of the YAML one.","triggerScenarios":"Calling create_agent_from_dict with `{'type': 'azre_ai_agent', ...}` (typo) or a custom type string that was never registered via AgentRegistry.register_type / @register_agent_type.","commonSituations":"Mismatch between the type string in a persisted config and the version of Semantic Kernel that registered the built-ins; custom agent module not imported.","solutions":["Print AGENT_TYPE_REGISTRY keys and align the dict's 'type' value to one of them (case-insensitive).","Register the custom agent type before the call with AgentRegistry.register_type(type_str, cls).","Install the optional package that registers the built-in type you expect."],"exampleFix":"# before\nawait AgentRegistry.create_agent_from_dict({'type': 'azure_agent', 'name': 'a'}, kernel=kernel)\n\n# after\nawait AgentRegistry.create_agent_from_dict({'type': 'azure_ai_agent', 'name': 'a'}, kernel=kernel)","handlingStrategy":"validation","validationCode":"from semantic_kernel.agents.agent import AGENT_TYPE_REGISTRY, _preload_builtin_agents\n_preload_builtin_agents()\nassert data['type'].lower() in AGENT_TYPE_REGISTRY, f'Unknown type {data[\"type\"]}; known {sorted(AGENT_TYPE_REGISTRY)}'","typeGuard":"def is_registered_agent_type(type_str: str) -> bool:\n    _preload_builtin_agents()\n    return isinstance(type_str, str) and type_str.lower() in AGENT_TYPE_REGISTRY","tryCatchPattern":"from semantic_kernel.exceptions.agent_exceptions import AgentInitializationException\ntry:\n    agent = await AgentRegistry.create_agent_from_dict(data, kernel=kernel)\nexcept AgentInitializationException as e:\n    logger.error('Load failed: %s', e)\n    raise","preventionTips":["Keep the dict 'type' value aligned with a registered type string.","Register custom types before loading."],"tags":["agent-registry","declarative-spec","semantic-kernel"],"backgroundTag":null,"analyzedSha":"c028a0c7dc4f0814cdcbaba9d998f187a41197bf","analyzedAt":"2026-08-13T13:48:05.040Z","schemaVersion":2},"datasetVersion":"2026-08-13T14:17:21.547Z"}