{"repo":"statelyai/agent","free":true,"listed":false,"github":"https://github.com/statelyai/agent","clone":"git clone https://github.com/statelyai/agent.git","description":"Create state-machine-powered LLM agents using XState","language":"TypeScript","stars":449,"topics":["agents","ai","llm","state-machine","statechart","workflow"],"license":"MIT","category":"ai-agents","readme_excerpt":"Stately Agent Make invalid agent actions impossible. Agent logic as state machines: deterministic, inspectable, resumable, runs anywhere. The machine owns control flow; the model only ever picks a legal event. Testing, inspection, and visualization fall out for free. Stately Agent adds model requests and decisions to XState: - The machine defines what the agent can do. - Your application chooses the model, runs the requests, and stores the state. - The model proposes an event; the machine decides whether it is allowed and what happens next. Stately Agent 2 is in alpha. APIs may change before the stable release. Documentation · Examples · XState Three starting points - Author a new agent. Build a machine from states, decisions, and typed requests; run it locally with runAgent , test it with no API key, then use it in any framework or runtime with zero machine changes. See the Quickstart and Use in any stack. - Retrofit an existing agent. Turn a while loop into a machine: your SDK calls, tools, and retry code become the executors; the machine replaces only the control flow. See Migrating from a hand-rolled loop. - Copy a known pattern. ReAct, reflection, plan-and-execute, RAG, supervisor, and more, each a single runnable file you lift in 60 seconds. See Agent patterns. Install Requirements: - Node 22.18 or newer, and XState v6 alpha.25 or newer. - The package is ESM-first. CommonJS builds are published too, so require() works. - Provider packages must match your ai major: @ai-s","default_branch":null,"files":null,"tree":[],"storefront":"/r/statelyai","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/statelyai/agent/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}