This is something i vibecoded a few weeks ago. just a static prototype and doesn't work yet, but i keep thinking about it and might actually implement

Idea is that I would define a javascript DSL for coding agent state machines (e.g. "create 4 agents to all implement this task, then launch 2 reviewer, then have the reviewers argue, then choose one branch and make a pr"). maybe it would just be xstate (https://stately.ai/docs/xstate).

User would explain workflow they want in natural languages and a state machine workflow would be generated automatically. they could inspect it -- should be short like 100 LOC or less. Could ask for changes in natural language. They see a nice mermaid style diagram. Then they could launch it and the state machine runtime would orchestrate this workflow.

The state machine templates could be easily shared since they're just short text snippets

Reply to this note

Please Login to reply.

Discussion

πŸ‘€

Amazing!

I have a close friend doing this kind of interaction with Claude Code subagents but I haven't been able to replicate it. If it could be made more accessible that would be πŸ”₯

I imagine there are already dozens of agent services providing such capabilities

give me links

this is great and am surprised something is not already out there.

I'm gonna make a "woo" suggestion. In stages there are certain agent attributes you really want. i.e in hand-crafted json I might declare "creativity": 80%. In the coding phase commitment to security might be "defensibility": high. In the QA Agent rigour may be "adversarial": 50%

I watched Interstellar again last night and Cooper keeps adjusting Tars' humour settings (probably the only comic relief in the movie) - so agents need a disposition. Its easy to specify directly into the DSL but how you encourage humans to prompt that consistently might not be so easy. I guess if the workflow designer was conversational...

Nice ideas

btw I just saw langchain is still getting funding so might be good alternative plumbing to mcp or what nostr:nprofile1qy2hwumn8ghj7mn0wd68yetvd96x2uewdaexwqgkwaehxw309aex2mrp0yhxummnw3ezucnpdejqqgzqh8y9lll2lsw2m7xrpf89ezrxplmwf9c6phrj84dtva94ucd52ylppsfv is doing. https://www.youtube.com/watch?v=hjIlj4OAECQ

I was thinking about dropping something similar into wingman.

Less flexible just a set of coded flows that would design in a dialogue and run reviews of code but I like the state machine idea

So far each step in this orchestrator is defined by a simple declarative template file and then I was just going to call the next one in the file :)

But I quite like the state machine as the collection of templates agent activities.

Thanks for this post. You put xstate on my radar and it solves a big problem for me.

This is really great - can’t wait to see where it goes