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.
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).
A convenience method for creating a conversational retrieval agent.
Construct a VectorStore agent from an LLM and tools.
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()Construct a VectorStore router agent from an LLM and tools.
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()Jira Toolkit.
Local file management toolkit.
Zapier Toolkit.
Steam Toolkit.
GitLab Toolkit.
Spark SQL agent.
Power BI agent.
Slack toolkit.
SQL agent.
AINetwork toolkit.
Playwright browser toolkit.
OpenAPI spec agent.
Agent toolkit for interacting with vector stores.
GitHub Toolkit.
Office365 toolkit.
Json agent.
Gmail toolkit.
NASA Toolkit.
MultiOn Toolkit.