API Reference
Actor-Web ships as a small set of packages and subpath entry points. Import from the narrowest one that fits — browser code should not pull in Node entry points.
Entry points
| Import | Use for |
|---|---|
@actor-web/runtime | Core: defineBehavior, messages, runtime client. |
@actor-web/runtime/topology | defineActorWebTopology and the actor/node/supervisor/tool DSL. |
@actor-web/runtime/browser | Browser-safe sources & clients (no Node built-ins). |
@actor-web/runtime/node | serveNode, HTTP ingress — server only. |
@actor-web/testing | State-machine analysis test helpers. |
Map
defineBehavior— author a behavior (the builder, the handler shape, return results).- Topology — declare nodes, actors, supervisors, tools, and the source factories each actor exposes.
- Runtimes — start a local runtime or serve a node.
@actor-web/testing— analyze XState machines used by machine-based actors.
These pages document signatures. For the why behind each idea, see Concepts.
Scope
This reference covers the primary public surface. Lower-level exports (transport, gateway internals, telemetry) are intentionally not yet documented here.