May 14, 2026

Article

We tested Markdown vs HTML for agent memory: HTML won

We tested HTML and Markdown format for agent memory. The result: HTML was more accurate (5.9% more accurate), cheaper (-42.4% total cost), and faster (-39.2% latency) than Markdown by more than we expected.

The Question

Thariq from the Claude Code team recently argued that HTML is a surprisingly good format for agent output: richer than Markdown, easier to share, more likely to actually get read. His point is about people reading what the agent writes.

At ByteRover, every context file has two readers:

  • The agent reads it on every query

  • People read the same file in the web app, to review and share it

HTML is obvious more friendly for human readers. But does it really perform better for agent memory: Accuracy, Cost and Latency?

To find out, we ran a 603-question benchmark where Markdown and HTML were the only thing that changed.

The Difference in Markdown and HTML format

Markdown was the default because it is a plain-text file that a person could open and edit with no special tools. That made sense when people did most of the writing.

Today the agent does the writing, and people mostly review and share. So how easy it is to read matters more than how easy it is to write. HTML format is easier to read with visuals for diagrams, data, status, layout

Example of A summary of a design discussion

The Benchmark

We ran the tests with same agent, same retrieval setup, same Gemini 3 Flash model. The only thing that changed was the output format: Markdown vs. HTML.

The agent curated 271 LoCoMo sessions, then answered 603 questions against them.

Conclusion

HTML is not only easier to read but it beats Markdown on accuracy, cost, and speed for agent memory.

We are developing this feature for ByteRover.