Agent
The single public class, backed by Causal Weave v3.
Constructor
tools: [] disables tools. Omitting tools creates the default workspace tools.
run()
TaskInput is a string or { input, objective? }. A stateful agent serializes concurrent calls. Successful runs update its state.
options.state runs against that snapshot without mutating the agent-owned session.
streamEvents()
metadata first, then model token/metadata events as available, zero or more progress events, and one final. Closing early aborts the run. Errors are thrown by the iterator.
stream() and streamText()
streamEvents() for provider token events.
getState()
undefined before the first success unless initial state was supplied.