begin the refactoring of the events generated by the agent