State is not context

A transcript answers one question well: what was said next? An agent asks harder questions:
  • which evidence supported an action;
  • which file version is current;
  • which preference replaced an older one;
  • what this inference actually read;
  • what can leave the prompt without leaving history.
A list of messages can contain these facts, but it cannot express them directly.

The transcript tradeoff

A normal loop stores:
To fit the next call, it picks one policy: These are fine context policies. They are weak definitions of durable state.

The graph separation

StateWeave stores:
Parents mean direct dependency. resourceKey creates version chains. The frontier marks today’s heads. The next turn starts from those heads, not from the last line of a transcript.
Separation

Persistence can be lossless while context stays bounded.

Exact read-set parents

Suppose the graph has 200 nodes. One inference reads 18. StateWeave records those 18 IDs as the inference’s parents. That gives causality a testable meaning. Not “these seem related,” but “these are the nodes the runtime rendered into this call.” No second model call. No model-drawn edges. The line from source to use falls out of prompt construction.

Change without deletion

A preference or file can change. StateWeave appends the new value and links it to the old one through a stable key.
Projection treats the newest head as current. Both stay in AgentState.

The honest limits

  • StateWeave does not make a model infallible.
  • A graph can keep bad evidence.
  • Ranking can omit useful history.
  • Persistence and access control are your job.
The primitive improves identity, provenance, boundedness, and inspection. Product quality still depends on the model, tools, and policy you connect. Next: Nodes.