Learn tinyactors, then look things up
Start with one program that runs in five minutes. Then read the ideas, follow a guide for each task, and look up the rest.
Start here
- QuickstartInstall one package and run an order actor that retries its payment on its own, in Node.js, Python, a browser or C.
- Statecharts and actors in ten minutesStates, events, transitions, timers and actors, with an order you can drive in the page.
- Build a team chatA tutorial of nine steps, from one room to direct messages, each a program that runs.
- Build with a coding agentGive your agent the docs and the skill, and check what it writes in CI.
Guides for each task
- All guidesWriting and testing charts, connecting actors to your code, running a host in production and in the browser.
- Test your chartsAdvance a simulated clock and see how a WebSocket reacts when a reconnect attempt succeeds or fails.
- Keep waiting actors out of memoryTwo million actors ran with at most 1000 in memory and the rest in a database.
- Change the chart of running actorsAdd a new version to the running process, and move each actor to it with the state it reached.
- Journal and replayRecord every input, and one loop rebuilds every actor after a crash.
- RecipesExample applications named after what people build: order fulfillment, billing, a job scheduler, an HTTP gateway and more.
Check and run charts from the command line
- The tinyactors commandCompile, check, compare, draw and run charts, and read snapshots offline.
- TutorialFrom a draft chart with a misspelt event to a deploy you can compare.
- CI checksFail a build when a chart has an error or its behavior changed.
Look things up
- Command referenceEvery command of the tinyactors command, with its options and examples.
- @tinyactors/node APIEvery class, function, interface and type of the Node.js and Bun package.
- Python APIEvery class, function and constant of the tinyactors package for Python.
- The C libraryHow to embed the core in C: the loop, lifetimes and memory.
- ChangelogWhat changed in each release of each package.
- Memory, capacity and performanceWhat an actor costs, and the programs that measured it.
Understand the design
- When to use tinyactorsWhat it fits, its limits, what a crash keeps, and how it compares with Temporal, Durable Objects, Rivet and XState.
- ArchitectureHow a host runs actors in your process, from the effects loop to the bytes of a snapshot.
- The command line and the librariesWhen to reach for the command, and when for a library in your program.
- Why tinyactors existsWho makes it, and why.
See it run
- A million antsTwo colonies in your browser, every ant an actor.
- Property testingA thousand generated runs of a payment, checked against rules in the page.
- TelemetryEvery step of every actor as an OpenTelemetry span.
- Snapshot inspectorOpen a snapshot and read every actor in it.