Loading video...
Video Failed to Load
I am hooked on Dynamic Workflows! The idea of generating harnesses on the fly is so compelling that I reverse-engineered it for my agent orchestrator. And then I built a monitoring dashboard (as an HTML artifact) to track tasks, metrics, and reports. I can now use and monitor dynamic... show more
104,085 views • 3 months ago •via X (Twitter)
44 Comments

During the process of reverse-engineering dynamic workflows for my agent orchestrator (what you see in the clip), it suddenly hit me how important it is to own the orchestrator and harness. This might be the first instance/proof, as far as I know, of dynamic workflows effectively working outside the Claude Code ecosystem. I believe Codex and other coding agents will soon realize that this primitive (like agent skills) needs to live in their ecosystem as well. I don't need to wait for them. I have tested it with my version of dynamic workflows, and Codex works great with this. Pi also works amazingly well. But what you see on the clip is an experimental nano-like (@karpathy style) coding agent I built for @dair_ai. This means that even the simplest of agents can leverage this primitive.

This is too good to keep to myself. I will be sharing more on how I am using dynamic workflows and how and why I built my own version of it:

It's been very useful for data quality checks too, where you can spin up one agent per task / data point and get a very fine-grained investigation on the data. Without the workflows, models tend to look at 3/4 samples and overfit their conclusions on those samples

Oooh, I like this one. Haven't tested on data-intensive use cases besides basic data synthesis for fine-tuning small models, but data quality checks and deep analysis feel like a perfect fit.

Try - harness in

The on-the-fly harness gen is the part that clicked for me too. Static graphs feel rigid once an orchestrator can scaffold itself per task. The monitoring layer is the underrated half though - dynamic workflows are hard to trust without it.

As I started to go deep into dynamic workflows, I instantly felt the need to have a live monitoring dashboard to monitor costs and reliability, including results as well. Not sure if Claude Code supports this natively, but I built my own version of dynamic workflows in my orchestrator, so it was easy to build a tracker for it.

🔥🔥🔥 I use my own version of this as well that is a fork of Pi and a solid workflow engine makes a huge difference where I don't manually prompt really and have reliability. I think you're absolutely right that other providers will add this as a primitive. I think the models themselves will also learn how to use and design these workflows better over time as tools.

this is awesome! I built something similar - callstack. check it out!

Dynamic workflows get much more interesting when the harness measures decision quality,not just task completion.

I'm curious to know how dynamic workflows prevent agents from working in the "dumb zone". If that's not the case, how can we be sure of the quality of the results?

Good question and a very important one. I think dynamic workflows could help answer a lot of reliability questions around agents. Human-in-the-loop with continual learning built into dynamic workflows would only improve how this all works, but those are unsolved problems as it stands. Early days IMO.

So far, I can't see the advantages of dynamic workflows without proper context control. Maybe if hooks could integrate some controllability. Nowadays, I can achieve much better and cheaper results by carefully orchestrating IFK agents.

Strong signal of where agent systems are heading. Adaptive orchestration with built in branching, verification, and parallel execution.

What are dynamic workflows? Is there a scientific paper that you can reference here?

I share your excitement. This feels like it addresses a lot of the frustration around probabilistic procedural tasks, where we kept banging our heads against the half-statefulness of .md files and context-based state tracking. Less “LLMs emulating applications and occasionally copping out.” More “just-in-time applications harnessing LLMs.” The exciting part is whether we can take this beyond dev-only workflows and turn it into an app-building primitive. Generative BE? I feel we might be missing the bigger trick here. Been writing some ideas in this direction:

