Public TypeScript surface

Import public values and types from the package root.

State

AgentState and its structural node shape are public through the AgentState alias; the internal causal node aliases are not separate package-root exports.

Semantic configuration

SemanticNodeType is exported. SemanticPayload above documents the runtime payload shape; it is not a separate package-root type. The default configured types are memory, preference, wisdom, and artifact.

Model

The public Agent calls complete() with mode: "text", a compiled prompt, and no frame. The optional frame and graph_ops mode remain for the low-level compatibility utilities. Primary adapter exports:
  • MockModel
  • AnthropicModel
  • anthropicConfigFromEnv()
  • createModelFromEnv()
  • collectModelText()
  • estimateStateWeaveTokens()

Tool

Tool helpers:
  • createDefaultTools()
  • createFileSystemTools()
  • describeTools()
  • mockTools
  • toolMap()

Progress and traces

AgentStreamEvent is a discriminated union of metadata, progress, and final.

Visualization graph

Agent.getGraph() returns this view. graphToMermaid() renders it without graph-database or UI dependencies.

Low-level graph utilities

The package also exports GraphFrame-era graph construction and compatibility utilities:
  • graph creation, clone, fork, append-input, and validation helpers;
  • serializeGraphFrame() and PromptBudgetExceededError;
  • GraphOps schemas, parsing, validation, and application;
  • graph clustering and projection helpers;
  • low-level GraphFrame, GraphOp, StateGraph, and trace types.
These utilities remain available for explicit graph work and historical artifact compatibility. They are not the memory engine used by Agent, and the public SDK does not expose a second graph-frame agent class. For exact signatures, the package root is the authority: src/index.ts.