LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • MCP Adapters
    Standard Tests
    Text Splitters
    • Overview
    • Agents
    • Callbacks
    • Chains
    • Chat models
    • Embeddings
    • Evaluation
    • Globals
    • Hub
    • Memory
    • Output parsers
    • Retrievers
    • Runnables
    • LangSmith
    • Storage
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    Standard Tests
    Text Splitters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Language
    Theme
    Pythonlangchain-classicagentsinitialize
    Moduleā—Since v1.0

    initialize

    Load agent.

    Attributes

    Functions

    Classes

    View source on GitHub
    attribute
    AGENT_DEPRECATION_WARNING: str
    attribute
    AGENT_TO_CLASS: dict[AgentType, AGENT_TYPE]
    deprecatedfunction
    load_agent
    deprecatedfunction
    initialize_agent
    class
    AgentExecutor
    deprecatedclass
    AgentType

    Unified method for loading an agent from LangChainHub or local fs.

    Load an agent executor given tools and LLM.

    Warning

    This function is no deprecated in favor of create_agent from the langchain package, which provides a more flexible agent factory with middleware support, structured output, and integration with LangGraph.

    For migration guidance, see Migrating to langchain v1 and Migrating from AgentExecutor.

    Agent that is using tools.

    An enum for agent types.