Synchronous client for managing threads in LangGraph.
Specifies behavior on conflict:
Strategy for pruning threads:
The order to sort by.
The field to sort by.
Represents the status of a thread:
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 a part of a stream response.
Represents a conversation thread.
Represents the state of a thread.
Represents the response from updating a thread's state.
Represents a JSON-like structure, which can be None or a dictionary with string keys and any values.
Synchronous client for managing threads in LangGraph.
This class provides methods to create, retrieve, and manage threads, which represent conversations or stateful interactions.
client = get_sync_client(url="http://localhost:2024") thread = client.threads.create(metadata={"user_id": "123"})