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_syncstoreSyncStoreClientput_item
    Method●Since v0.3

    put_item

    Copy
    put_item(
      self,
      namespace: Sequence[str],
      ,
      key: str,
      value:
    View source on GitHub
    Mapping
    [
    str
    ,
    Any
    ]
    ,
    index
    :
    Literal
    [
    False
    ]
    |
    list
    [
    str
    ]
    |
    None
    =
    None
    ,
    ttl
    :
    int
    |
    None
    =
    None
    ,
    headers
    :
    Mapping
    [
    str
    ,
    str
    ]
    |
    None
    =
    None
    ,
    params
    :
    QueryParamTypes
    |
    None
    =
    None
    )
    ->
    None

    Parameters

    NameTypeDescription
    namespace*Sequence[str]

    A list of strings representing the namespace path.

    key*str

    The unique identifier for the item within the namespace.

    value*Mapping[str, Any]
    indexLiteral[False] | list[str] | None
    Default:None
    ttlint | None
    Default:None
    headersMapping[str, str] | None
    Default:None
    paramsQueryParamTypes | None
    Default:None

    Store or update an item.

    client = get_sync_client(url="http://localhost:8123")
    client.store.put_item(
        ["documents", "user123"],
        key="item456",
        value={"title": "My Document", "content": "Hello World"}
    )

    A dictionary containing the item's data.

    Controls search indexing - None (use defaults), False (disable), or list of field paths to index.

    Optional time-to-live in minutes for the item, or None for no expiration.

    Optional custom headers to include with the request.

    Optional query parameters to include with the request.