Stately
PackagesAgent

Agent patterns

The examples are non-trivial state machines, not special runner APIs.

Control-flow patterns

Human and long-running patterns

Host portability

The same machine artifact runs through AI SDK, Anthropic, OpenAI, LangChain, Mastra, Flue, Cloudflare, Next.js, or plain XState examples. Host adapters supply requests; they do not redefine agent control flow.

Generic orchestration such as fan-out remains ordinary XState composition.

On this page