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-sdkauthtypesThreadsCreate
    Class●Since v0.1

    ThreadsCreate

    Copy
    ThreadsCreate()

    Bases

    typing.TypedDict

    Constructors

    Attributes

    View source on GitHub
    constructor
    __init__
    NameType
    thread_idUUID
    metadataMetadataInput
    if_existsOnConflictBehavior
    ttlThreadTTL
    attribute
    thread_id: UUID

    Unique identifier for the thread.

    attribute
    metadata: MetadataInput

    typing.Optional metadata to attach to the thread.

    attribute
    if_exists: OnConflictBehavior

    Behavior when a thread with the same ID already exists.

    attribute
    ttl: ThreadTTL

    Optional TTL configuration for the thread.

    Parameters for creating a new thread.

    Examples
    create_params = {
        "thread_id": UUID("123e4567-e89b-12d3-a456-426614174000"),
        "metadata": {"owner": "user123"},
        "if_exists": "do_nothing"
    }