Asynchronously stream graph steps for a single input.
astream(
self,
input: InputT | Command | None,
config: RunnableConfig | None = None,
*,
context: ContextT | None = None,
stream_mode: StreamMode | Sequence[StreamMode] | None = None,
print_mode: StreamMode | Sequence[StreamMode] = (),
output_keys: str | Sequence[str] | None = None,
interrupt_before: All | Sequence[str] | None = None,
interrupt_after: All | Sequence[str] | None = None,
durability: Durability | None = None,
subgraphs: bool = False,
debug: bool | None = None,
**kwargs: Unpack[DeprecatedKwargs] = {}
) -> AsyncIterator[dict[str, Any] | Any]| Name | Type | Description |
|---|---|---|
input* | InputT | Command | None | The input to the graph. |
config | RunnableConfig | None | Default: NoneThe configuration to use for the run. |
context | ContextT | None | Default: NoneThe static context to use for the run. |
stream_mode | StreamMode | Sequence[StreamMode] | None | Default: NoneThe mode to stream output, defaults to Options are:
You can pass a list as the See LangGraph streaming guide for more details. |
print_mode | StreamMode | Sequence[StreamMode] | Default: ()Accepts the same values as Does not affect the output of the graph in any way. |
output_keys | str | Sequence[str] | None | Default: NoneThe keys to stream, defaults to all non-context channels. |
interrupt_before | All | Sequence[str] | None | Default: NoneNodes to interrupt before, defaults to all nodes in the graph. |
interrupt_after | All | Sequence[str] | None | Default: NoneNodes to interrupt after, defaults to all nodes in the graph. |
durability | Durability | None | Default: NoneThe durability mode for the graph execution, defaults to Options are:
|
subgraphs | bool | Default: FalseWhether to stream events from inside subgraphs, defaults to If See LangGraph streaming guide for more details. |