LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • Graphs
  • Functional API
  • Pregel
  • Checkpointing
  • Storage
  • Caching
  • Types
  • Runtime
  • Config
  • Errors
  • Constants
  • Channels
  • Agents
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 CLI
LangGraph SDK
LangGraph Supervisor
LangGraph Swarm
Language
Theme
Pythonlanggraphpregel_writeChannelWrite
Class●Since v0.6

ChannelWrite

Copy
ChannelWrite(
  self,
  writes: Sequence[ChannelWriteEntry | ChannelWriteTupleEntry | Send],
  *

Bases

RunnableCallable

Constructors

Attributes

Methods

Inherited fromRunnableCallable

Attributes

Aname: strAfunc: funcAafunc: afuncAtags: Sequence[str] | None
—

Tags to attach to the node for tracing.

View source on GitHub
,
tags
:
Sequence
[
str
]
|
None
=
None
)
Akwargs: kwargs
Atrace: trace
Arecurse: recurse
Aexplode_args: explode_args
Afunc_accepts: dict[str, tuple[str, Any]]

Methods

MinvokeMainvoke

Inherited fromRunnable(langchain_core)

Attributes

AnameAInputTypeAOutputTypeAinput_schemaAoutput_schemaAconfig_specs

Methods

Mget_input_schemaMget_input_jsonschemaMget_output_schemaMget_output_jsonschemaMconfig_schemaM
constructor
__init__
NameType
writesSequence[ChannelWriteEntry | ChannelWriteTupleEntry | Send]
tagsSequence[str] | None
attribute
writes: list[ChannelWriteEntry | ChannelWriteTupleEntry | Send]

Sequence of write entries or Send objects to write.

method
get_name
method
do_write
method
is_writer

Used by PregelNode to distinguish between writers and other runnables.

method
get_static_writes

Used to get conditional writes a writer declares for static analysis.

method
register_writer

Used to mark a runnable as a writer, so that it can be detected by is_writer. Instances of ChannelWrite are automatically marked as writers. Optionally, a list of declared writes can be passed for static analysis.

Implements the logic for sending writes to CONFIG_KEY_SEND. Can be used as a runnable or as a static method to call imperatively.

get_config_jsonschema
Mget_graph
Mget_prompts
Mpipe
Mpick
Massign
Minvoke
Mainvoke
Mbatch
Mbatch_as_completed
Mabatch
Mabatch_as_completed
Mstream
Mastream
Mastream_log
Mastream_events
Mtransform
Matransform
Mbind
Mwith_config
Mwith_listeners
Mwith_alisteners
Mwith_types
Mwith_retry
Mmap
Mwith_fallbacks
Mas_tool