LmCast :: Stay tuned in

TALA Is Open-Source

Recorded: Sept. 8, 2026, 6:11 a.m.

Original Summarized

TALA is open-source | D2 Documentation

Skip to main contentTourBlogExamplesReleasesPlaygroundSearchRecent PostsRSS TALA is open-sourceD2 is non-profitASCII outputC4 ModelText to PowerPointText to (animated) diagramsHand-drawn diagram aestheticDark-mode responsive diagramsTALA is open-sourceSeptember 7, 2026 | Alexander WangFollowing 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 sideTALADagreELKD2 source ↓TALAOpen SVG ↗DagreOpen SVG ↗ELKOpen SVG ↗Select a diagram to enlarge it. Each layout is scaled to fit its panel.
Mocha secure-enclave SoC​
Side by sideTALADagreELKD2 source ↓TALAOpen SVG ↗DagreOpen SVG ↗ELKOpen SVG ↗Select a diagram to enlarge it. Each layout is scaled to fit its panel.
Jupyter on AWS EKS​
Side by sideTALADagreELKD2 source ↓TALAOpen SVG ↗DagreOpen SVG ↗ELKOpen SVG ↗Select a diagram to enlarge it. Each layout is scaled to fit its panel.
Lion Reader frontend data flow​
Side by sideTALADagreELKD2 source ↓TALAOpen SVG ↗DagreOpen SVG ↗ELKOpen SVG ↗Select a diagram to enlarge it. Each layout is scaled to fit its panel.
ROSS rotor-dynamics workflow​
Side by sideTALADagreELKD2 source ↓TALAOpen SVG ↗DagreOpen SVG ↗ELKOpen SVG ↗Select a diagram to enlarge it. Each layout is scaled to fit its panel.
Go Queue worker architecture​
Side by sideTALADagreELKD2 source ↓TALAOpen SVG ↗DagreOpen SVG ↗ELKOpen SVG ↗Select a diagram to enlarge it. Each layout is scaled to fit its panel.
Ouroboros Leios simulator​
Side by sideTALADagreELKD2 source ↓TALAOpen SVG ↗DagreOpen SVG ↗ELKOpen SVG ↗Select a diagram to enlarge it. Each layout is scaled to fit its panel.
Batch 2: Custom positioning​
Signal House​
TALA · positioned with top / leftD2 source ↓Open SVG ↗View D2 source
Atlas / Data platform​
TALA · positioned with top / leftD2 source ↓Open SVG ↗View D2 source
Night shift / Mission control​
TALA · positioned with top / leftD2 source ↓Open SVG ↗View D2 source
Friday deploy: the escape room​
TALA · positioned with top / leftD2 source ↓Open SVG ↗View D2 source
The Internet is a jellyfish​
TALA · positioned with top / leftD2 source ↓Open SVG ↗View D2 source
Orbital coffee logistics​
TALA · positioned with top / leftD2 source ↓Open SVG ↗View D2 source

