PHPackages                             webnarmin/automata - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. webnarmin/automata

ArchivedLibrary[Utility &amp; Helpers](/categories/utility)

webnarmin/automata
==================

Framework-agnostic orchestration engine for finite state machines, statecharts, and multi-agent systems in PHP.

11PHPCI passing

Since Oct 11Pushed 1w agoCompare

[ Source](https://github.com/webnarmin/automata)[ Packagist](https://packagist.org/packages/webnarmin/automata)[ RSS](/packages/webnarmin-automata/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Automata
========

[](#automata)

> **Archived package.** This repository is no longer the primary distribution channel for Automata. Use `chatflowphp/automata` instead:
>
> ```
> composer require chatflowphp/automata
> ```

[![CI](https://github.com/webnarmin/automata/workflows/CI/badge.svg)](https://github.com/webnarmin/automata/actions)[![PHPStan](https://camo.githubusercontent.com/1bc07920f0d36e55c17e1d38b1caa132cc605f51a82b388c962870b9a747b898/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6c6576656c253230392d627269676874677265656e2e737667)](https://phpstan.org/)[![PHPUnit](https://camo.githubusercontent.com/bc004f75aacf2d6c71f73022452e7825ae8b775a86bc7c9826a7d07e5ab02279/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f504850556e69742d7465737465642d627269676874677265656e2e737667)](https://phpunit.de/)[![License](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667)](https://opensource.org/licenses/MIT)

Framework-agnostic orchestration engine for single-active finite state machines in PHP.

What It Does
------------

[](#what-it-does)

- Activates one automaton at a time and drives it through discrete `tick()` cycles
- Wraps each cycle with optional middleware
- Dispatches commands and events through a lightweight in-memory message bus
- Emits lifecycle events for activation and applied transitions
- Supports snapshot/restore for shared context and serializable automata state

What It Does Not Do
-------------------

[](#what-it-does-not-do)

- No statechart semantics
- No parallel or multi-active automata runtime
- No built-in persistence transport or async messaging backend

Requirements
------------

[](#requirements)

- PHP 8.1 or newer
- Composer

Installation
------------

[](#installation)

```
composer require chatflowphp/automata
```

Quick Start
-----------

[](#quick-start)

```
