LangGraph SDK
Project native graph snapshots when the client lives outside a React hook.
Consume authoritative values
Install @langchain/langgraph-sdk@1.12.9 and Ghost view peers. Prefer LangChain useStream for a React-owned client. Use the direct SDK when a server, application service or existing store already owns the run.
Create your Client({ apiUrl }) with application authentication, select/create a real thread and consume the generator into your existing store. Each yielded messages array is a replacement snapshot, not a list to append again. Render it with the plain-data composition, or expose the store through runtime integration.
Native state and lifecycle
values can contain graph fields beyond messages; the example retains the native state alongside the projection. Validate those fields before application rendering. The SDK owns network stream decoding. Ghost neither reconstructs graph deltas nor creates another graph store.
Use native checkpoint, interrupt, task and run APIs for branching and resumption. An aborted reader is not proof of remote cancellation; use the SDK's run cancellation command for your selected native run. Keep its run ID and eventual status. See the LangGraph SDK reference for these richer operations.
Troubleshooting
Do not pass token fragments to the full-state normalizer or append every values snapshot to history. Missing message IDs require a deliberate stable mapping. A stale completion must be rejected by the store owner using thread identity/revision. For token-level React updates and native message assembly, prefer the maintained useStream hook.