What AI features does Stately.ai offer?
Updated
Stately.ai uses AI as an assistant across the diagram-to-code workflow rather than as a standalone chatbot. According to the site, AI helps at each phase "with state machines to guide them, while humans use the visual editor to audit and enhance their work." You can generate flows to scaffold behavior, suggest variants, surface edge cases, and even write code. This suits teams that want to move from an idea to a working prototype quickly while keeping a human review step.
Where AI fits in the workflow
Stately describes AI as a helper at every stage, not a replacement for the visual editor. The intended division of labor is:
- AI generates — flows, behavior scaffolding, variants, edge cases, and code.
- Humans audit and enhance — using the drag-and-drop visual editor to review and improve what AI produces.
This matters because the diagram stays the source of truth. AI output lands in a format you can inspect visually, so you are not accepting generated code blind.
Specific AI-assisted capabilities
Based on the site's description, AI can:
- Generate flows to scaffold behavior — start from a prompt or idea and get an initial state machine or statechart structure.
- Suggest variants — offer alternative ways a flow could work.
- Turn up edge cases — surface scenarios you might not have considered.
- Write code — produce code based on the state machine.
- Support rapid prototyping and iteration — you can "rapidly prototype or gather requirements without worrying about technical details," then simulate the design to test and iterate.
A concrete example: you describe a checkout flow, AI scaffolds the states and transitions, you simulate it in the visual editor, and you adjust the edge cases it flagged before generating a React app from the diagram.
How AI connects to executable output
AI-generated work is not a dead end. The diagrams are executable and run on XState, an open-source library for orchestrating state in JavaScript and TypeScript apps. The site states there is no lock-in.
From a diagram you can:
- Generate a React app to jumpstart product development.
- Keep iterating visually with AI help, or dive into the code to extend the scaffolding.
- Generate tests automatically to keep coverage robust and up to date.
- Export generated code in JavaScript or TypeScript.
- Connect with GitHub to sync Stately with your codebase.
AI also works alongside non-XState code: Stately can automatically visualize Redux, Zustand, and other code, so you get the visual and AI benefits even without XState. An IDE extension brings Stately into VS Code.
What to check before relying on AI features
The site describes these capabilities at a product level, not with per-feature limits. Before committing:
- Confirm current availability and plan access on the Pricing page, since AI features may differ by tier.
- Verify the AI-to-code path for your framework — the site names React, Vue, Svelte, and other integrations, but test the one you use.
- Plan a human review step, which the site itself frames as part of the workflow: humans audit and enhance AI output.
If your goal is faster prototyping with a visual, reviewable source of truth, the AI features are aimed at exactly that. If you need fully autonomous code generation with no review, that is not how Stately presents the tool.