Synchronous 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 synchronous requests to the LangGraph API.
Provides error messaging and content handling enhancements above the underlying httpx client, mirroring the interface of HttpClient but for sync usage.
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.
Synchronous client for managing runs in LangGraph.
This class provides methods to create, retrieve, and manage runs, which represent individual executions of graphs.
client = get_sync_client(url="http://localhost:2024")
run = client.runs.create(thread_id="thread_123", assistant_id="asst_456")