Graph2agent; Mermaid diagrams, explained for agents
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:…
What it does
graph2agent turns supported Mermaid diagrams into deterministic rich text that coding agents can follow. Measured: 50.41% fewer exact-comprehension failures in one frozen paired benchmark.
graph2agent turns Mermaid diagrams into explicit text for coding agents. Keep the diagram for people; add deterministic context that spells out the elements, connections, branches, order, topology, and what the notation does not prove. Humans can scan the picture visually; an agent receiving only Mermaid source must reconstruct those relationships from compact syntax. In one frozen paired benchmark, adding that text cut exact-comprehension failures from 121 to 60. ```mermaid flowchart TD request[Request] --> auth{Authorized?} auth -->|yes| api(API) auth -->|no| reject[Reject] ``` Rendered Mermaid · same source, compiled for people ◌ Exact interpreted-v3 agent context · v0.4.0 Diagram…from graph2agent.github.io
In the maker’s words, at launch
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... 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!
Does the same job
all alternatives →




- DCDiagrammatic.com – community for diagrams-as-code enthusiasts2024 · diagrammatic.com · ▲5
Hi there! I'm building Diagrammatic, a simple and free online tool with the ambition to become a community for diagrams-as-code enthusiasts. Currently, it supports Mermaid, PlantUML, Dot (Graphviz), Vega-Lite, and Typogram, but I'm looking to add more languages. Please let me know if there's a particular one you use. I'd appreciate any kind of constructive feedback as well. Thanks in advance!
More ai this month
the category →
I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com
Astute▲585Automate your B2B brand going viral, with new media creators
AI · 18d ago · company-app.joinastute.com


Hey HN, Henry from Cactus here! We previously released Cactus Needle, a 14MB agentic LLM for tool call, device use, and structured extraction for phones, wearables, smart homes, small robots and microcontrollers. We got really great feedback here, and have now incorporated the suggestions to release Needle 2. The whole model is a single 14MB binary that runs a full session in 28MB of RAM; 45m parameters at 2bit compression. Needle hits 500 tokens/sec decode speed on a Raspberry Pi 5, sits between 400-1,500 tokens/sec on VR devices like Meta Quest 3S and Apple Vision Pro, and ranges…
AI · 26d ago · cactuscompute.com


Launched alongside, August 2026
the whole month →- TL
Life & fun · 10d ago · louisabraham.github.io


- SA
Hello HN! I found that picking out plausible but diverse skin tones for my digital art and game development projects was kind of difficult, and I got curious about if there was a way to define a color space that made it easy. I've built a color picker and procedural generation algorithm based on the space as well as a bunch of other fun js features and demos throughout the page that use the equations. If you find it interesting, I have lots of explanations of how I built it and what properties the space has. The methodology might be a bit shaky, but hopefully the result is as helpful for…
Life & fun · Aug 2026 · toneyalexander.github.io


I trained a 125M-parameter transformer to autocomplete piano performances in real time (~108 notes/sec on an iPhone 15). The idea is basically GitHub Copilot or Tabnine, except instead of prompting it with code, you prompt it by playing a few notes on a MIDI piano. The model then continues what you played, entirely on-device. The app is free if anyone wants to try it. Happy to answer questions about the model, training, Core ML, or the many things that didn't work.
AI · 17d ago · simedw.com