The public surface
Import from the package root.State
AgentState is public. The internal causal node aliases are not separate package-root exports.
Semantic configuration
SemanticNodeType is exported. SemanticPayload documents the runtime shape; it is not a separate package-root type.
Model
Agent calls complete() with mode: "text", a compiled prompt, and no frame. The optional frame and graph_ops mode stay for the low-level utilities.
Adapter exports:
MockModelAnthropicModelanthropicConfigFromEnv()createModelFromEnv()collectModelText()estimateStateWeaveTokens()
Tool
createDefaultTools()createFileSystemTools()describeTools()mockToolstoolMap()
Progress and traces
AgentStreamEvent is a discriminated union of metadata, provider model_token/model_metadata, progress, and final:
stream() and streamText() are answer conveniences and yield one accepted final string; they do not execute partial action envelopes.
Visualization graph
Agent.getGraph() returns this view. graphToMermaid() renders it with no graph-database or UI dependency.
Low-level graph utilities
The package also exports GraphFrame-era utilities: graph creation, clone, fork, append-input, validation, serialization, GraphOps schemas, parsing, projection, andGraphFrame, GraphOp, StateGraph, and trace types.
Legacy compatibility.
These utilities remain exported for historical artifact compatibility and
explicit graph work. The public
Agent uses Causal Weave v3, not GraphFrame
or the SWX GraphOps loop. There is no second public graph-frame agent class.
The public causal compiler now uses the deterministic projection machinery
internally; these GraphFrame projection functions remain compatibility APIs.src/index.ts.