Skip to main content

Stateous

Stateous runs a process as a graph of states, and keeps every token of it durable.

You write the graph in Python. A control plane keeps every token and chooses each next state. A supervisor, on any computer, does the work and reports what happened. The supervisor never sees the graph. It knows only which states it serves, and which outcomes each state allows.

Status: alpha. The API can change before version 1.0.

Install

Stateous needs Python 3.12 or newer.

pip install stateous            # or: uv add stateous
pip install "stateous[phd]"     # also PHD, to run agents in routines

Then run the stateous command in that environment. The control plane keeps its data in SQLite or in Postgres.

The example

examples/sdlc/ is a workflow with two states: coding and testing. examples/sdlc-supervisor/ is the supervisor's folder for it.

# on the control plane's computer
stateous compile sdlc/flow.py                         # writes sdlc/build/sdlc.json
stateous serve sdlc/build/sdlc.json --listen 0.0.0.0:8080

# on the supervisor's computer
stateous init supervisor http://cp.internal:8080 sdlc-supervisor  # contract.py, stubs, stateous.yaml, pyproject.toml
stateous supervise sdlc-supervisor                    # runs the routines

# anywhere
stateous token start TICKET-1 '{"repo": "acme/api"}' --url http://cp.internal:8080
stateous token show TICKET-1 --url http://cp.internal:8080

Stateous has no authentication. Keep a control plane that listens on a wider address behind a VPN or a proxy.

To start a workflow of your own, let Stateous write a starter that compiles:

stateous init workflow orders                         # orders/flow.py, schemas.py, pyproject.toml, build/orders.json
stateous serve orders/build/orders.json
stateous init supervisor orders/flow.py orders-supervisor  # from a local flow.py or graph file, too

To try the example on one computer, follow the guide.

Learn more

Licence

Apache License 2.0. See LICENSE and NOTICE.

Metadata

Release files for stateous 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stateous 0.2.0
File Size Uploaded Provenance Actions
stateous-0.2.0.tar.gz 254.3 kB With provenance Details for stateous-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for stateous 0.2.0
File Interpreter ABI Platform Actions
stateous-0.2.0-py3-none-any.whl Python 3 none any Details for stateous-0.2.0-py3-none-any.whl

Total release size: 390.4 kB

Release files / stateous-0.2.0.tar.gz

Download URL stateous-0.2.0.tar.gz
Size 254.3 kB
Tags Source
SHA-256 checksum
How to use checksums
3873cc4751a378400205449a39936487f4ec360e7090355fa5f01f2d52c825ab
BLAKE2b-256 checksum
How to use checksums
0e9b1c5765746a8c862abff1ffefd468fac347df7246355958f8e885a0f1c4d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Release files / stateous-0.2.0-py3-none-any.whl

Download URL stateous-0.2.0-py3-none-any.whl
Size 136.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4ed0df462e84933848989df22ed5f53ed7970cd569145d7fd1c1b24a5cf9b62
BLAKE2b-256 checksum
How to use checksums
f6c09fbb27a8b11eeb3ba6c8f0ae895fa2b0418e7119241756c1c472860589b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

Security for stateous 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for stateous-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page