xstate
AGENTS.md30k starsChanged 21 months agoMITView on GitHub
This is a monorepo containing XState, @xstate/store, and related packages.
Trending
Less talk lately.about the whole repository
Who's talking about statelyai/xstate
- Stately“React & XState Tutorial #1 - Intro and setup”YouTube · Apr 20, 2022 · 26k views
- Stately“React & XState Tutorial #2 - Building our first machine”YouTube · Apr 20, 2022 · 17k views
- Stately“React & XState Tutorial #3 - The visual editor”YouTube · Apr 20, 2022 · 14k views
- Stately“React & XState Tutorial #4 - Event types and typegen”YouTube · Apr 20, 2022 · 13k views
- Stately“React & XState Tutorial #5 - Services, onDone and onError”YouTube · Apr 20, 2022 · 12k views
The biggest 5 of 68 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 68
Talked about on GitHub, YouTube, Hacker News, Bluesky and Stack Overflow (68 times).
On GitHub · 38
- Aug 12, 2023Bug: — statelyai/docs6 reactions
- Jun 22, 2026chore(deps): Bump xstate from 5.30.0 to 5.32.4 — Hardonian/Keys3 reactions · 5 comments
- Oct 11, 2021Add support for inspecting via websocket — statelyai/xstate-viz3 reactions · 4 comments
- Aug 31, 2021This repo is outdated and should be removed in favor of new example location — davidkpiano/xstate-todomvc3 reactions
- Jun 18, 2026build(deps): bump xstate from 5.31.1 to 5.32.1 — Timothy191/Arch-System2 reactions · 1 comment
33 more on GitHub
- Sep 25, 2024Inspector and parent window freeze when attempting to serialize an HTML element — statelyai/inspect2 reactions · 5 comments
- Sep 27, 2021additional Testing with tests derived from xstate.core 4.25 — statelyai/xstate-pythonsays it tested it2 reactions · 12 comments
- Nov 6, 2026chore(deps): bump xstate from 5.32.6 to 5.33.3 in the xstate group — speakeasy-api/gram1 reaction · 1 comment
- Oct 30, 2026chore(deps): bump the minor-and-patch group across 1 directory with 18 updates — guyghost/dodash1 reaction
- Oct 26, 2026Bump the frontend group across 1 directory with 21 updates — glimpse-hq/Glimpse1 reaction · 2 comments
- Oct 25, 2026Support XState v6 behavioral graphs and preserve input/history identity — statelyai/graph1 reaction · 1 comment
- Oct 15, 2026chore(deps): bump the minor-and-patch group across 1 directory with 20 updates — guyghost/dodash1 reaction · 1 comment
- Sep 28, 2026chore(deps): bump the minor-and-patch group across 1 directory with 19 updates — guyghost/dodash1 reaction · 1 comment
- Sep 28, 2026chore(deps): Bump xstate from 5.32.6 to 5.33.2 — leynos/vibe-coder1 reaction · 1 comment
- Sep 2, 2026Bump xstate from 5.32.5 to 5.32.6 — leynos/vibe-coder1 reaction
- Aug 31, 2026Bump the frontend group with 6 updates — glimpse-hq/Glimpse1 reaction · 2 comments
- Jul 22, 2026Bump xstate from 5.32.4 to 5.32.5 — leynos/vibe-coder1 reaction
- Jul 20, 2026Bump the frontend group with 7 updates — glimpse-hq/Glimpse1 reaction · 2 comments
- Jul 13, 2026Bump the frontend group across 1 directory with 15 updates — glimpse-hq/Glimpse1 reaction · 2 comments
- Jul 10, 2026Bump xstate from 5.32.3 to 5.32.4 — leynos/vibe-coder1 reaction
- Jul 9, 2026Bump xstate from 5.32.2 to 5.32.3 — leynos/vibe-coder1 reaction
- Jul 6, 2026Bump the frontend group with 6 updates — glimpse-hq/Glimpse1 reaction · 2 comments
- Jul 6, 2026Bump xstate from 5.31.1 to 5.32.2 — leynos/vibe-coder1 reaction
- Apr 17, 2026Implement Epics 1-6: Scaffolding, Shared Types, Board Engine, Rulesets, State Machines, Room Management & Socket Layer — Trinityy2/discord-sudoku1 reaction
- Mar 30, 2026chore(deps): bump xstate from 5.29.0 to 5.30.0 in /client — arkanwolfshade/MythosMUD1 reaction · 1 comment
- Oct 22, 2024Fix fine-grained reactivity and nested actor support — NullVoxPopuli/ember-statechart-component1 reaction
- Dec 27, 2023Port xstate to Dart / Flutter — statelyai/feedback1 reaction
- Jul 6, 2023[XState Inspect] Bug: Inspector fails when there are raise actions in state definitions. — statelyai/xstate-viz1 reaction · 4 comments
- May 24, 2023Bug: [xstate/inspect] Send event dialogue does not send any events — statelyai/xstate-viz1 reaction · 4 comments
- May 11, 2023Document action groups — statelyai/docs1 reaction
- Apr 16, 2023Add `useDeclarationFileForTypegenData` option — statelyai/xstate-tools1 reaction · 2 comments
- Aug 30, 2022enable typegen for action groups — statelyai/xstate-tools1 reaction · 3 comments
- Jul 3, 2022stately-xstate.edit not found — statelyai/xstate-tools1 reaction · 1 comment
- Jun 8, 2022add `stateValues` to typegen output — statelyai/xstate-tools1 reaction · 4 comments
- May 27, 2022Testing with `xstate@5` — huan/mailboxsays it tested it1 reaction
- Mar 17, 2022Epic: Enable secure, friction-less & reproducible bug reports — npm/statusboard1 reaction · 3 comments
- Sep 19, 2026Visual State Machine Management — Sportinger/MasterSelects0 reactions · 2 comments
- Dec 3, 2021Track the Modeling Events of XState — wechaty/bot5-assistant0 reactions
On YouTube · 24
- Apr 20, 2022React & XState Tutorial #1 - Intro and setup — Stately26k views · 10 comments
- Apr 20, 2022React & XState Tutorial #2 - Building our first machine — Stately17k views · 5 comments
- Apr 20, 2022React & XState Tutorial #3 - The visual editor — Stately14k views · 7 comments
- Apr 20, 2022React & XState Tutorial #4 - Event types and typegen — Stately13k views · 7 comments
- Apr 20, 2022React & XState Tutorial #5 - Services, onDone and onError — Stately12k views · 7 comments
19 more on YouTube
- Apr 20, 2022React & XState Tutorial #6 - Context and assign — Stately9.8k views · 7 comments
- Apr 20, 2022React & XState Tutorial #7 - Hierarchical states — Stately8.8k views · 3 comments
- Apr 20, 2022React & XState Tutorial #8 - Adding a todo item — Stately5.9k views · 4 comments
- Apr 20, 2022React & XState Tutorial #11 - Adding if/else logic with guards — Stately5.5k views · 19 comments
- Apr 20, 2022React & XState Tutorial #9 - Deleting a todo item — Stately4.2k views · 1 comment
- Apr 20, 2022React & XState Tutorial #10 - Using after to manage timeouts — Stately3.8k views · 3 comments
- Mar 1, 2022Visually Create State Machines — CodeTV3.4k views
- Jan 23, 2024Backend workflows with Stately: Credit checking flow — Stately3.2k views · 16 comments
- Jan 11, 2024Building backend workflows with Stately: Media scanning — Stately3.2k views · 12 comments
- Jul 26, 2026Effective State Machines with XState | David Khourshid | Effect Miami 2 — Effect | TypeScript for the AI Era3k views · 6 comments
- Mar 11, 2023Intro to Stately and XState webinar — Stately2.1k views · 5 comments
- Jan 6, 2024Stately Office Hours January 5 2024 — Stately1.9k views · 2 comments
- Sep 9, 2022🤖 Finite State Machines with XSTATE & Svelte 🔴 LIVE Coding & Chill — Johnny Magrippis1.3k views · 5 comments
- Feb 17, 2024Stately Office Hours February 16 2024 — Stately777 views · 1 comment
- Jan 29, 2022Stately Office Hours January 28 2022 — Stately538 views · 3 comments
- Feb 4, 2023Stately Office Hours February 3 2023 — Stately257 views · 2 comments
- Mar 4, 2023Stately Office Hours March 3 2023 — Stately249 views · 1 comment
- Apr 23, 2022Stately Office Hours April 22 2021 — Stately187 views
- Apr 9, 2022Stately Office Hours April 8 2021 — Stately154 views · 1 comment
On Hacker News · 2
- Mar 27, 2023Xstate: State machines and statecharts for the modern web178 points · 77 comments
- Dec 22, 2024XState – State machines for state management in JavaScript29 points · 9 comments
On Bluesky · 2
- Dec 24, 2024deserves a star that is for sure github.com/statelyai/xs... — @handle.invalid1 likes and repost
- Dec 22, 2024XState – State machines for state management in JavaScript Discussion — @hn100.bsky.social1 likes and repost
On Stack Overflow · 2
- May 15, 2022Issue upgrading XState's Reddit sample from Vue 2 to Vue 30 votes
- Jul 20, 2022Using XState, how can I access name of current state in an action?-1 votes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,843 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repositoryOne other file it gives its agents.
- docs/agents.mdAGENTS.md
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 1 is distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 5
Use pnpm to install dependencies
- Very specific: line 9
Run pnpm test to run the tests in all packages, only for changes that affect mulitple packages.
- Very specific: line 10
Run pnpm test:core to only run core XState tests.
- Very specific: line 11
Run pnpm test:store to only run @xstate/store tests.
- Very specific: line 12
Run pnpm lint and pnpm format:check to check linting and formatting.
- Very specific: line 13
Run pnpm typecheck to make sure that there are no type errors.
- Very specific: line 14
Before making a PR, run pnpm changeset to create a changeset with a short description of the changes, and a code example if applicable.
- Very specific: line 20
When generated code reads an invoked actor's onDone.event.output, use s.createInvoke({ src, onDone }) or register the source in setup({ …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
This is a monorepo containing XState, @xstate/store, and related packages.
Dev environment
- Use pnpm to install dependencies
PR instructions
- Run
pnpm testto run the tests in all packages, only for changes that affect mulitple packages. - Run
pnpm test:coreto only run core XState tests. - Run
pnpm test:storeto only run @xstate/store tests. - Run
pnpm lintandpnpm format:checkto check linting and formatting. - Run
pnpm typecheckto make sure that there are no type errors. - Before making a PR, run
pnpm changesetto create a changeset with a short description of the changes, and a code example if applicable. Do not include implementation details; only pertinent details for developers using the package. - For every new feature or behavior change, audit the relevant docs and READMEs and fix missing or inaccurate guidance in the same PR.
XState v6 (alpha)
- v6 alpha syntax differs from v5 — do not assume v5 patterns (e.g.
{ onDone: { actions } }invoke config is wrong in v6). Verify against the current types/source inpackages/corebefore writing machine configs. - When generated code reads an invoked actor's
onDone.event.output, uses.createInvoke({ src, onDone })or register the source insetup({ actors }). A bare inline invoke cannot correlate the source with its output and may require narrowing. Seedocs/invoke.md. - In Vue examples that hold a machine in reactive state, use
shallowRef(machine)ormarkRaw(machine), especially beforerestoreActor(machine, persisted). Seepackages/xstate-vue/docs/input-and-snapshots.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

