Every example is an actor.
Small, complete apps you can clone and run. Each one shows the contract, the transaction, a failure, and the recovery, not just the happy path.
Order and payment
Place inserts the lines, emits OrderPlaced, records the total and enqueues Charge in one commit. The charge runs after the commit, with retries and a dead letter.
yield* turn.rows(orderLines).insert(lines)
yield* turn.emit(OrderPlaced.make({ total }))
yield* turn.enqueue(Charge.make({ amount: total }))
yield* turn.state.set({ total })Read the example in the README →Counter
One actor, one number. The quickstart: state that survives a restart, and a test that crashes it.
Order and payment
An order that records its lines, emits an event, and charges the customer through a retried job.
Chat room
A room owns its members and messages. Typing hints broadcast live; history resumes from a cursor.
Coding agent
A session that keeps its transcript, streams tokens, pauses for approval, and resumes after a deploy.
Collaborative document
One document, many cursors. Edits commit in order; presence is a best-effort hint.
Connected device
Desired state, readings and command history, with scheduled health checks and live telemetry.
Nightly report
A singleton that wakes on a cron schedule, fans out work, and survives a restart mid-run.
Per-tenant workspace
Settings and records per workspace, isolated by tenant, and reportable across tenants with plain SQL.