Now that you have seen the power of it, you should perhaps consider building a "Prompt to DAG" workflow generator yourself. Give a prompt - convert it to a DAG workflow. It should have the following features: 1. Clear separation between deterministic and stochastic stages. 2. Typed input/output at each stage. 3. Declarative definition as JSON. 4. Ability to visualize the DAG. 5. Ability to visualize DAG runs with the input/output of each stage. 6. Ability to control the DAG workflow step by step. 7. Ability to rerun specific stages if you want. 8. Ability to improve the DAG on the fly. 9. Control the level of parallelism as needed. 10. Choose the model of your choice at each stochastic stage. I built a solution for hatching out complex workflows like these. Here is a portion of my "codebase-to-tutorial" workflow. The blues are deterministic in nature and skip the LLM completely. The oranges are the stochastic stages. The whole DAG was auto-generated with a prompt and then refined via agent sessions. If you want to see one of these in action, I build a DAG workflow for @karpathy's autoresearch project here: The repo has a hydrated workflow (declarative JSON converted to a script with the complete orchestrator) in the "workflows" directory.

generating the harness on the fly is the part that feels like magic. static pipelines assume you know the steps; dynamic ones let the agent discover them. the reusable-skill version of this is where the real leverage compounds.

looks like a waste of tokens

Generating harnesses on the fly is the unlock - the agent reasons about its own path, not a fixed graph. The catch is observability: dynamic workflows need a self-eval loop or they go blind. Built something similar:

Here are some of the feature pages I have so far;

This is the practical unlock....dynamic workflows are not just branching agent plans, they become reliable when each branch has observable state, verification checkpoints, artifacts, and clear recovery paths.

Where can I learn to do this that you did? Thanks.

Which part exactly? I am thinking of doing a live session showing all of this in action if there is enough interest.

@haomaru691751 Yessir! I been using dynamic workflows but not sure if it’s optimal. LLM council and workflow harness routing is what I have been using it for so far, it’s my default prompt and direct the most appropriate harness given the task but make fast mode a must

@haomaru691751 Cool. I built my own version of dynamic workflows to use with my own coding agent and cheaper models like deepseek-v4-flash and pro. It works amazingly well.

Great work Could you please conduct free session in

Yes. Find it here:

Dynamic harnesses are the part that changes the loop. The dashboard matters because it turns agent work into something you can debug instead of admire.

How token-hungry is your workflow?

i worry less about this now as i am using cheaper models like deepseek-v4

Very informative interesting work! ✅

This is basically why I’m leaning more toward tasks, dashboards, and workflow runs than another chat interface. Agent work needs more observability and less magic.

The subtle part is that a harness generated on the fly breaks the fixed schema monitoring usually leans on. Every run can have a different shape, so you have to record which harness was actually produced, not just the metrics. Without that, a failed run is impossible to reproduce.

How do you visualize the 'orchestration graph' of these dynamic workflows, when you have multiple tasks branching and merging?

The harness is the product.

Hey Elvis. You just convinced me to adopt this. I was wondering if you found your orchestrator too bossy? I have to tell mine to be more inquisitive than commanding because he is not always fully aware of the other agents' progress. THANKS!

The whole dynamic workflows concept and generating the harness on the fly has me hooked. In my case, I have been playing a lot with Hermes lately and it feels like it approaches this from a different but complementary angle. While this dynamic workflows are great at building the full structure dynamically for each task, Hermes is more about automatically creating reusable skills and improving them over time with a persistent learning loop. Kind of like one is the brilliant architect that figures out the perfect plan each time, and the other is the experienced employee that keeps getting better and remembers everything. Have you tried combining the two at all? Seems like it could be a really strong combo. Nice work!

the monitoring dashboard becoming the whole job in 48 hours tracks. generated harnesses without observability is just expensive chaos.

Static workflows break on unexpected inputs. Generating the harness at runtime lets the agent adapt as it discovers new information mid-run. The monitoring layer you built on top is exactly what most people skip until they're debugging in production.

What do you consider to be your harness here? Seems pretty nice!

Do you use these for one-offs/building components/equivant to goal or repeatable workflows?

@threadreaderapp unroll

Instead of asking for the answer, instead tell it to write the agentic orchestration to make the answer, and then curate the final answer. Bam. There is your "dynamic" workflow, and you're left with the harness too. ;)
