Stream your first React response
Use the React streaming example to follow one complete conversation boundary. Its Run and Code views use the same implementation.
These are experimental, private source-build packages. Complete Installation for a local checkout; the example is not a public npm installation recipe.
Send one message
- Open the streaming guide's Run view.
- Use the shared development runtime, or select your LangGraph deployment in Runtime settings.
- Send a short question and watch the answer extend in place.
- Wait for Response complete before submitting a follow-up.
- Use New conversation to replace the page-local conversation.
The first Send creates a thread lazily. A successful response permits another turn. Stopped, failed, paused, interrupted, or uncertain work requires a new conversation in this deliberately narrow example; it never silently retries the old question.
Trace the implementation
In the streaming guide's Code view, read these files in order:
| File | What to follow |
|---|---|
connection.ts | Runtime configuration, exact thread-creation confirmation, and private session construction with retries disabled. |
application.ts | Command admission, session observation, message projection, and immutable publication. |
app.tsx | useAgent(application), supplied rows, submit/stop controls, and owner cleanup. |
main.tsx | Client root and runtime bridge startup and teardown. |
The application calls content.project while processing session observations, then publishes rows. React reads those prepared rows without advancing a content owner during rendering.
Read completion correctly
The core session's submit returns a CompleteOutcome. This example's application method publishes that result as snapshot.outcome; its own promise settlement is not the success signal. The visible answer can remain after a failed or stopped attempt.
Read Conversation turns next. Add persistence only when your application also owns saved-history loading and confirmation.