LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
    • Overview
    • Caches
    • Callbacks
    • Documents
    • Document loaders
    • Embeddings
    • Exceptions
    • Language models
    • Serialization
    • Output parsers
    • Prompts
    • Rate limiters
    • Retrievers
    • Runnables
    • Utilities
    • Vector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    ⌘I

    Chat LangChain

    What can I help with?

    Enter to send·Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-corerunnablesbaseRunnableBindingBaseastream_events
    Method●Since v1.8

    astream_events

    Copy
    astream_events(
      self,
      input: Input,
      config: RunnableConfig | None = None,
      kwargs: Any
    View source on GitHub
    |
    None
    =
    {
    }
    )
    ->
    AsyncIterator
    [
    StreamEvent
    ]
    |
    Awaitable
    [
    Any
    ]

    Forward astream_events to the bound runnable with bound kwargs merged.

    For version="v3", returns an awaitable that resolves to the bound runnable's typed stream object (e.g. AsyncChatModelStream). For version="v1" / "v2", returns an async iterator over StreamEvent items.

    Without this override, __getattr__ would drop self.kwargs — losing tools bound via bind_tools, stop sequences, etc.