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

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    OverviewCachesCallbacksDocumentsDocument loadersEmbeddingsExceptionsLanguage modelsSerializationOutput parsersPromptsRate limitersRetrieversRunnablesUtilitiesVector stores
    MCP Adapters
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-corerunnablesschemaEventData
    Class●Since v0.1

    EventData

    Data associated with a streaming event.

    Copy
    EventData()

    Bases

    TypedDict

    Constructors

    constructor
    __init__
    NameType
    inputAny
    errorNotRequired[BaseException]
    outputAny
    chunkAny
    tool_call_idNotRequired[str | None]

    Attributes

    attribute
    input: Any

    The input passed to the Runnable that generated the event.

    Inputs will sometimes be available at the START of the Runnable, and sometimes at the END of the Runnable.

    If a Runnable is able to stream its inputs, then its input by definition won't be known until the END of the Runnable when it has finished streaming its inputs.

    attribute
    error: NotRequired[BaseException]

    The error that occurred during the execution of the Runnable.

    This field is only available if the Runnable raised an exception.

    attribute
    output: Any

    The output of the Runnable that generated the event.

    Outputs will only be available at the END of the Runnable.

    For most Runnable objects, this field can be inferred from the chunk field, though there might be some exceptions for special a cased Runnable (e.g., like chat models), which may return more information.

    attribute
    chunk: Any

    A streaming chunk from the output that generated the event.

    chunks support addition in general, and adding them up should result in the output of the Runnable that generated the event.

    attribute
    tool_call_id: NotRequired[str | None]

    The tool call ID associated with the tool execution.

    This field is available for the on_tool_error event and can be used to link errors to specific tool calls in stateless agent implementations.

    View source on GitHub