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-corecallbacksmanager
    Module●Since v0.1

    manager

    Run managers.

    Attributes

    Functions

    Classes

    Type Aliases

    View source on GitHub
    attribute
    Run: RunTree
    attribute
    logger
    attribute
    Func
    attribute
    T
    function
    get_debug
    function
    get_buffer_string
    function
    env_var_is_set
    function
    uuid7
    function
    trace_as_chain_group
    function
    atrace_as_chain_group
    function
    shielded
    function
    handle_event
    function
    ahandle_event
    function
    adispatch_custom_event
    function
    dispatch_custom_event
    class
    BaseCallbackHandler
    class
    BaseCallbackManager
    class
    ChainManagerMixin
    class
    LLMManagerMixin
    class
    RetrieverManagerMixin
    class
    RunManagerMixin
    class
    ToolManagerMixin
    class
    StdOutCallbackHandler
    class
    BaseMessage
    class
    AgentAction
    class
    AgentFinish
    class
    Document
    class
    ChatGenerationChunk
    class
    GenerationChunk
    class
    LLMResult
    class
    RunnableConfig
    class
    BaseRunManager
    class
    RunManager
    class
    ParentRunManager
    class
    AsyncRunManager
    class
    AsyncParentRunManager
    class
    CallbackManagerForLLMRun
    class
    AsyncCallbackManagerForLLMRun
    class
    CallbackManagerForChainRun
    class
    AsyncCallbackManagerForChainRun
    class
    CallbackManagerForToolRun
    class
    AsyncCallbackManagerForToolRun
    class
    CallbackManagerForRetrieverRun
    class
    AsyncCallbackManagerForRetrieverRun
    class
    CallbackManager
    class
    CallbackManagerForChainGroup
    class
    AsyncCallbackManager
    class
    AsyncCallbackManagerForChainGroup
    typeAlias
    Callbacks: list[BaseCallbackHandler] | BaseCallbackManager | None

    Get the value of the debug global setting.

    Convert a sequence of messages to strings and concatenate them into one string.

    Check if an environment variable is set.

    Generate a UUID from a Unix timestamp in nanoseconds and random bits.

    UUIDv7 objects feature monotonicity within a millisecond.

    Get a callback manager for a chain group in a context manager.

    Useful for grouping different calls together as a single run even if they aren't composed in a single chain.

    Get an async callback manager for a chain group in a context manager.

    Useful for grouping different async calls together as a single run even if they aren't composed in a single chain.

    Makes so an awaitable method is always shielded from cancellation.

    Generic event handler for CallbackManager.

    Async generic event handler for AsyncCallbackManager.

    Dispatch an adhoc event to the handlers.

    Dispatch an adhoc event.

    Base callback handler.

    Base callback manager.

    Mixin for chain callbacks.

    Mixin for LLM callbacks.

    Mixin for Retriever callbacks.

    Mixin for run manager.

    Mixin for tool callbacks.

    Callback handler that prints to std out.

    Base abstract message class.

    Messages are the inputs and outputs of a chat model.

    Examples include HumanMessage, AIMessage, and SystemMessage.

    Represents a request to execute an action by an agent.

    The action consists of the name of the tool to execute and the input to pass to the tool. The log is used to pass along extra information about the action.

    Final return value of an ActionAgent.

    Agents return an AgentFinish when they have reached a stopping condition.

    Class for storing a piece of text and associated metadata.

    Note

    Document is for retrieval workflows, not chat I/O. For sending text to an LLM in a conversation, use message types from langchain.messages.

    ChatGeneration chunk.

    ChatGeneration chunks can be concatenated with other ChatGeneration chunks.

    GenerationChunk, which can be concatenated with other Generation chunks.

    A container for results of an LLM call.

    Both chat models and LLMs generate an LLMResult object. This object contains the generated outputs and any additional information that the model provider wants to return.

    Base class for run manager (a bound callback manager).

    Synchronous run manager.

    Synchronous parent run manager.

    Async run manager.

    Async parent run manager.

    Callback manager for LLM run.

    Async callback manager for LLM run.

    Callback manager for chain run.

    Async callback manager for chain run.

    Callback manager for tool run.

    Async callback manager for tool run.

    Callback manager for retriever run.

    Async callback manager for retriever run.

    Callback manager for LangChain.

    Callback manager for the chain group.

    Async callback manager that handles callbacks from LangChain.

    Async callback manager for the chain group.

    Configuration for a Runnable.

    Note

    Custom values

    The TypedDict has total=False set intentionally to:

    • Allow partial configs to be created and merged together via merge_configs
    • Support config propagation from parent to child runnables via var_child_runnable_config (a ContextVar that automatically passes config down the call stack without explicit parameter passing), where configs are merged rather than replaced
    Example
    # Parent sets tags
    chain.invoke(input, config={"tags": ["parent"]})
    # Child automatically inherits and can add:
    # ensure_config({"tags": ["child"]}) -> {"tags": ["parent", "child"]}