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_asyncthreadsThreadsClientget
    Methodā—Since v0.3

    get

    Copy
    get(
      self,
      thread_id: str,
      *,
      include: Sequence[str] | None
    View source on GitHub
    =
    None
    ,
    headers
    :
    Mapping
    [
    str
    ,
    str
    ]
    |
    None
    =
    None
    ,
    params
    :
    QueryParamTypes
    |
    None
    =
    None
    )
    ->
    Thread

    Parameters

    NameTypeDescription
    thread_id*str

    The ID of the thread to get.

    includeSequence[str] | None
    Default:None

    Additional fields to include in the response. Supported values: "ttl".

    headersMapping[str, str] | None
    Default:None
    paramsQueryParamTypes | None
    Default:None

    Get a thread by ID.

    client = get_client(url="http://localhost:2024")
    thread = await client.threads.get(
        thread_id="my_thread_id"
    )
    print(thread)
    -----------------------------------------------------
    
    {
        'thread_id': 'my_thread_id',
        'created_at': '2024-07-18T18:35:15.540834+00:00',
        'updated_at': '2024-07-18T18:35:15.540834+00:00',
        'metadata': {'graph_id': 'agent'}
    }

    Optional custom headers to include with the request.

    Optional query parameters to include with the request.