LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdk_syncthreadsSyncThreadsClient
    Classā—Since v0.3

    SyncThreadsClient

    Copy
    SyncThreadsClient(
        self,
        http: SyncHttpClient,
    )

    Constructors

    Attributes

    Methods

    View source on GitHub
    constructor
    __init__
    NameType
    httpSyncHttpClient
    attribute
    http: http
    method
    get

    Get a thread by ID.

    method
    create

    Create a new thread.

    method
    update

    Update a thread.

    method
    delete

    Delete a thread.

    method
    search

    Search for threads.

    method
    count

    Count threads matching filters.

    method
    copy

    Copy a thread.

    method
    prune

    Prune threads by ID.

    method
    get_state

    Get the state of a thread.

    method
    update_state

    Update the state of a thread.

    method
    get_history

    Get the state history of a thread.

    method
    join_stream

    Get a stream of events for a thread.

    Synchronous client for managing threads in LangGraph.

    This class provides methods to create, retrieve, and manage threads, which represent conversations or stateful interactions.

    Example
    client = get_sync_client(url="http://localhost:2024")
    thread = client.threads.create(metadata={"user_id": "123"})