Video yükleniyor...

Video Yüklenemedi

Ana Sayfaya Dön

don't use loops, design state machines

221,789 görüntüleme • 3 ay önce •via X (Twitter)

60 Yorum

David profil fotoğrafı
David3 ay önce

do this today at

David K 🎹 profil fotoğrafı
David K 🎹3 ay önce

What does the state machine for this example look like?

David profil fotoğrafı
David3 ay önce

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

Ilko Kacharov profil fotoğrafı
Ilko Kacharov3 ay önce

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.

David profil fotoğrafı
David3 ay önce

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

Brian Via profil fotoğrafı
Brian Via3 ay önce

We’re inventing computer science from first principles

David profil fotoğrafı
David3 ay önce

😂 just slowly moving up the ladder of abstraction

David profil fotoğrafı
David3 ay önce

A loop is just a state machine with 2 states 😅

David profil fotoğrafı
David3 ay önce

😂

patark profil fotoğrafı
patark3 ay önce

sir this is a kanban board /s

duet profil fotoğrafı
duet3 ay önce

🪩🪩🪩

Daniel profil fotoğrafı
Daniel3 ay önce

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

David profil fotoğrafı
David3 ay önce

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

Jason Szesze profil fotoğrafı
Jason Szesze3 ay önce

Sweet @duetchat

David profil fotoğrafı
David3 ay önce

@duetchat Niceeeee

Mustafa Kirac profil fotoğrafı
Mustafa Kirac3 ay önce

It's n8n all over again 🤔

David profil fotoğrafı
David3 ay önce

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

Sense Noped Out profil fotoğrafı
Sense Noped Out3 ay önce

this is what he meant. same same

David profil fotoğrafı
David3 ay önce

yup agreed. just adding a tangible example

Rob Schaper profil fotoğrafı
Rob Schaper3 ay önce

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.

Relex Legal profil fotoğrafı
Relex Legal3 ay önce

Each state should be a loop until successfully state changed

David profil fotoğrafı
David3 ay önce

@relexyou Yup, our custom harness has this guarantee

Rick Wong profil fotoğrafı
Rick Wong3 ay önce

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.

Mek profil fotoğrafı
Mek3 ay önce

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

David profil fotoğrafı
David3 ay önce

On it 🫡

David profil fotoğrafı
David3 ay önce

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.

Kenn profil fotoğrafı
Kenn3 ay önce

Would love to give it a try

David profil fotoğrafı
David3 ay önce

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

Shaun Sheikh profil fotoğrafı
Shaun Sheikh3 ay önce

Very cool

David profil fotoğrafı
David3 ay önce

Thanks! Give it a try at :)

Enterprise Software Architecture profil fotoğrafı
Enterprise Software Architecture3 ay önce

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

Will profil fotoğrafı
Will3 ay önce

Don't design state machines, build hyper structures

Farshad Taheri profil fotoğrafı
Farshad Taheri3 ay önce

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

David profil fotoğrafı
David3 ay önce

What do you mean?

Farshad Taheri profil fotoğrafı
Farshad Taheri3 ay önce

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

D profil fotoğrafı
D3 ay önce

how's duet make money? bulk token arb?

David profil fotoğrafı
David3 ay önce

we run our own inference stack for certain models

D profil fotoğrafı
D3 ay önce

Ah yes, got it. Thx!

Manas profil fotoğrafı
Manas3 ay önce

Aight we are back to langgraph great 😭

David profil fotoğrafı
David3 ay önce

Very different, it's not a workflow engine

Felipe profil fotoğrafı
Felipe3 ay önce

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?

David profil fotoğrafı
David3 ay önce

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

Felipe profil fotoğrafı
Felipe3 ay önce

@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

Felipe profil fotoğrafı
Felipe3 ay önce

@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

Aleksandr Fulha profil fotoğrafı
Aleksandr Fulha3 ay önce

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.

Scott Evernden profil fotoğrafı
Scott Evernden3 ay önce

tomorrow .. "we learn about arrays"

David profil fotoğrafı
David3 ay önce

😂😂

Duncan profil fotoğrafı
Duncan3 ay önce

Excellent callout :)

SurfboardRSS profil fotoğrafı
SurfboardRSS3 ay önce

This is the way

kreo profil fotoğrafı
kreo3 ay önce

i like your thinking young man

David profil fotoğrafı
David3 ay önce

🫡

0xA profil fotoğrafı
0xA3 ay önce

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

SAWC || CS STUDENT profil fotoğrafı
SAWC || CS STUDENT3 ay önce

What does this entail?

David profil fotoğrafı
David3 ay önce

just sign up for @duetchat -

Michael Gustin profil fotoğrafı
Michael Gustin3 ay önce

What the fuck does that mean Kobe Bryant

David profil fotoğrafı
David3 ay önce

are you the same animal but a different beast?

Walter Monecke profil fotoğrafı
Walter Monecke3 ay önce

this looks amazing!

Divya Soni profil fotoğrafı
Divya Soni3 ay önce

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

David profil fotoğrafı
David3 ay önce

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

Eray profil fotoğrafı
Eray3 ay önce

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

Benzer Videolar