I don't want to make anyone mad, but both of these approaches are flawed: If agents want to auto-convert your HTML to markdown, they can do so themselves (and popular agents do post-processing before handing content to the main LLM). What does work is to respond with bespoke markdown from the underlying content source that is higher fidelity than what an auto-converted may achieve. Also keep in mind, that you actually don't just want to strip the navigation. Agents need to a way to find other pages as well.