Async client for managing runs in LangGraph.
Represents a wildcard or 'all' selector.
Filter runs by status when bulk-cancelling:
Action to take when cancelling the run.
Specifies behavior on disconnection:
Durability mode for the graph execution.
"sync": Changes are persisted synchronously before the next step starts."async": Changes are persisted asynchronously while the next step executes."exit": Changes are persisted only when the graph exits.Specifies behavior if the thread doesn't exist:
Defines how to handle multiple tasks:
Defines action after completion:
Represents the status of a run:
Defines the mode of streaming:
Handle async requests to the LangGraph API.
Adds additional error messaging & content handling above the provided httpx client.
Represents a checkpoint in the execution process.
Represents one or more commands to control graph execution flow and state.
This type defines the control commands that can be returned by nodes to influence graph execution. It lets you navigate to other nodes, update graph state, and resume from interruptions.
Configuration options for a call.
Represents a single execution run.
Defines the parameters for initiating a background run.
Metadata for a run creation request.
Represents a part of a stream response.
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"})