The product boundary is yours
StateWeave keeps state in memory while anAgent instance lives. Durable storage, authorization, and reconnect belong to your application.
Save after success
Agent serializes calls inside one process, not across replicas. For multi-replica safety, use optimistic concurrency or one session worker.
Watch engine progress
streamEvents() reports causal progress and forwards provider tokens/metadata while each model action is being collected.
context, model, tool, retrying, final. Progress events may include the exact prompt, graph view, raw output, action, tool, or error. Model events are separate so a consumer can render provider tokens without mistaking partial protocol text for a final answer.
For just the answer:
Inspect without exposing everything
getGraph() maps causal nodes into consumer-safe nodes and edges. Large text is truncated; AgentState is unchanged.
Handle aborted and failed runs
streamEvents consumer aborts its run. A failed run’s graph explains what happened, but it is not the canonical session unless you model failures deliberately.
Traces only when needed
traceDir writes successful run results as JSON. In hosted products, prefer an access-controlled event store with explicit retention.
Next: Complete agent.