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-corerunnablesconfigRunnableConfig
    Class●Since v0.1

    RunnableConfig

    Copy
    RunnableConfig()

    Bases

    TypedDict

    Used in Docs

    • Build a custom SQL agent
    • Evaluate a complex agent
    • Graph API overview
    • Log traces to a specific project
    • Long-term memory

    Constructors

    Attributes

    View source on GitHub
    constructor
    __init__
    NameType
    tagslist[str]
    metadatadict[str, Any]
    callbacksCallbacks
    run_namestr
    max_concurrencyint | None
    recursion_limitint
    configurabledict[str, Any]
    run_iduuid.UUID | None
    attribute
    tags: list[str]

    Tags for this call and any sub-calls (e.g. a Chain calling an LLM).

    You can use these to filter calls.

    attribute
    metadata: dict[str, Any]

    Metadata for this call and any sub-calls (e.g. a Chain calling an LLM).

    Keys should be strings, values should be JSON-serializable.

    attribute
    callbacks: Callbacks

    Callbacks for this call and any sub-calls (e.g. a Chain calling an LLM).

    Tags are passed to all callbacks, metadata is passed to handle*Start callbacks.

    attribute
    run_name: str

    Name for the tracer run for this call.

    Defaults to the name of the class.

    attribute
    max_concurrency: int | None

    Maximum number of parallel calls to make.

    If not provided, defaults to ThreadPoolExecutor's default.

    attribute
    recursion_limit: int

    Maximum number of times a call can recurse.

    If not provided, defaults to 25.

    attribute
    configurable: dict[str, Any]

    Runtime values for attributes previously made configurable on this Runnable, or sub-Runnable objects, through configurable_fields or configurable_alternatives.

    Check output_schema for a description of the attributes that have been made configurable.

    attribute
    run_id: uuid.UUID | None

    Unique identifier for the tracer run for this call.

    If not provided, a new UUID will be generated.

    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"]}