Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

don't use loops, design state machines

221,789 Aufrufe • vor 3 Monaten •via X (Twitter)

60 Kommentare

Profilbild von David
Davidvor 3 Monaten

do this today at

Profilbild von David K 🎹
David K 🎹vor 3 Monaten

What does the state machine for this example look like?

Profilbild von David
Davidvor 3 Monaten

My version actually don't use a full deterministic state machine, I want to keep the flexibility of AI with minimal guardrails:

Profilbild von Ilko Kacharov
Ilko Kacharovvor 3 Monaten

Hot take: it's not loops vs state machines, it's both. The state machine defines what "done" looks like; the loop is the engine that grinds until it gets there. No loop = agent stalls mid-task. No state machine = it loops forever toward nothing. Winners design both.

Profilbild von David
Davidvor 3 Monaten

Agreed, but that's not catchy and doesn't go viral 😂

Profilbild von Brian Via
Brian Viavor 3 Monaten

We’re inventing computer science from first principles

Profilbild von David
Davidvor 3 Monaten

😂 just slowly moving up the ladder of abstraction

Profilbild von David
Davidvor 3 Monaten

A loop is just a state machine with 2 states 😅

Profilbild von David
Davidvor 3 Monaten

😂

Profilbild von patark
patarkvor 3 Monaten

sir this is a kanban board /s

Profilbild von duet
duetvor 3 Monaten

🪩🪩🪩

Profilbild von Daniel
Danielvor 3 Monaten

🤯🤯🤯this looks insanely powerful! 2026 -- what a year 🚀🚀 reworking stack for 3rd time in 10 days 😵‍💫

Profilbild von David
Davidvor 3 Monaten

Give it a try at and tell me how it goes! Happy to give you some free credits :)

Profilbild von Jason Szesze
Jason Szeszevor 3 Monaten

Sweet @duetchat

Profilbild von David
Davidvor 3 Monaten

@duetchat Niceeeee

Profilbild von Mustafa Kirac
Mustafa Kiracvor 3 Monaten

It's n8n all over again 🤔

Profilbild von David
Davidvor 3 Monaten

Na, it's not a workflow engine actually, it's just the bare minimum guardrails. All workflow logic is done by agent / codegen

Profilbild von Sense Noped Out
Sense Noped Outvor 3 Monaten

this is what he meant. same same

Profilbild von David
Davidvor 3 Monaten

yup agreed. just adding a tangible example

Profilbild von Rob Schaper
Rob Schapervor 3 Monaten

State machines can be designed to run in a loop, they can also act like a DAG with an outcome certain. For example, you can have four state machines in a loop, made of four DAGs, each run updates an S3 bucket, which has a trigger to run the next state machine, etc... Cheers.

Profilbild von Relex Legal
Relex Legalvor 3 Monaten

Each state should be a loop until successfully state changed

Profilbild von David
Davidvor 3 Monaten

@relexyou Yup, our custom harness has this guarantee

Profilbild von Rick Wong
Rick Wongvor 3 Monaten

State machines and workflows are amazing, but do you think humans should spend time focusing on those, or do you see a trajectory where the models are advance enough to manage both of those internally? Older solutions like zapier/make.com/n8n were heavy on workflows/states, but many realized how adept the models are becoming at managing those things internally. If you look at the design of claude's /workflow, you'll see it is actually far from what most people consider "workflow" -- they leap frogged quite a few steps ahead.

Profilbild von Mek
Mekvor 3 Monaten

Claude Fable 5? Please add it to the platform as soon as possible.

Profilbild von David
Davidvor 3 Monaten

On it 🫡

Profilbild von David
Davidvor 3 Monaten

FYI: you may need to wait a bit for everyone's sandbox to get upgraded. If you're impatient, feel free to go into the files tab and click on "Reboot gateway". Just note that it'll terminate all currently running sessions if you do that.

Profilbild von Kenn
Kennvor 3 Monaten

Would love to give it a try

Profilbild von David
Davidvor 3 Monaten

Nice, sign up at and shoot me a DM if you want more free credits

Profilbild von Shaun Sheikh
Shaun Sheikhvor 3 Monaten

Very cool

Profilbild von David
Davidvor 3 Monaten

