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-coretracersbaseBaseTraceron_llm_start
    Method●Since v0.1

    on_llm_start

    Copy
    on_llm_start(
      self,
      serialized: dict[str, Any],
      prompts: list[str
    View source on GitHub
    ]
    ,
    *
    ,
    run_id
    :
    UUID
    ,
    tags
    :
    list
    [
    str
    ]
    |
    None
    =
    None
    ,
    parent_run_id
    :
    UUID
    |
    None
    =
    None
    ,
    metadata
    :
    dict
    [
    str
    ,
    Any
    ]
    |
    None
    =
    None
    ,
    name
    :
    str
    |
    None
    =
    None
    ,
    **
    kwargs
    :
    Any
    =
    {
    }
    )
    ->
    Run

    Parameters

    NameTypeDescription
    serialized*dict[str, Any]

    The serialized model.

    prompts*list[str]

    The prompts to start the LLM with.

    run_id*UUID
    tagslist[str] | None
    Default:None
    parent_run_idUUID | None
    Default:None
    metadatadict[str, Any] | None
    Default:None
    namestr | None
    Default:None
    **kwargsAny
    Default:{}

    Start a trace for an LLM run.

    The run ID.

    The tags for the run.

    The parent run ID.

    The metadata for the run.

    The name of the run.

    Additional arguments.