{"record":{"id":"b20cf65fb18c57ae","repo":"CopilotKit/CopilotKit","slug":"agent-name-not-found","errorCode":null,"errorMessage":"Agent '{name}' not found.","messagePattern":"Agent '(.+?)' not found\\.","errorType":"exception","errorClass":"AgentNotFoundException","httpStatus":null,"severity":"error","filePath":"sdk-python/copilotkit/sdk.py","lineNumber":316,"sourceCode":"        self,\n        *,\n        context: CopilotKitContext,\n        name: str,\n        thread_id: str,\n        state: dict,\n        config: Optional[dict] = None,\n        messages: List[Message],\n        actions: List[ActionDict],\n        node_name: str,\n        meta_events: Optional[List[MetaEvent]] = None,\n    ) -> Any:\n        \"\"\"\n        Execute an agent\n        \"\"\"\n        agents = self.agents(context) if callable(self.agents) else self.agents\n        agent = next((agent for agent in agents if agent.name == name), None)\n        if agent is None:\n            raise AgentNotFoundException(name)\n\n        self._log_request_info(\n            title=\"Handling execute agent request:\",\n            data=[\n                (\"Context\", context),\n                (\"Agent\", agent.dict_repr()),\n                (\"Thread ID\", thread_id),\n                (\"Node Name\", node_name),\n                (\"State\", state),\n                (\"Config\", config),\n                (\"Messages\", messages),\n                (\"Actions\", actions),\n                (\"MetaEvents\", meta_events),\n            ],\n        )\n\n        try:\n            return agent.execute(","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/CopilotKit/CopilotKit/blob/68fbe97d87420bd84e8196965c71bd6e394a3f7a/sdk-python/copilotkit/sdk.py#L298-L334","documentation":"Error \"Agent '{name}' not found.\" thrown in CopilotKit/CopilotKit.","triggerScenarios":"Thrown at sdk-python/copilotkit/sdk.py:316 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"68fbe97d87420bd84e8196965c71bd6e394a3f7a","analyzedAt":"2026-08-27T04:03:26.537Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}