TALA is open-source | D2 Documentation Skip to main content Tour Blog Examples Releases Playground Search Recent Posts RSS TALA is open-source D2 is non-profit ASCII output C4 Model Text to PowerPoint Text to (animated) diagrams Hand-drawn diagram aesthetic Dark-mode responsive diagrams TALA is open-source September 7, 2026 | Alexander Wang Following up on the announcement here , TALA (Terrastruct's AutoLayout Algorithm) is now open-source under the same license as D2 (MPL-2.0). TALA is a novel autolayout algorithm designed with software architecture diagrams in mind. This means it's primarily an orthogonal layout engine, which more closely matches what you might find on whiteboards, rather than the DAG-based ones that grow in one direction. It blends ideas from different graph-drawing research papers (cited in source code) along with original techniques to achieve aesthetic diagrams. It considers multiple objectives of "aesthetic", including symmetry, median distance, flow, clustering of like nodes, and much more. I'll keep the text short and lead with examples. The first batch compares diagrams rendered with TALA with the other two layout algorithms D2 comes with -- Dagre and ELK. These are not hand-selected, I just found public d2 files from around GitHub. So for some, you may very well prefer the not-TALA layout. The second batch demonstrates a unique property of TALA, which is that node positions and sizes can be customized, e.g. locking in the coordinates. This lends itself especially well to agentic use cases, where models can draw in 2D space well, but TALA still takes care of routing, which models still struggle with. I had AI generate these. The third batch demonstrates TALA's capability to support a hybrid of some nodes specifying coordinates and some left to the layout engine. You might have a specific shape of a collection of nodes in mind, which you can specify with coordinates, and TALA can take care of the rest. Again, AI generated. Please also note that TALA is not without tradeoffs. It has randomness in the algorithm. It finds the best layout by using a default of 3 seeds and choosing the one scored the best. Given the same seeds and same input, it'll produce the same diagram. But let's say you just add one more node. The diagram could look completely different. In Dagre and ELK, it looks mostly the same as prior, with the extra node accommodated for. This is sometimes desirable. It doesn't do DAGs as well. I often find myself preferring Dagre or ELK when I want a long flowing graph. It can take longer to run for larger diagrams -- scaling nonlinearly. For a benchmark of TALA's runtime performance compared to others, see https://github.com/d2lang/d2-benchmarks . TALA comes bundled into D2 v0.9.0, so just install and specify with --layout=tala to try it out! Or head on over to https://play.d2lang.com , which runs 100% client-side. I especially look forward to the improvements that being open-source brings, and can't wait to see what improvements and ideas are submitted by the community. Special thanks to Gavin Nishizawa for substantial broad contributions across TALA, and Júlio César Batista for his work on hierarchy algorithms and more. It was so fun getting to work on such interesting stuff with you guys. Batch 1: Comparisons Fulcro RAD architecture Side by side TALA Dagre ELK D2 source ↓ TALA Open SVG ↗ Dagre Open SVG ↗ ELK Open SVG ↗ Select a diagram to enlarge it. Each layout is scaled to fit its panel. Mocha s
CSS must be the hardest technology out there, because people write these algorithms yet their site breaks completely on iOS safari on an iPhone SE2. Reminded me of when Linear’s CEO shared a post on Twitter bragging about how they only hired the best devs, and then I sent a screenshot of their homepage with a broken horizontal scroll. They dismissed it as a fault on my end for having an unsupported device. Turns out that a single CSS2 directive from 1998 fixed the issue (my OS is from 2022).
The first few graphs are impressive, it does a much tidier job. The Go queue one is objectively worse - the other versions keep services and users grouped together, as well as a left-to-right flow. The TALA version makes it look more complicated than it is.
This is great! There's a real shortage of good layout algorithms. Everyone pretty much gave up after Graphviz.
Although tbh I have come to the conclusion that automatic layout algorithms don't work very well for large diagrams and don't save you much effort for smaller diagrams.
What I really want is some kind of interactive editor that has a go, but lets me drag nodes into more sensible positions while maintaining all the arrows. Maybe this makes that easier given its support for specifying node positions?
Related:
https://news.ycombinator.com/item?id=49589768
That's nice; my first impressions of D2 were much worse than they should have been since the default layout engine is pretty terrible for some types of graphs; ELK is a big improvement, and when I tried TALA it was sometimes a big improvement over ELK.
I never purchased TALA though because I don't use D2 at work, and the costs of buying TALA were above my "fun money" amount.
KUDOS! KUDOS! and even more KUDUS! this engine is indeed excellent, and is great contribution to everyone doing architecture around the world. Would continue using it with much love and appreciation. Also - rushing myself to the donate button which leads here precisely
https://hcb.hackclub.com/donations/start/d2
before discovering d2, I wrote / vibe coded my own diagram generator: https://azriel.im/disposition
then after discovering it, I was too invested in my own project to switch -- the complexity in positioning nodes, routing edges to not draw over labels, taking into account nesting and rank dir gave me an appreciation for how hard these can be, and I kinda wanted my own version (plus other features)
Would integrating/implementing this into graphviz be a good move or mixing wrong things?
Always happy to see D2 on here! In my last job, I had to do several architecture diagrams. Learning D2 took maybe 1 day, and saved me much more time than that.
Thanks for that. What do you think are the key heuristics / concepts that made it standout or be more appropriate for architecture diagrams?