Build work that can resume
Looms is a TypeScript library for durable execution in your own application. Compose agents, workflows, human decisions, and your own execution types in one run. Their shared event history supports recovery, debugging, and live UI views.
Run the quickstart#
The quickstart installs the package from npm, runs an agent and tool inside a workflow, exits while awaiting review, and resumes in a new process. You can approve or reject; the workflow handles both.
Threads are the extension point#
A run owns a durable event log. Inside it, threads execute work. Agent loops and workflow DAGs are built-in thread kinds. A module you write can add a new state machine—such as an auction—and compose it with the built-in kinds. You can use existing kinds without writing reducers yourself.
Choose your path#
- Evaluate Looms: tradeoffs, supported hosts, and where it fits your stack.
- Integrate an existing app: host, client, gateway, and React.
- Define custom execution: give a domain state machine its own thread kind.
- Deploy: Durable Objects, storage, and production boundaries.
- API reference: signatures, lifecycle, HTTP contracts, and package modules.
Before production#
Historical replay reconstructs state without dispatching effects. Recovery can retry unfinished external actions, so handlers need idempotency or reconciliation. Your application must authorize requests and keep code compatible with existing runs. Read reliability and versioning before production.
Looms is in the 0.0.x series. Pin the package version and validate your workload. Source, release history, and issues are available in the repository.