LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Graphs
    • Functional API
    • Pregel
    • Checkpointing
    • Storage
    • Caching
    • Types
    • Runtime
    • Config
    • Errors
    • Constants
    • Channels
    • Agents
    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

    OverviewGraphsFunctional APIPregelCheckpointingStorageCachingTypesRuntimeConfigErrorsConstantsChannelsAgents
    LangGraph Checkpoint
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    PythonlanggraphstreamtransformersValuesTransformer
    Classā—Since v1.1

    ValuesTransformer

    Copy
    ValuesTransformer(
        self,
        scope: tuple[str, ...] = (),
    )

    Bases

    StreamTransformer

    Constructors

    Attributes

    Methods

    Inherited fromStreamTransformer

    Attributes

    Arequires_async: boolAsupports_sync: boolAscope: tuple[str, ...]

    Methods

    Maprocess
    —

    Handle an event on the async lane.

    View source on GitHub
    Mfinalize
    —

    Called when the run ends normally (sync lane).

    Mafinalize
    —

    Called when the run ends normally (async lane).

    Mfail
    —

    Called when the run ends with an error (sync lane).

    Mafail
    —

    Called when the run ends with an error (async lane).

    Mschedule
    —

    Schedule a coroutine tied to this transformer's lifecycle.

    constructor
    __init__
    NameType
    scopetuple[str, ...]
    attribute
    required_stream_modes
    attribute
    error: BaseException | None
    method
    init
    method
    process

    Capture values events as a drainable stream of state snapshots.

    Keeps _latest / _interrupted / _interrupts as scalar state regardless of whether the log has a subscriber — so run.output() and run.interrupted work without forcing the caller to iterate run.values. Log pushes are silent no-ops when unsubscribed.

    Native transformer — projection keys are exposed as direct attributes on the run stream (e.g. run.values).

    Only values events at the run's own level are captured; snapshots from deeper subgraphs are left in the main event log but excluded from the projection. "Own level" is defined by scope, which stream_v2 / astream_v2 populate from the caller's checkpoint namespace so that a nested stream_v2 call still sees its own root snapshots.

    The error that ended the run, or None if it succeeded.

    Set by the mux when it auto-fails the projection log.