I help teams with complex apps get the logic right.
I’m David Khourshid, creator of XState and founder of Stately. Code is cheap now; correct behavior in a complex app is not. I teach and advise on statecharts, React state at scale and reliable AI agents, so engineers and agents build on the same explicit model.
Remote or on-site, anywhere. I reply within two business days.
TRAINTeam workshopsRemote or on-siteSPEAKKeynotesSummits and conferencesADVISEAdvisoryReviews and retainers
- 30K+
- GitHub stars on XState
- 3M+
- XState npm downloads per week
- 92.6K
- followers on X
- 37,790
- hours of his Frontend Masters courses watched
- 140+
- talks, workshops and podcasts since 2015
Engineers at these companies ship with XState
What do I add that a model doesn’t?
Three things I bring that more tokens won’t.
Explicit state, so impossible states can’t ship
A model writes the happy path and a plausible version of everything else. Four booleans still make sixteen states, and the spinner-and-error-at-once bug still reaches production; it just gets there faster. I make the states explicit, so the eleven you never meant are unrepresentable instead of “unlikely”.
A spec an agent can’t misread
Hand an agent a paragraph and it guesses. Hand it a statechart and it implements exactly that flow, and the tests fall out of the same model. I help teams write the kind of spec that makes AI output verifiable, for UI flows and for the agents themselves.
A decade of the same ten logic bugs
Checkouts, editors, real-time collaboration, onboarding, workflow engines and now agent loops. I’ve modeled them with teams from two-person startups to the ones using XState at Netflix, Microsoft and AWS. Pattern recognition from a decade of production systems is not something a context window replaces.
How can we work together?
Parallel regions: many teams are in all three at once.
Team workshops
Private, hands-on training on XState, statecharts, React state and AI agents. Remote from $9,500, on-site from $20,000.
See curricula and pricesKeynotes
For engineering summits, all-hands and conferences. 140+ talks since 2015. Corporate keynotes from $15,000.
See talks and feesAdvisory
Architecture reviews, retainers and expert hours for teams whose product logic has outgrown prompts and booleans. From $750 an hour.
See advisory optionsOn your own budget? Public workshops, courses and 1:1 calls start at $99.
What does it cost?
Prices in USD. These are minimums; on-site work adds travel. Each service page has the full list.
| Offer | Includes | Price (USD) | Details |
|---|---|---|---|
| Remote half day | Up to 20 engineers. Additional seats $300/person. | from $9,500up to 4 hours | All workshop prices |
| On-site, 1 day | Up to 25 engineers. Additional seats $600/person. | from $20,000+ travel | All workshop prices |
| Corporate keynote, in person | Company all-hands, engineering summits, customer events. Includes a 30-minute prep call. | from $15,000+ travel | All speaking fees |
| Conference keynote, in person | Commercial conferences. Opening/closing keynote slot. | from $10,000+ travel | All speaking fees |
| Expert hour | 60-minute minimum. Architecture questions, code walkthroughs, second opinions. | $750per hour, prepaid | All advisory options |
| Architecture review | Deep review of your state architecture. Written report with prioritized recommendations. | from $15,000fixed scope, ~2 weeks | All advisory options |
Individuals: public workshops, courses and 1:1 calls from $99. Deposit, cancellation and recording rules: engagement terms.
What engineers say about XState
“We’ve been using XState for our new payments product. Shout out to the team that is making designing complex front-end flows a dream.”
“We use XState to implement business workflows as statecharts. The visualizer helps us collaborate more closely with customers, the ability to externalize workflows as JSON configuration makes complex workflow changes surprisingly simple to roll out, and test case generation makes it easier than ever to move forward with confidence.”
“XState naturally separates the logic and makes it simple to mock out API calls, so it’s easier to test the code and organize it!”
Who is David Khourshid?
David Khourshid (@DavidKPiano) is a software engineer in Orlando, Florida, the creator of XState and the founder of Stately. Before Stately he worked at Microsoft on Visual Studio Live Share (2017 to 2021).
XState had 30,324 GitHub stars and 3,057,973 npm downloads in the week of October 10 to 16, 2026 (npm). His five Frontend Masters courses have been watched for 37,790 hours, and his 119 recorded talks and streams have about 1.36 million YouTube views.
And yes, the “Piano” is real. He was a pianist before he was a programmer.
Where is he speaking next?
- CityJS Athens
Oct 22, 2026. Workshop: Graph Engineering: Making State-Machine Powered Agents - React Summit US & AI Coding Summit NYC
Nov 16–19, 2026. Cloning Full-Stack Apps with AI: What It Really Takes - React Day Berlin
2026. Goodbye Slop; Welcome Determinism
Which talks should you watch first?
These are the ones teams send me after watching. All 119 recordings have transcripts and chapters.
-
Goodbye, useEffect
React Brussels 2022. 29:58, 516.1K views -
Goodbye, useState
G2i, 2025. 23:58, 50.8K views -
Goodbye Slop; Welcome Determinism
Agent Conf 2026 (Warsaw). 21:17, 97.1K views -
Stop Drawing Pointless Arrows: Taming Complexity with Diagrams
YOW! Australia 2024. 45:37, 4.3K views -
Infinitely Better UIs with Finite Automata
React Rally 2017. 25:33, 56.8K views