From ef48cbe971326fa0d94ea1557d34df54f8bcfc8b Mon Sep 17 00:00:00 2001 From: Brandon Hancock Date: Fri, 28 Feb 2025 11:44:51 -0500 Subject: [PATCH] Fix token tracking in Agent class to use token_process instead of _token_process --- src/crewai/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/crewai/agent.py b/src/crewai/agent.py index 048790782..c97108b23 100644 --- a/src/crewai/agent.py +++ b/src/crewai/agent.py @@ -327,7 +327,7 @@ class Agent(BaseAgent): request_within_rpm_limit=( self._rpm_controller.check_or_wait if self._rpm_controller else None ), - callbacks=[TokenCalcHandler(self._token_process)], + callbacks=[TokenCalcHandler(self.token_process)], ) def get_delegation_tools(self, agents: List[BaseAgent]):