# state.do > Build resilient state machines with automatic persistence, failure recovery, and AI optimization. Execute workflows that run for hours or days with full type safety and time-travel debugging. State Machines That Never Lose Progress. Durable execution with automatic state persistence, sub-100ms state transitions, and zero data loss. Build complex workflows that survive failures, handle human approvals, and resume exactly where they stopped. state.do is one of the primitives of Platform.do. Every .do shares one grammar, Business-as-Code, and one SDK. ## Page - [state.do](https://state.do/): State.do - Build Durable State Machines with TypeScript | Declarative Workflow Orchestration ([Markdown](https://state.do/index.md)) ## Business-as-Code - [What is Business-as-Code?](https://platform.do/business-as-code): the grammar every .do shares ([Markdown](https://platform.do/business-as-code.md)) - [Platform.do](https://platform.do/): infrastructure for autonomous business ([llms.txt](https://platform.do/llms.txt)) ## Docs - [Documentation](https://docs.platform.do): guides and reference for the whole platform - [SDK](https://docs.platform.do/sdk): TypeScript SDK, `import { on, send, db, $ } from 'sdk.do'` - [CLI](https://docs.platform.do/cli): the `do` command - [MCP](https://docs.platform.do/mcp): one MCP tool, `do`, that runs a script - [API](https://docs.platform.do/api): REST API ## Optional - [Full text](https://state.do/llms-full.txt): this index plus the page in full