Show HN: Graph2agent; Mermaid diagrams, explained for agents Graph2agent, a new open-source tool, converts Mermaid diagrams into rich text for AI agents, reducing errors by 50% across diagram classes and 80% for sequence diagrams, while cutting reasoning tokens by nearly 50%. Built by a developer to help agents read diagrams, it can be used via MCP or in pre-commit jobs. During the implementation of a huge high performance service. In order to keep context small mainly for humans I kept the specs into mermaid diagrams. When communicating with humans; diagrams were easy to follow and to remember. But when I asked the agent to implement what's in the diagram, most of the times it failed. So I came into conclusion that agents are good into writing mermaid diagrams but they are not good into reading them. I built graph2agent in order to deterministically without inference : convert mermaid diagrams into digestible rich text for agents. examples: https://github.com/graph2agent/examples/blob/main/examples/m... https://github.com/graph2agent/examples/blob/main/examples/markdown/five-families.md?plain=1 This gave us 50% error reduction for any class of diagrams and 80% error reduction for sequence diagrams specifically. Also Input tokens increased on avg by 8% which is expected but Reasoning tokens dropped by almost 50%. You can use it either with MCP so agents can call it with any mermaid diagram, and also can put it in pre-commit jobs and run it on every PR so all diagrams are agent ready I hope you like it Let me know your thoughts Comments URL: https://news.ycombinator.com/item?id=49250014 https://news.ycombinator.com/item?id=49250014 Points: 1 Comments: 0