langchain/callbacks/comet_ml_callback.py/CometCallbackHandler/on_agent_action
class CometCallbackHandler:    def on_agent_action(self, action: AgentAction, **kwargs: Any) -> Any:
        """Run on agent action."""
        self.step += 1
        self.tool_starts += 1
        self.starts += 1

        tool = action.tool
        tool_input = str(action.tool_input)
        log = action.log

        resp = self._init_resp()
        resp.update({"action": "on_agent_action", "log": log, "tool": tool})
        resp.update(self.get_custom_callback_meta())
        if self.stream_logs:
            self._log_stream(tool_input, resp, self.step)

        resp.update({"tool_input": tool_input})
        self.action_records.append(resp)