Required prerequisites
Motivation
Some tools will call ChatAgent inside themselves. For example, in the current implementation of HybridBrowserToolkit.get_som_screenshot, it calls astep of the original agent, inside the tool (Link). The problem is that when we are counting the token usage of the original ChatAgent.astep that calls this get_som_screenshot tool, we are not able to track the token cost of the inner astep called inside the tool.
Solution
We hope to have a mechanism to track the token usage from the inner astep, while we are only able to access the access the original outer ChatAgent response, as a user of Camel. @Wendong-Fan Said that Camel might need a good way for better tracking token usages in such cases.
cc @nitpicker55555
Alternatives
No response
Additional context
No response