Cloud Conservatory​
TALA · positioned with top / leftD2 + icons ↓Open SVG ↗View D2 source
Velvet Rope​
TALA · positioned with top / leftD2 + icons ↓Open SVG ↗View D2 source
Synthwave City​
TALA · positioned with top / leftD2 + icons ↓Open SVG ↗View D2 source
Batch 3: Partial positioning​
The Printing Room​
TALA · 4 pinned nodes / 10 automatic nodesD2 + icons ↓Open SVG ↗Pinned: The four CMYK stations share a fixed top coordinate and equally spaced left coordinates so the print sequence retains its mechanical alignment.Automatic: TALA positions the feeder, camera, registration controller, dryer, prepress and finishing steps; none has top or left.See the positioning declarationsView D2 source
MULE / Utility Rover​
TALA · 4 pinned nodes / 11 automatic nodesD2 + icons ↓Open SVG ↗Pinned: The four motor assemblies are fixed at the front and rear corners of the chassis rectangle.Automatic: TALA places every controller, sensor, power and safety node between or around those corners and arranges the unpositioned fleet container.See the positioning declarationsView D2 source
Sources and rendering detailsThe seven layout comparisons use public project diagrams from D2's
real-world fixtures.
Each comparison uses the same D2 source and the same compiler build, changing
only the layout engine. Source styles, themes, and explicit grid constraints
are preserved. Some fixture icons were already replaced with built-in shapes.SVGs are scaled independently to fit each panel. Use Open SVG to inspect
labels and connections at a larger size.Source provenance and licenses ·Render settings and revisionsThe eleven positioning examples are original, fictional compositions rendered with
TALA using the same public D2 build. Icon downloads include the full source and local
vector assets. The two partial-positioning examples apply top/left only to their
listed pinned nodes; all other nodes and every container are automatically placed.Positioning render settings.Older postD2 is non-profitContentsBatch 1: ComparisonsFulcro RAD architectureMocha secure-enclave SoCJupyter on AWS EKSLion Reader frontend data flowROSS rotor-dynamics workflowGo Queue worker architectureOuroboros Leios simulatorBatch 2: Custom positioningSignal HouseAtlas / Data platformNight shift / Mission controlFriday deploy: the escape roomThe Internet is a jellyfishOrbital coffee logisticsCloud ConservatoryVelvet RopeSynthwave CityBatch 3: Partial positioningThe Printing RoomMULE / Utility RoverD2 is an independent open-source project fiscally sponsored by Hack Club.DonateGitHubDiscordTourBlogExamplesReleasesPlayground

TALA, or Terrastruct's AutoLayout Algorithm, is an open-source algorithm introduced as a novel method for creating software architecture diagrams, specifically designed with software architecture diagrams in mind. It functions primarily as an orthogonal layout engine, which aligns better with the intuitive structure found on whiteboards, contrasting with algorithms like Dagre and ELK that often focus on Directed Acyclic Graphs (DAGs) where growth is unidirectional. TALA achieves aesthetic diagram results by integrating concepts from various graph-drawing research papers alongside original techniques, incorporating multiple aesthetic objectives such as symmetry, median distance, flow, and clustering of similar nodes.

The application of TALA is demonstrated through several practical examples comparing its performance against established layout algorithms. In the first batch of comparisons, TALA was evaluated against Dagre and ELK across diverse public project diagrams, including those for Fulcro RAD architecture, Mocha secure-enclave SoC, Jupyter on AWS EKS, Lion Reader frontend data flow, ROS rotor-dynamics workflow, and Go Queue worker architecture. This comparison highlights TALA's capacity to produce visually pleasing layouts in real-world scenarios.

A unique capability of TALA is its ability to allow for customization of node positions and sizes, such as locking specific coordinates. This feature makes it particularly advantageous for agentic use cases where models need to draw accurately within a two-dimensional space while still benefitting from TALA’s effective handling of routing. Furthermore, TALA supports hybrid layout strategies, allowing users to specify coordinates for some nodes while permitting the layout engine to automatically position others. This capability is illustrated in the third batch of examples, such as The Printing Room and MULE / Utility Rover, where a subset of nodes is pinned with fixed coordinates, allowing TALA to manage the positioning of the remaining components automatically.

Despite its aesthetic strengths, TALA possesses certain trade-offs that are important for advanced users to consider. The algorithm incorporates inherent randomness; it determines the best layout by testing multiple seeds and selecting the optimal result. This means that while the same input yields the same layout with the same seeds, adding a single node can result in a substantially different arrangement compared to algorithms like Dagre or ELK, which tend to accommodate new nodes more predictably within flowing graph structures. Additionally, TALA may require longer computation times when scaling up to larger diagrams, exhibiting non-linear runtime performance.

TALA is made accessible through the D2 framework, being bundled in version 0.9.0, and can be experimented with directly through the playground environment or by specifying the layout engine via the command line interface. The project receives significant contributions from Gavin Nishizawa and Júlio César Batista, who have advanced work on TALA and related hierarchy algorithms respectively.