Recent submissions

Comment · 3 months ago
Author here; still in alpha!
Comment · 5 months ago
Pretty cool. Looks like stately.ai but catered towards agentic state machine workflows. Really interesting!
Comment · 6 months ago
Comment · 6 months ago
I loved this talk!
Comment · 6 months ago
Comment · 6 months ago
Comment · 6 months ago
The next version of XState will be much more ergonomic, with a reduced API surface area, lower learning curve, and much easier for devs (and agents) to author.

But at the same time, frontier models are very good at writing XState.

Comment · 6 months ago
Statecharts are still getting some traction! XState has over 4 million weekly npm downloads. Animation tools like Rive & LottieFiles heavily advertise state machine capabilities. AI tools like LangGraph are built on state machine foundations.

It'll take some time for those apps/tools to realize the full potential of statecharts, but it's a good start.

Comment · 6 months ago
Glad to see statecharts still getting attention!

I created XState, a JS/TS library for authoring, executing, and visualizing state machines/statecharts: https://github.com/statelyai/xstate

I've been working on it for 10+ years. The main thing I've learned is that statecharts are most valuable when they're treated as executable behavior, not just documentation.

That doesn't mean you need to use them everywhere or model everything with them. They're most useful when you have behavior where the answer to "what happens next?" depends on both the current state & the event. A statechart can act as an oracle for questions like: "Given I'm in this state, when this event happens, what is the next state, and what effects should run?"

I'm close to releasing an alpha of the next major version of XState, focused on better ergonomics, type safety, and composability, as well as a new visualizer/editor.

There's also an open-source basic statechart visualizer here: https://sketch.stately.ai

For the formal/spec side, SCXML is worth reading: https://www.w3.org/TR/scxml

Also worth reading the original paper by David Harel: https://www.weizmann.ac.il/math/harel/sites/math.harel/files...

Comment · 8 months ago
Really appreciate you using XState!
Comment · 8 months ago
Really cool! Love the XState-inspired API ;-)
Comment · 1 year ago
Re: atoms + learning curve, this is why XState Store exists, which supports both XState-style state updates and atoms: https://stately.ai/docs/xstate-store

I also like the approach of Svelte, and realize that sometimes a full state machine isn't needed. I don't think that atoms should be used everywhere, since updating state freely without guardrails just leads to disaster long-term.

Comment · 1 year ago
Thank you for the kind words! I somewhat agree that it is complicated and overly engineered for many applications that don't need all of the statechart features, and that it has a sizable learning curve.

I plan on greatly simplifying it for the next major version, mostly to be more idiomatic and flexible without sacrificing the state machine principles.

Comment · 2 years ago
Comment · 2 years ago
Hey thanks for linking, I'm still working on this and hope to have a beta release soon!

Stately Agent is a completely open-source library for creating (LLM) agents that adhere to state machines.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton