LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    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
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-sdk_asyncassistantsAssistantsClientupdate
    Method●Since v0.3

    update

    Copy
    update(
      self,
      assistant_id: str,
      *,
      graph_id: str | None = None,
    View source on GitHub
    config
    :
    Config
    |
    None
    =
    None
    ,
    context
    :
    Context
    |
    None
    =
    None
    ,
    metadata
    :
    Json
    =
    None
    ,
    name
    :
    str
    |
    None
    =
    None
    ,
    headers
    :
    Mapping
    [
    str
    ,
    str
    ]
    |
    None
    =
    None
    ,
    description
    :
    str
    |
    None
    =
    None
    ,
    params
    :
    QueryParamTypes
    |
    None
    =
    None
    )
    ->
    Assistant

    Parameters

    NameTypeDescription
    assistant_id*str

    Assistant to update.

    graph_idstr | None
    Default:None

    The ID of the graph the assistant should use. The graph ID is normally set in your langgraph.json configuration. If None, assistant will keep pointing to same graph.

    configConfig | None
    Default:None

    Configuration to use for the graph.

    contextContext | None
    Default:None
    metadataJson
    Default:None
    namestr | None
    Default:None
    headersMapping[str, str] | None
    Default:None
    descriptionstr | None
    Default:None
    paramsQueryParamTypes | None
    Default:None

    Update an assistant.

    Use this to point to a different graph, update the configuration, or change the metadata of an assistant.

    client = get_client(url="http://localhost:2024")
    assistant = await client.assistants.update(
        assistant_id='e280dad7-8618-443f-87f1-8e41841c180f',
        graph_id="other-graph",
        context={"model_name": "anthropic"},
        metadata={"number":2}
    )

    Static context to add to the assistant.

    Metadata to merge with existing assistant metadata.

    The new name for the assistant.

    Optional custom headers to include with the request.

    Optional description of the assistant. The description field is available for langgraph-api server version>=0.0.45

    Optional query parameters to include with the request.