Base class for parsing agent output into agent action/finish.
Parses tool invocations and final answers from XML-formatted agent output.
This parser extracts structured information from XML tags to determine whether an agent should perform a tool action or provide a final answer. It includes built-in escaping support to safely handle tool names and inputs containing XML special characters.