Thanks! Give it a try at :)

Profilbild von Enterprise Software Architecture
Enterprise Software Architecturevor 3 Monaten

👀 I’ve already ascended to recursive state-loop machines by design.

Profilbild von Will
Willvor 3 Monaten

Don't design state machines, build hyper structures

Profilbild von Farshad Taheri
Farshad Taherivor 3 Monaten

Yea, this been there for sometimes and not working plus too slow

Profilbild von David
Davidvor 3 Monaten

What do you mean?

Profilbild von Farshad Taheri
Farshad Taherivor 3 Monaten

Have you used it for any actual/real complex workflow?

Profilbild von D
Dvor 3 Monaten

how's duet make money? bulk token arb?

Profilbild von David
Davidvor 3 Monaten

we run our own inference stack for certain models

Profilbild von D
Dvor 3 Monaten

Ah yes, got it. Thx!

Profilbild von Manas
Manasvor 3 Monaten

Aight we are back to langgraph great 😭

Profilbild von David
Davidvor 3 Monaten

Very different, it's not a workflow engine

Profilbild von Felipe
Felipevor 3 Monaten

We have the same but we used coder and n8n to integrate with linear is Duet a platform by itself? Like, could linear, clickup or others platforms have the same features as u guys?

Profilbild von David
Davidvor 3 Monaten

Yup @duetchat is its own platform And it's fundamentally different than linear/clickup. In duet the kanban view is just treated as a way to visualize all your agents, as a user you don't actually interact with the cards, and that's by design The problem we are solving isn't better project management, but how can we deploy 00s of agents and actually track & steer them. Right now it's kanban, in 6 months maybe something else

Profilbild von Felipe
Felipevor 3 Monaten

@duetchat I see that, I mean we have the same, but "in-house implementation", linear is just because it's what we used before You can see we have the plan, plan approval, review approval etc... that u also have related states, on your kanban on the video Here it's using n8n for the flow

Profilbild von Felipe
Felipevor 3 Monaten

@duetchat U guys don't see your product "benefiting" from being something that can integrate with a existing linear/clickup/jira etc...? Like, stack can integrate with your codebase, but also be seen from clickup if you do something with n8n as well; Like "integrate Duet" on your workflow

Profilbild von Aleksandr Fulha
Aleksandr Fulhavor 3 Monaten

state machines ARE loops with transition contracts. paperclip handoff: each agent's exit state is typed, next agent's entry matched. break-on-mismatch instead of run-on-pattern. the loop still runs — the contract just keeps it honest about what it's passing forward.

Profilbild von Scott Evernden
Scott Everndenvor 3 Monaten

tomorrow .. "we learn about arrays"

Profilbild von David
Davidvor 3 Monaten

😂😂

Profilbild von Duncan
Duncanvor 3 Monaten

Excellent callout :)

Profilbild von SurfboardRSS
SurfboardRSSvor 3 Monaten

This is the way

Profilbild von kreo
kreovor 3 Monaten

i like your thinking young man

Profilbild von David
Davidvor 3 Monaten

🫡

Profilbild von 0xA
0xAvor 3 Monaten

Don’t use state machines. Design coinductive coalgebras over Cartesian closed categories.

Profilbild von SAWC || CS STUDENT
SAWC || CS STUDENTvor 3 Monaten

What does this entail?

Profilbild von David
Davidvor 3 Monaten

just sign up for @duetchat -

Profilbild von Michael Gustin
Michael Gustinvor 3 Monaten

What the fuck does that mean Kobe Bryant

Profilbild von David
Davidvor 3 Monaten

are you the same animal but a different beast?

Profilbild von Walter Monecke
Walter Moneckevor 3 Monaten

this looks amazing!

Profilbild von Divya Soni
Divya Sonivor 3 Monaten

Making probabilistic machines deterministic. We've come a full circle here

Profilbild von David
Davidvor 3 Monaten

Deterministic orchestration probabilistic execution Also - my state machine implementation isn't fully deterministic. Guardrail only enforces correct states, orchestrator agent can transition to any state it wants

Profilbild von Eray
Erayvor 3 Monaten

don’t use loops. design a fault-tolerant replicated giant atomic state machine. @toly

Ähnliche Videos