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
    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

    OverviewGraphsFunctional APIPregelCheckpointingStorageCachingTypesRuntimeConfigErrorsConstantsChannelsAgents
    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    PythonlanggraphchannelstopicTopic
    Class●Since v0.1

    Topic

    Copy
    Topic(
        self,
        typ: type[Value],
        accumulate: bool = False,
    )

    Bases

    Generic[Value]BaseChannel[Sequence[Value], Value | list[Value], list[Value

    Used in Docs

    • LangGraph runtime

    Constructors

    Attributes

    Methods

    Inherited fromBaseChannel

    Attributes

    Atyp: typAkey: key

    Methods

    Mconsume
    —

    Notify the channel that a subscribed task ran.

    Mfinish
    —

    Notify the channel that the Pregel run is finishing.

    View source on GitHub
    ]]

    Parameters

    NameTypeDescription
    typ*type[Value]
    accumulatebool
    Default:False
    constructor
    __init__
    NameType
    typtype[Value]
    accumulatebool
    attribute
    accumulate: accumulate
    attribute
    values
    attribute
    ValueType: Any
    attribute
    UpdateType: Any
    method
    copy
    method
    checkpoint
    method
    from_checkpoint
    method
    update
    method
    get
    method
    is_available

    A configurable PubSub Topic.

    The type of the value stored in the channel.

    Whether to accumulate values across steps. If False, the channel will be emptied after each step.

    The type of the value stored in the channel.

    The type of the update received by the channel.

    Return a copy of the channel.