Refactoring

Refactoring

🧵 Essays

How to Orchestrate AI Workflows

Navigating tradeoffs between pure AI and deterministic software

Luca Rossi's avatar
Luca Rossi
May 13, 2026
∙ Paid
Upgrade to paid to play voiceover

Hey, Luca here! Welcome to a 🔒 weekly essay 🔒 from Refactoring.

Every week I write an article about how to ship fast and make good software, and interview a world-class tech leader. I also build and maintain Tolaria in the open, publishing my workflows and learnings here.

Refactoring is read every week by 170,000+ engineers and managers from all over the world 🙏🙇‍♂️


Hey there! Last week’s article about my workflows for Tolaria went incredibly well, and I got a ton of replies and questions via email.

One of the most recurring ones was: what’s next? How would you improve this?

Happy to answer. I have been building AI workflows for a while now, and, for the most part, I have done so in “100% AI mode” — that is, I tell an agent to do something recurringly, in natural language, and they do it.

These workflows are fast to ship and *mostly* work, but also have pretty obvious drawbacks, that I would love to discuss today.

I believe this is relevant because these days we are inundated by stories like: “n8n is dead!”, “it’s all agents calling agents!”, and so on, while reality is more complicated.

I also bounced a lot of ideas off with the team at Kestra, who runs an awesome open source platform for orchestrating workflows. Their help came at the perfect time, and we basically wrote this piece together.

So here is the agenda:

  • 🧹 Cleaning up releases — starting from a real-world example.

  • ⚖️ AI vs Orchestration — mapping pros and cons of how to run workflows.

  • 🏗️ Agents as scaffolding — a useful mental model about going AI first, but gradually replacing it with code.

  • 🗺️ Workflow engineering journey — a maturity model for developing your workflows.

Let’s dive in!


Disclaimer: I am thankful to Kestra for partnering on this piece and providing ideas and insights about the orchestration industry. I am a fan of what they build and you should check it out:

Learn more about Kestra

However, as always I will only write my unbiased opinion on the practices and tools covered, Kestra included.


🧹 Cleaning up releases

To stay grounded and make you understand what I mean when I say workflows, let’s take a practical example. Whenever I create a new stable release for Tolaria, I have an automation to take care of the release’s aftermath.

This includes fetching all the bug fixes and feature requests that were shipped in the release, and update/close them in the respective channels, notifying the relevant users.

This is not rocket science by any means, but it involves a number of steps:

This post is for paid subscribers

Already a paid subscriber? Sign in
© 2026 Refactoring ETS · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture