One complete turn

The npm package is not published yet. This path builds the SDK from source and needs no API key. An immutable causal graph, a bounded view of a few nodes, and one model action

1. Build the SDK

Requires Node.js 22 or newer.
The initial npm publication is still pending. Do not run pnpm add stateweave until it exists. This source path works today.

2. Run a deterministic agent

Create quickstart.mjs in the repo root:
MockModel needs no provider. It proves the loop, the commit, and cross-turn memory.

3. Persist and resume

AgentState is plain data. Store it where you store user-owned data.
When you import state, StateWeave checks identities, parent order, sequence, timestamps, resource keys, and frontier references. Bad state is rejected, not repaired.

4. Connect a provider

Keep provider keys on the server. Never expose them to the browser.

What one call does

Next: Why StateWeave.