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.storebasePutOp
    Class●Since v1.0

    PutOp

    Copy
    PutOp()

    Bases

    NamedTuple

    Used in Docs

    • Aerospike integrations

    Attributes

    View source on GitHub
    attribute
    namespace: tuple[str, ...]

    Hierarchical path that identifies the location of the item.

    The namespace acts as a folder-like structure to organize items. Each element in the tuple represents one level in the hierarchy.

    Examples

    Root level documents:

    ("documents",)

    User-specific documents:

    ("documents", "user123")

    Nested cache structure:

    ("cache", "embeddings", "v1")
    attribute
    key: str

    Unique identifier for the item within its namespace.

    The key must be unique within the specific namespace to avoid conflicts. Together with the namespace, it forms a complete path to the item.

    attribute
    value: dict[str, Any] | None

    The data to store, or None to mark the item for deletion.

    The value must be a dictionary with string keys and JSON-serializable values. Setting this to None signals that the item should be deleted.

    attribute
    index: Literal[False] | list[str] | None

    Controls how the item's fields are indexed for search operations.

    attribute
    ttl: float | None

    Controls the TTL (time-to-live) for the item in minutes.

    If provided, and if the store you are using supports this feature, the item will expire this many minutes after it was last accessed. The expiration timer refreshes on both read operations (get/search) and write operations (put/update). When the TTL expires, the item will be scheduled for deletion on a best-effort basis. Defaults to None (no expiration).

    Operation to store, update, or delete an item in the store.

    This class represents a single operation to modify the store's contents, whether adding new items, updating existing ones, or removing them.