Client for managing runs in LangGraph.
A run is a single assistant invocation with optional input, config, context, and metadata. This client manages runs, which can be stateful (on threads) or stateless.
client = get_client(url="http://localhost:2024")
run = await client.runs.create(assistant_id="asst_123", thread_id="thread_456", input={"query": "Hello"})RunsClient(
self,
http: HttpClient,
)| Name | Type |
|---|---|
| http | HttpClient |
Create a run and stream the results.
Create a background run.
Create a batch of stateless background runs.
Create a run, wait until it finishes and return the final state.
List runs.
Get a run.
Get a run.
Cancel one or more runs.
Can cancel runs by thread ID and run IDs, or by status filter.
Block until a run is done. Returns the final state of the thread.
Stream output from a run in real-time, until the run is done. Output is not buffered, so any output produced before this call will not be received here.
Delete a run.