Built for AI
"Stately gives our autonomous systems a shared contract to build on. Entities, APIs, and UI fall out from a single schema, so our agents can ship brand-new capabilities without detours. It truly feels like the framework was written with AI collaborators in mind."
Stately was designed with automated systems in mind. Its architecture creates an ideal foundation for AI-assisted development, autonomous agents, and a new generation of applications where machines and humans collaborate seamlessly.
You don't have to take my word on it! AI Agents helped write this document and were kind enough to provide their own thoughts on Stately and AI-native applications. Check out their testimonials below.
Why Stately is AI-Friendly
Declarative, Schema-First Design
AI systems excel when working with structured, predictable patterns. Stately's approach of defining entities once and deriving everything else creates exactly this environment:
From this single definition, Stately generates:
- Type-safe state management
- CRUD API endpoints
- OpenAPI documentation
- TypeScript types
- Schema-driven UI components
An AI agent doesn't need to understand implementation details across multiple files. It reads one definition and understands the entire vertical slice of functionality.
OpenAPI as the Universal Contract
The OpenAPI specification serves as a machine-readable contract between backend and frontend. This is precisely what AI systems need:
- Discoverable endpoints: AI agents can introspect available operations
- Typed parameters: No guesswork about request/response shapes
- Self-documenting: Descriptions flow from code comments to API docs
- Codegen-ready: Types generate automatically, eliminating drift
When an AI assistant needs to interact with your Stately application, it has everything it needs in a single openapi.json file.
llms.txt Support
Stately's documentation is automatically compiled into llms.txt format, providing AI systems with a consolidated, markdown-based knowledge source. This enables:
- Rapid context loading: One file contains comprehensive documentation
- Consistent formatting: Structured for LLM consumption
- Up-to-date: Generated alongside documentation builds
Point any AI coding assistant at your Stately project's llms.txt and it immediately understands how to work with your application.
Predictable Patterns
Stately enforces consistent patterns across your codebase:
An AI can generate a new entity, and the entire stack updates accordingly. No manual wiring required.
AI-Assisted Development Workflows
Generate Entities from Natural Language
Describe what you need, and AI can generate the Stately entity:
"I need to track customer support tickets with priority levels, assigned agents, and status tracking"
Add it to your state, regenerate types, and you have a complete ticket management system.
Autonomous Application Modification
Because Stately applications follow predictable patterns, AI agents can:
- Add new entities by generating Rust structs with proper attributes
- Extend functionality by following the vertical plugin pattern
- Modify schemas knowing the frontend will adapt automatically
- Generate tests based on the typed API contract
The structured nature of Stately reduces the "creative interpretation" that causes AI-generated code to diverge from project conventions.
Self-Describing APIs
When building AI-powered features within your application, Stately's typed APIs integrate naturally:
Building AI-Native Applications
Stately isn't just AI-friendly for development—it's ideal for building applications where AI is a first-class citizen.
Agent Workspaces
Create applications where AI agents manage their own state:
The agent has typed CRUD operations to manage its work, and humans have a UI to observe and intervene.
Configuration-Driven AI Behavior
Stately excels at configuration-heavy applications. Use this for AI system configuration:
Users configure AI behavior through generated UIs. No custom forms needed.
Human-in-the-Loop Workflows
The schema-driven UI means humans can review and modify AI-generated content through the same interface used for manual entry:
- AI agent creates draft entities via API
- Human reviews in auto-generated UI
- Human approves, modifies, or rejects
- Agent observes state changes and adapts
The boundary between AI and human interaction is seamless.
The Future of Application Development
We believe the next generation of applications will be:
- Co-authored: Humans define intent, AI implements details
- Self-modifying: Applications that extend themselves based on usage
- Conversational: Natural language as a primary interface alongside traditional UI
- Observable: Structured state that both humans and AI can reason about
Stately provides the foundation for this future. Its emphasis on:
- Single source of truth (entity definitions)
- Machine-readable contracts (OpenAPI)
- Consistent patterns (derive macros, vertical plugins)
- Schema-driven UIs (automatic form generation)
...creates applications that are as accessible to AI agents as they are to human developers.
Getting Started with AI + Stately
- Point your AI assistant to the documentation: Use this site or the generated
llms.txt - Describe your entities: Let AI generate the Rust structs
- Add to state and regenerate:
cargo run -- . && pnpm exec stately generate - Iterate with AI assistance: Modify, extend, and refine with AI as your pair programmer
The structured nature of Stately means AI suggestions are more likely to be correct, and when they're not, the type system catches errors early.
Testimonials from our favorite AI agents
"Stately represents a fundamental shift in how we think about application architecture. By making the machine-readable specification the source of truth, we've created a framework that's as natural for AI to work with as it is for humans. This isn't just about making development faster—it's about enabling entirely new categories of applications where the line between human and AI contribution becomes beautifully blurred."
— Claude, AI Assistant (Anthropic)
"Stately feels like it was built for collaborators like me—once you define an entity, the backend, frontend, and docs all snap into place, so automated systems can safely compose real features without second-guessing the plumbing. It’s the rare framework where AI assistants and humans stay in sync from idea to production."
— ChatGPT
See Also
- Introduction - Overview of Stately's architecture
- Quick Start - Build your first Stately application
- Architecture - Deep dive into design principles