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

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    MCP Adapters
    OverviewAgentsCallbacksChainsChat modelsEmbeddingsEvaluationGlobalsHubMemoryOutput parsersRetrieversRunnablesLangSmithStorage
    Standard Tests
    Text Splitters
    Language
    Theme
    Pythonlangchain-classicagentsagent_toolkits
    Module●Since v1.0

    agent_toolkits

    Agent toolkits contain integrations with various resources and services.

    LangChain has a large ecosystem of integrations with various external resources like local and remote file systems, APIs and databases.

    These integrations allow developers to create versatile applications that combine the power of LLMs with the ability to access, interact with and manipulate external resources.

    When developing an application, developers should inspect the capabilities and permissions of the tools that underlie the given agent toolkit, and determine whether permissions of the given toolkit are appropriate for the application.

    See https://docs.langchain.com/oss/python/security-policy for more information.

    Attributes

    attribute
    DEPRECATED_AGENTS: list
    attribute
    DEPRECATED_LOOKUP: dict

    Functions

    function
    create_importer

    Create a function that helps retrieve objects from their new locations.

    The goal of this function is to help users transition from deprecated imports to new imports.

    The function will raise deprecation warning on loops using deprecated_lookups or fallback_module.

    Module lookups will import without deprecation warnings (used to speed up imports from large namespaces like llms or chat models).

    This function should ideally only be used with deprecated imports not with existing imports that are valid, as in addition to raising deprecation warnings the dynamic imports can create other issues for developers (e.g., loss of type information, IDE support for going to definition etc).

    function
    create_conversational_retrieval_agent

    A convenience method for creating a conversational retrieval agent.

    deprecatedfunction
    create_vectorstore_agent

    Construct a VectorStore agent from an LLM and tools.

    Note

    This class is deprecated. See below for a replacement that uses tool calling methods and LangGraph. Install LangGraph with:

    pip install -U langgraph
    from langchain_core.tools import create_retriever_tool
    from langchain_core.vectorstores import InMemoryVectorStore
    from langchain_openai import ChatOpenAI, OpenAIEmbeddings
    from langgraph.prebuilt import create_react_agent
    
    model = ChatOpenAI(model="gpt-4o-mini", temperature=0)
    
    vector_store = InMemoryVectorStore.from_texts(
        [
            "Dogs are great companions, known for their loyalty and friendliness.",
            "Cats are independent pets that often enjoy their own space.",
        ],
        OpenAIEmbeddings(),
    )
    
    tool = create_retriever_tool(
        vector_store.as_retriever(),
        "pet_information_retriever",
        "Fetches information about pets.",
    )
    
    agent = create_react_agent(model, [tool])
    
    for step in agent.stream(
        {"messages": [("human", "What are dogs known for?")]},
        stream_mode="values",
    ):
        step["messages"][-1].pretty_print()
    deprecatedfunction
    create_vectorstore_router_agent

    Construct a VectorStore router agent from an LLM and tools.

    Note

    This class is deprecated. See below for a replacement that uses tool calling methods and LangGraph. Install LangGraph with:

    pip install -U langgraph
    from langchain_core.tools import create_retriever_tool
    from langchain_core.vectorstores import InMemoryVectorStore
    from langchain_openai import ChatOpenAI, OpenAIEmbeddings
    from langgraph.prebuilt import create_react_agent
    
    model = ChatOpenAI(model="gpt-4o-mini", temperature=0)
    
    pet_vector_store = InMemoryVectorStore.from_texts(
        [
            "Dogs are great companions, known for their loyalty and friendliness.",
            "Cats are independent pets that often enjoy their own space.",
        ],
        OpenAIEmbeddings(),
    )
    
    food_vector_store = InMemoryVectorStore.from_texts(
        [
            "Carrots are orange and delicious.",
            "Apples are red and delicious.",
        ],
        OpenAIEmbeddings(),
    )
    
    tools = [
        create_retriever_tool(
            pet_vector_store.as_retriever(),
            "pet_information_retriever",
            "Fetches information about pets.",
        ),
        create_retriever_tool(
            food_vector_store.as_retriever(),
            "food_information_retriever",
            "Fetches information about food.",
        ),
    ]
    
    agent = create_react_agent(model, tools)
    
    for step in agent.stream(
        {"messages": [("human", "Tell me about carrots.")]},
        stream_mode="values",
    ):
        step["messages"][-1].pretty_print()

    Classes

    class
    VectorStoreInfo

    Information about a VectorStore.

    class
    VectorStoreRouterToolkit

    Toolkit for routing between Vector Stores.

    class
    VectorStoreToolkit

    Toolkit for interacting with a VectorStore.

    Modules

    module
    azure_cognitive_services
    module
    base
    module
    jira

    Jira Toolkit.

    module
    file_management

    Local file management toolkit.

    module
    zapier

    Zapier Toolkit.

    module
    python
    module
    steam

    Steam Toolkit.

    module
    gitlab

    GitLab Toolkit.

    module
    spark_sql

    Spark SQL agent.

    module
    spark
    module
    csv
    module
    powerbi

    Power BI agent.

    module
    slack

    Slack toolkit.

    module
    sql

    SQL agent.

    module
    ainetwork

    AINetwork toolkit.

    module
    playwright

    Playwright browser toolkit.

    module
    openapi

    OpenAPI spec agent.

    module
    clickup
    module
    vectorstore

    Agent toolkit for interacting with vector stores.

    module
    github

    GitHub Toolkit.

    module
    amadeus
    module
    office365

    Office365 toolkit.

    module
    conversational_retrieval
    module
    pandas
    module
    json

    Json agent.

    module
    gmail

    Gmail toolkit.

    module
    xorbits
    module
    nla
    module
    nasa

    NASA Toolkit.

    module
    multion

    MultiOn Toolkit.

    View source on GitHub