Skip to main content
Most of the time, you provide a thread_id to your client when you run your graph in order to keep track of prior runs through the persistent state implemented in LangSmith Deployment. However, if you donโ€™t need to persist the runs you donโ€™t need to use the built-in persistent state and can create stateless runs.

Setup

First, letโ€™s setup our client:

Stateless streaming

We can stream the results of a stateless run in an almost identical fashion to how we stream from a run with the state attribute, but instead of passing a value to the thread_id parameter, we pass None:
Output:

Waiting for stateless results

In addition to streaming, you can also wait for a stateless result by using the .wait function like follows:
Output:

Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.