diff --git a/src/crewai/tools/tool_usage.py b/src/crewai/tools/tool_usage.py index 78942fc39..c73faa5cb 100644 --- a/src/crewai/tools/tool_usage.py +++ b/src/crewai/tools/tool_usage.py @@ -168,8 +168,8 @@ class ToolUsage: if self.agent: event_data = { - "agent_key": self.agent.key if self.agent else None, - "agent_role": self.agent.role if self.agent else None, + "agent_key": self.agent.key, + "agent_role": self.agent.role, "tool_name": self.action.tool, "tool_args": self.action.tool_input, "tool_class": self.action.tool,