# David Khourshid > David Khourshid (@DavidKPiano) is the creator of XState and founder of Stately. He offers private team workshops (from $9,500), keynotes (from $10,000), architecture advisory (from $750/hour) and self-serve courses on state machines, statecharts, React state management and reliable AI agents. Bookings: david@stately.ai. ## Key pages - [Home](https://davidk.dev/): positioning, proof and services ([markdown](https://davidk.dev/index.md)) - [Workshops for teams](https://davidk.dev/workshops/): curricula, formats and starting prices ([markdown](https://davidk.dev/workshops.md)) - [Speaking](https://davidk.dev/speaking/): keynote topics, fees and speaker terms ([markdown](https://davidk.dev/speaking.md)) - [Advisory](https://davidk.dev/advisory/): consulting, reviews and retainers ([markdown](https://davidk.dev/advisory.md)) - [Learn](https://davidk.dev/learn/): public workshops, courses, 1:1 calls ([markdown](https://davidk.dev/learn.md)) - [About](https://davidk.dev/about/): bio, timeline and sourced facts ([markdown](https://davidk.dev/about.md)) - [Engagement terms](https://davidk.dev/terms/): deposit, cancellation, travel, recording - [Contact & booking](https://davidk.dev/contact/) ## Talks (119 recordings, each with transcript; markdown at /talks/.md) - [Human Approval for AI Agents](https://davidk.dev/talks/human-approval-for-ai-agents/) (Interview, Agent Conf 2026 (Warsaw), studio interview, 2026, 11:17). Topics: State machines, AI agents & LLMs, XState, Visual modeling. An agent can draft an email, but sending it should wait for approval. David Khourshid, Founder of Stately and Creator of XState, explains how he models… - [Goodbye Slop; Welcome Determinism](https://davidk.dev/talks/goodbye-slop-welcome-determinism/) (Conference talk, Agent Conf 2026 (Warsaw), 2026, 21:17). Topics: AI agents & LLMs, State machines. Agent rules hidden inside a long prompt become harder to inspect, test, and trust as the context grows. David Khourshid shows how explicit state… - [Effective State Machines with XState](https://davidk.dev/talks/effective-state-machines-with-xstate/) (Conference talk, Effect Miami 2 (meetup), 2026, 29:40). Topics: XState, Side effects, Effect (TypeScript), State machines. Really, I'm going to be talking about two higher level things, effect and XState, and how the combination of them is actually really important. In this… - [Goodbye Slop; Welcome Determinism (Beyond the Prompt)](https://davidk.dev/talks/goodbye-slop-welcome-determinism-beyond-the-prompt/) (Conference talk, Beyond the Prompt 2026 (AG Grid & Bryntum, London), 2026, 30:27). Topics: AI agents & LLMs, State machines, XState. This talk was a part of Beyond the Prompt conference, hosted by @agGrid and @Bryntum in London in 2026. - [The Piano Man of State Machines](https://davidk.dev/talks/the-piano-man-of-state-machines/) (Podcast, Whiskey Web and Whatnot podcast, 2025, 59:17). Topics: State machines, AI agents & LLMs, React hooks. This week, Robbie and Adam talk with David K. Piano about state machines, the chaos of overusing React hooks, Tailwind controversies, AI agents… - [Time Traveling with AI: A Musical Journey](https://davidk.dev/talks/time-traveling-with-ai-a-musical-journey/) (Conference talk, Algolia DevBit 2025, 2025, 16:00). Topics: AI agents & LLMs, XState. What might be the future of UX? Explore one possible timeline with David Khourshid and Stephen Shaw, from the @keyframers web animation streaming… - [useState Is Over](https://davidk.dev/talks/usestate-is-over/) (Podcast, PodRocket (LogRocket podcast), 2025, 42:01). Topics: React hooks, State management, React. David Khourshid, founder of Stately.ai, joins us to discuss better ways to manage complex state in React applications. We explore: - [Goodbye, useState (PodRocket, alternate cut)](https://davidk.dev/talks/goodbye-usestate-podrocket-alternate-cut/) (Podcast, PodRocket (LogRocket podcast), 2025, 36:55). Topics: React hooks, State management, React. David Khourshid, founder of Stately.ai, joins us to discuss better ways to manage complex state in React applications. We explore the pitfalls of… - [State Management at Scale in React & Next.js](https://davidk.dev/talks/state-management-at-scale-in-react-next-js/) (Course preview, Frontend Masters course preview, State Management at Scale in React & Next.js, 2025, 14:56). Topics: React, State management, React hooks, TypeScript. We could just select the hotel id, which is a string, change this to the hotel id and then we could apply our first pattern which is deriving that… - [XState Creator: State Machines & Startups](https://davidk.dev/talks/xstate-creator-state-machines-startups/) (Podcast, Frontend Masters Podcast #25, 2025, 28:49). Topics: Startups & open source, State machines, XState, Visual modeling, CSS & animation. In this episode, David Khourshid, creator of XState, shares his journey from piano performance to programming, revealing key lessons for developers and… - [Goodbye, useState (JavaScriptMN)](https://davidk.dev/talks/goodbye-usestate-javascriptmn/) (Conference talk, JavaScriptMN meetup (June 2025), 2025, 34:30). Topics: React hooks, State management, React, XState. We are so hyped to have David Khourshid (known as David K around the internet) stop by the JSMN stage on June 4, 2025. - [Goodbye, useState](https://davidk.dev/talks/goodbye-usestate/) (Conference talk, G2i, 2025, 23:58). Topics: React hooks, State management, React, Forms & UX, XState. State management is easy, until it's not. Sure, useState() is fine for simple component state management – that's literally what it's for. But… (G2i, 2025) - [Stop Drawing Pointless Arrows: Taming Complexity with Diagrams](https://davidk.dev/talks/stop-drawing-pointless-arrows-taming-complexity-with-diagrams/) (Conference talk, YOW! Australia 2024, 2024, 45:37). Topics: Visual modeling, Actor model, Statecharts, State machines. This presentation was recorded at YOW! Australia 2024. #GOTOcon #YOW - [Making state management intelligent](https://davidk.dev/talks/making-state-management-intelligent/) (Conference talk, Craft Conference 2024, 2024, 42:26). Topics: AI agents & LLMs, Adaptive & intelligent UIs, State management, State machines. Managing state is complicated. Humans are even more complicated. As developers, it's our job to deliver seamless and intuitive user experiences, but… - [Goodbye, useState](https://davidk.dev/talks/goodbye-usestate-bejs/) (Conference talk, BeJS, 2025, 32:02). Topics: React hooks, State management, Forms & UX, React. State management is easy, until it's not. Sure, useState() is fine for simple component state management – that's literally what it's for… (BeJS, 2025) - [useWat](https://davidk.dev/talks/usewat/) (Conference talk, React Alicante 2024, 2024, 33:06). Topics: React, React hooks, State management. When you're trying to figure out if you could use Reacts without a framework, because we did that with create React app and it was really simple. React… - [The Actor Model, Behind the Scenes](https://davidk.dev/talks/the-actor-model-behind-the-scenes/) (Conference talk, JSConf, 2024, 32:42). Topics: Actor model, Event-driven architecture, AI agents & LLMs, XState, Visual modeling. Let's set the stage. You have a complicated application with many parts that need to work together, and you want to avoid making your code an… - [How State Machines Create Robust Software (Deep Dive)](https://davidk.dev/talks/how-state-machines-create-robust-software-deep-dive/) (Podcast, Tejas Kumar podcast, 2024, 1:33:47). Topics: State machines, XState, Adaptive & intelligent UIs, Statecharts, AI agents & LLMs, Actor model. XState Embraces two main things state machines and the actor model, and so with state machines. The original problems that XState solve are these… - [Effective state machines for complex logic (Effect Days 2024)](https://davidk.dev/talks/effective-state-machines-for-complex-logic-effect-days-2024/) (Conference talk, Effect Days 2024, 2024, 30:05). Topics: Effect (TypeScript), Side effects, Actor model, XState, State machines, Event-driven architecture. The reason we do this is because with state machines, you want events to have an effect only in certain states. The entire philosophy behind XState is… - [useWat² (with Jenny Truong)](https://davidk.dev/talks/usewat2-with-jenny-truong/) (Conference talk, React Miami 2024, 2024, 27:55). Topics: React, React hooks, State management. React has quite the history. From React.createComponent to server components, React has evolved to be a mainstay in web development. But let's be… - [Webinar: State Machines and Actors with XState v5](https://davidk.dev/talks/webinar-state-machines-and-actors-with-xstate-v5/) (Webinar, Stately webinar/stream, 2024, 2:42:16). Topics: Actor model, XState, State machines, Event-driven architecture. Learn how to manage and visualize application logic with state machines and actors with XState v5! In this webinar, we will be creating a real-world… - [From Pandemic Pastime to Real VC-Funded Startup](https://davidk.dev/talks/from-pandemic-pastime-to-real-vc-funded-startup/) (Podcast, The Work Item podcast (Den), 2024, 31:58). Topics: Startups & open source, XState. In this episode of The Work Item, I had a conversation with David Khourshid, founder of Stately.AI. You might know him as @DavidKPiano on social media… - [Frontend Feud: CSS Podcast vs @keyframers](https://davidk.dev/talks/frontend-feud-css-podcast-vs-keyframers/) (Podcast, JS Party Frontend Feud (Changelog), 2024, 51:04). Topics: CSS & animation. Una & Adam from The CSS Podcast ( defend their Frontend Feud title against challengers David & Shaw from the keyframers ( . Let’s get it on! - [X gon' State it to ya](https://davidk.dev/talks/x-gon-state-it-to-ya/) (Podcast, JS Party (Changelog), "X gon' State it to ya", 2024, 1:05:30). Topics: XState, Actor model, State machines, Event-driven architecture, Statecharts. Amal, KBall, and Nick welcome David Khourshid to the show to talk about his project, XState. XState brings state management to a new level using finite… - [Webinar: Get started with XState v5](https://davidk.dev/talks/webinar-get-started-with-xstate-v5/) (Webinar, Stately webinar, 2023, 1:13:11). Topics: XState, Actor model, TypeScript, Event-driven architecture. We are the Stately team and this is our very special XState version 5 webinar. Every actor has its behavior that could be controlled by a state machine. - [Founder to Founder: Stately AI](https://davidk.dev/talks/founder-to-founder-stately-ai/) (Podcast, Gun.io Founder to Founder podcast, Ep. 36, 2023, 28:53). Topics: Startups & open source, AI agents & LLMs, Visual modeling. This week, Teja talks with David Khourshid, Co-founder and CEO at Stately. This AI tool serves as a visual source of truth for creating, deploying, and… - [Make Your Apps Resilient Using Finite State Machines](https://davidk.dev/talks/make-your-apps-resilient-using-finite-state-machines/) (Podcast, Kent C. Dodds (Chats with Kent), 2023, 32:33). Topics: State machines, XState, State management, Statecharts, Model-based testing. In this episode, David Khourshid gives the rundown on how finite state machines can make your app more testable, more resilient to bugs, and easier to… - [Making State Management Intelligent (French Tech Front-end)](https://davidk.dev/talks/making-state-management-intelligent-french-tech-front-end/) (Conference talk, French Tech Front-end Meetups, 2023, 33:01). Topics: State management, Adaptive & intelligent UIs. (French Tech Front-end Meetups, 2023) - [Making state management intelligent](https://davidk.dev/talks/making-state-management-intelligent-react-alicante-2023/) (Conference talk, React Alicante 2023, 2023, 31:54). Topics: Adaptive & intelligent UIs, AI agents & LLMs, State management, State machines, XState. If Pac-Man eats a power pill, then the ghost actually goes to a different state, which is running away from Pac-Man. Reinforcement learning is exciting… - [Webinar: Create app logic with XState V5](https://davidk.dev/talks/webinar-create-app-logic-with-xstate-v5/) (Webinar, Stately webinar, 2023, 1:30:49). Topics: XState, Actor model, Forms & UX. Join us for an introduction to XState V5 with David Khourshid and Gavin Bauman. - [useWat](https://davidk.dev/talks/usewat-react-rally-2023/) (Conference talk, React Rally 2023, 2023, 32:41). Topics: React, React hooks, State management. We have a slight problem here, and that's that whenever the count updates, every single component is going to update with that count. React is a… - [The two ways to manage state](https://davidk.dev/talks/the-two-ways-to-manage-state/) (Conference talk, JSHeroes 2023, 2023, 27:53). Topics: State management, Actor model, Event-driven architecture. There are two kinds of state management libraries: easy and simple. Direct and indirect. Quick and maintainable. When you’re quickly prototyping apps… - [Making state management intelligent](https://davidk.dev/talks/making-state-management-intelligent-reactathon-2023/) (Conference talk, Reactathon 2023, 2023, 33:33). Topics: Adaptive & intelligent UIs, State management, AI agents & LLMs. Making state management intelligent Managing state is complicated. Humans are even more complicated. As developers, it's our job to deliver seamless… - [Panel: The Future of the World and AI](https://davidk.dev/talks/panel-the-future-of-the-world-and-ai/) (Panel, Agent Conf 2023, 2023, 25:58). Topics: AI agents & LLMs, Startups & open source. AgentConf 2023 hosts a captivating panel discussion featuring esteemed experts Tejas Kumar, David Khourshid, and Jani Eväkallio. The panelists engage… - [From AI to AGI: The path to generally intelligent software](https://davidk.dev/talks/from-ai-to-agi-the-path-to-generally-intelligent-software/) (Conference talk, Agent Conf 2023, 2023, 33:48). Topics: AI agents & LLMs, Adaptive & intelligent UIs. At AgentConf 2023, David Khourshid delivers a captivating talk titled "From AI to AGI: The Path to Generally Intelligent Software." With his expertise… - [Migrating to XState v5 beta webinar](https://davidk.dev/talks/migrating-to-xstate-v5-beta-webinar/) (Webinar, Stately webinar, 2023, 1:04:37). Topics: XState, Actor model, TypeScript. XState v5 beta is here! Join David and Laura to learn the steps needed to migrate to XState v5 beta, and we’ll answer any questions you have about XState. - [CSS Animations and Transitions](https://davidk.dev/talks/css-animations-and-transitions/) (Course preview, Frontend Masters course preview, CSS Animations and Transitions, 2023, 17:02). Topics: CSS & animation. We could add that same animation to the input and button, and let's see how that looks. Instead of doing animation duration times two or animation… - [Getting Started with XState in Angular & SolidJS](https://davidk.dev/talks/getting-started-with-xstate-in-angular-solidjs/) (Livestream, Build IT Better S01E06 (This Dot Media), 2023, 30:47). Topics: XState, Visual modeling. Build IT Better is back with Tracy Lee and Ben Lesh, featuring David Khourshid from XState and Stately! David will be sharing the challenges in… - [Adiós, useEffect: Managing Effects More Effectively](https://davidk.dev/talks/adios-useeffect-managing-effects-more-effectively/) (Conference talk, React Alicante 2022, 2022, 42:29). Topics: React hooks, Side effects, React, Event-driven architecture. If we add some things to the dependency array, and so whenever those things change, then our effects that we use to putting a component did update, go… - [Coding Complex App Logic, Visually](https://davidk.dev/talks/coding-complex-app-logic-visually/) (Conference talk, Øredev 2022, 2022, 39:53). Topics: Visual modeling, State machines, Event-driven architecture. Session description: What if you could code without coding? As the number of features and requirements increase in our apps, text-based logic becomes… ## Optional - [Full talk index and all page content](https://davidk.dev/llms-full.txt) - [RSS feed of talks](https://davidk.dev/rss.xml) - [Sitemap](https://davidk.dev/sitemap-index.xml)