CopilotKit/CopilotKit · error · AgentNotFoundException
Agent '{name}' not found.
Error message
Agent '{name}' not found. What it means
Error "Agent '{name}' not found." thrown in CopilotKit/CopilotKit.
Source
Thrown at sdk-python/copilotkit/sdk.py:316
self,
*,
context: CopilotKitContext,
name: str,
thread_id: str,
state: dict,
config: Optional[dict] = None,
messages: List[Message],
actions: List[ActionDict],
node_name: str,
meta_events: Optional[List[MetaEvent]] = None,
) -> Any:
"""
Execute an agent
"""
agents = self.agents(context) if callable(self.agents) else self.agents
agent = next((agent for agent in agents if agent.name == name), None)
if agent is None:
raise AgentNotFoundException(name)
self._log_request_info(
title="Handling execute agent request:",
data=[
("Context", context),
("Agent", agent.dict_repr()),
("Thread ID", thread_id),
("Node Name", node_name),
("State", state),
("Config", config),
("Messages", messages),
("Actions", actions),
("MetaEvents", meta_events),
],
)
try:
return agent.execute(View on GitHub (pinned to 68fbe97d87)
When it happens
Trigger: Thrown at sdk-python/copilotkit/sdk.py:316 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of CopilotKit/CopilotKit@68fbe97d87 (2026-08-27).
Data as JSON: /api/errors/b20cf65fb18c57ae.
Report an issue: GitHub.