Connect the world outside the graph
StateWeave owns causal state. Models and tools are explicit boundaries supplied toAgent.
Model contract
Agent loop currently calls complete(). Implement stream() for interface completeness and direct adapter use.
input.prompt is already the compiled causal view.
Included adapters
MockModelprovides deterministic tests.AnthropicModelis a thin HTTP adapter without an Anthropic SDK dependency.createModelFromEnv()selectsmockor Anthropic-compatible configuration from environment variables.
Tool contract
Default workspace tools
Iftools is omitted, Agent creates four workspace-scoped tools:
read_filewrite_fileedit_file- read-only
bash_command
tools: [] for no tools. Pass a custom array to replace the defaults.
PATH, read-only command allowlist. It rejects pipes, redirects, command substitution, arbitrary interpreters, and network commands.
These checks reduce accidental scope. They are not a process sandbox. For untrusted coding work, run the entire agent inside an isolated filesystem and process boundary.