# Stately Agent

TypeScript framework combining agent decisions with XState state machines, rules and traceable events. Version 2 is alpha.

Canonical profile: https://ki-agentenkompass.de/en/agents/stately-agent/
Editor: [Michael Meierhoff](https://ki-agentenkompass.de/en/about/)
Sources reviewed: 2026-11-16
Basis: provider documentation. Examples are editorial suggestions, not hands-on product tests.

## Overview

Agent framework from the Stately/XState ecosystem; the current next line assessed here differs from older examples.

- Provider: Stately
- Product family: Stately Agent
- Profile type: State-machine-based agent framework, alpha.
- Environment: TypeScript applications with XState; model calls through explicitly configured executors.
- Connections: XState, Vercel AI SDK, OpenAI SDK, TanStack AI and custom executors.
- Setup: Install compatible alpha packages, model states and rules and connect executors for models and tools.
- Pricing model: Software under MIT without a licence fee; model use and self-hosting incur additional costs.

## Key features

### Model allowed steps

The model proposes events; states and guards determine permitted next steps.

Source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

### Replay events

An event log reconstructs state without repeating model calls already recorded.

Source: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Check rules in advance

Reachability checks examine modeled state rules without model calls.

Source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

### Inspect runs

A run can be connected to the Stately Inspector.

Source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

### Separate executors

The host executes model and tool requests while the machine owns control flow.

Source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

## Example workflows

### Model approval within limits

- Your input: States, allowed actions and domain limits.
- Possible result: An agent whose model decisions follow the modeled transitions.
- What to check: Test guards and resumption using suitable scenarios.

### Replay a run

- Your input: A saved event log and matching machine version.
- Possible result: Reconstructed state without repeating recorded model calls.
- What to check: Compare reconstructed context with the original result.

## Requirements and limits

### Alpha dependencies

Limitation: Stately Agent 2 and the related XState line have changing APIs and matched version requirements.

Source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

### Host persistence

Requirement: The application implements executors, persistence and suitable domain rules.

Source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

### Domain review

Requirement: Outputs and actions that modify data require review appropriate to the use case.

Source: https://stately.ai/docs/packages/agent

## A good fit if …

- you want to embed agent decisions in testable state workflows
- you want to define permitted agent actions with states and guards
- you want to inspect and replay executions through event logs

## Less suitable if …

- you need a ready-made domain product with stable APIs
- you want to use agents without modeling states, executors and storage

Editorial assessment based on provider documentation. Not a product test.

## Usable AI models

Open choice

The host chooses models and executes requests. Adapters for the Vercel AI SDK, OpenAI SDK and TanStack AI are documented; custom executors can use the same state machine. Model freedom depends on the selected executor.

- Model families named: OpenAI (GPT) · Other models can be connected freely
- Model choice: You choose
- Your own API key: Yes
- Router or custom endpoint: Not stated
- Local models: Not stated

Partly documented · Sources accessed on: 2026-11-16

- [Offizielle Modellkonfiguration](https://raw.githubusercontent.com/statelyai/agent/next/readme.md)

## Europe & regional availability

Access and data processing are assessed separately.

Reviewed scope: Stately Agent · documented product access
Reviewed on: 2026-11-16

### Access and regional conditions

With requirements

Source code and documented installation are publicly available. With self-hosting you choose storage locations; model and tool providers have separate terms and data flows.

Region covered: EU/EEA, United Kingdom and Switzerland

Documented reason: Deployment, licence and terms of connected services govern access.

Official source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

## Accounts & permissions

Based on provider documentation. Permissions depend on the account, integration and organization policies. Review the permissions actually requested before use.

Configuration covered: Stately Agent · Account and permissions
Sources reviewed: 2026-11-16

### Account used

Documented with conditions: The operator configures their own model and tool credentials.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Admin approval

Documented with conditions: Approval rules for tools that write data must be set when configuring the specific agent.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Data access & team sharing

Documented with conditions: The scope of action follows from configured tools and their credentials.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

## Prices and included usage

Pricing checked: 2026-11-16

Software under MIT without a licence fee; model use and self-hosting incur additional costs.

### Self-operation

USD 0 licence fee

Software under MIT; compute, model calls and external services are separate.

Price source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

Pricing details: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

## Operation & oversight

Based on public provider documentation. Assessments are editorial inferences from the stated properties. Actual time requirements and reliability have not been measured.

Deployment covered: Stately Agent · Execution and continuation
Sources reviewed: 2026-11-16

### Files and working state

Documented with conditions: An append-only event log stores external inputs; the host selects storage.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Sign-ins

Documented with conditions: Credentials must be available for the chosen model and tool providers.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Starting further runs

Open in reviewed sources: Schedules and external triggers belong to the implementation; an end-to-end operational guarantee remains unspecified.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Human intervention

Documented with conditions: Human review and cancellation points must be configured for the tools used.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Detecting errors

Documented with conditions: The implementation must handle external-service failures and validate domain results.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Resuming after failures

Open in reviewed sources: Persistent context must be assessed separately from resuming external actions.

Evidence: https://github.com/statelyai/agent/blob/next/docs/event-log.md

### Editorial assessment

Editorial assessment of documented access. Operational responsibility and open points are given per criterion.

## Memory and conversation continuity

Scope: Stately Agent · documented access
Sources accessed: 2026-11-16

Event logs and snapshots retain execution state; personal memory must be added by the application.

### Storage and scope

Documented: An append-only event log stores external inputs; the host selects storage.

- [Offizielle Dokumentation](https://github.com/statelyai/agent/blob/next/docs/event-log.md)

### Selection and timing

Documented: The runtime logs accepted events and recorded results.

- [Offizielle Dokumentation](https://github.com/statelyai/agent/blob/next/docs/event-log.md)

### Inspect, edit and delete

Partly documented: Replay and forks enable analysis; a personal-memory editor remains unspecified here.

- [Offizielle Dokumentation](https://github.com/statelyai/agent/blob/next/docs/event-log.md)

### Agent and channel boundaries

Partly documented: threadId and host storage structure histories; access separation remains the host’s responsibility.

- [Offizielle Dokumentation](https://github.com/statelyai/agent/blob/next/docs/event-log.md)

### Retrieval

Partly documented: Replay reconstructs state from stored events; personal semantic memory retrieval remains unspecified here.

- [Offizielle Dokumentation](https://github.com/statelyai/agent/blob/next/docs/event-log.md)

### Session reset and compaction

Partly documented: Snapshots and logs support continuation; a separate mechanism for compacted personal knowledge remains unspecified here.

- [Offizielle Dokumentation](https://github.com/statelyai/agent/blob/next/docs/event-log.md)

## Context

Stately Agent 2 and the related XState line have changing APIs and matched version requirements.

Official product documentation reviewed. Workflows and assessments are editorial; hands-on product tests are outside the scope of this directory.

## Sources

- https://stately.ai/docs/packages/agent

- https://raw.githubusercontent.com/statelyai/agent/next/readme.md

- https://github.com/statelyai/agent/blob/next/docs/event-log.md

- https://github.com/statelyai/agent

- https://stately.ai/

- https://github.com/statelyai/xstate

## Provider

Stately develops XState and related tools. Its official site lists 3.2 million weekly downloads and 338,000 dependent repositories for XState; these figures concern the provider ecosystem, while Stately Agent 2 is labelled alpha.

- Operator: Stately
- Organization: Software project
- Website: https://stately.ai/docs/packages/agent
- Reviewed: 2026-11-16

- Repository: https://github.com/statelyai/agent
- GitHub-Stars: 504 (2026-11-16)
- License: MIT

- Provider source: https://raw.githubusercontent.com/statelyai/agent/next/readme.md

- Provider source: https://github.com/statelyai/agent

- Provider source: https://stately.ai/

- Provider source: https://github.com/statelyai/xstate

[Sources and method](https://ki-agentenkompass.de/en/sources/)
