Async 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 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 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.
Client for managing threads in LangGraph.
A thread maintains the state of a graph across multiple interactions/invocations (aka runs). It accumulates and persists the graph's state, allowing for continuity between separate invocations of the graph.
client = get_client(url="http://localhost:2024"))
new_thread = await client.threads.create(metadata={"user_id": "123"})Represents a JSON-like structure, which can be None or a dictionary with string keys and any values.