Tools provide access to 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 Security for more information.
Loads a tool from the HuggingFace Hub.
Load tools based on their name.
Tools allow agents to interact with various resources and services like APIs, databases, file systems, etc.
Please scope the permissions of each tools to the minimum required for the application.
For example, if an application only needs to read from a database, the database tool should not be given write permissions. Moreover consider scoping the permissions to only allow accessing specific tables and impose user-level quota for limiting resource usage.
Please read the APIs of the individual tools to determine which configuration they support.
See Security for more information.
Get a list of all possible tool names.
Tool that searches the Arxiv API.
Tool that queries the Bing search API.
Tool that queries the DataForSeo Google Search API and get back json.
Tool that queries the DataForSeo Google search API.
DuckDuckGo tool.
Tool that queries the Eleven Labs Text2Speech API.
In order to set this up, follow instructions at: https://elevenlabs.io/docs
Tool that reads a file.
Tool that adds the capability to query using the Golden API and get back JSON.
Tool that queries the Google Finance API.
Tool that queries the Google Jobs API.
Tool that queries the Google Lens API.
Tool that queries the Google search API.
Tool that queries the Serper.dev Google Search API and get back json.
Tool that queries the Serper.dev Google search API.
Tool that queries the Google trends API.
Base tool for querying a GraphQL API.
Tool that asks user for input.
Tool that trains a language model.
Tool that searches the Merriam-Webster API.
Tool that queries the OpenWeatherMap API.
Tool that searches the PubMed API.
Tool for making a DELETE request to an API endpoint.
Tool for making a GET request to an API endpoint.
Tool for making a PATCH request to an API endpoint.
Tool for making a POST request to an API endpoint.
Tool for making a PUT request to an API endpoint.
Tool that explains images.
Tool that queries the SearchApi.io search API and returns JSON.
Tool that queries the SearchApi.io search API.
Tool that queries a Searx instance and gets back json.
Tool that queries a Searx instance.
Tool to run shell commands.
Tool that adds the capability to sleep.
Tool that uses StackExchange
Tool that searches the Wikipedia API.
Tool that queries using the Wolfram Alpha SDK.
Wrapper around ArxivAPI.
To use, you should have the arxiv python package installed.
https://lukasschwab.me/arxiv.py/index.html
This wrapper will use the Arxiv API to conduct searches and
fetch document summaries. By default, it will return the document summaries
of the top-k results.
If the query is in the form of arxiv identifier
(see https://info.arxiv.org/help/find/index.html), it will return the paper
corresponding to the arxiv identifier.
It limits the Document content by doc_content_chars_max.
Set doc_content_chars_max=None if you don't want to limit the content size.
Wrapper for AWS Lambda SDK.
To use, you should have the boto3 package installed
and a lambda functions built from the AWS Console or
CLI. Set up your AWS credentials with aws configure
Wrapper for Bing Web Search API.
Wrapper for OpenAI's DALL-E Image Generator.
https://platform.openai.com/docs/guides/images/generations?context=node
Usage instructions:
pip install openaiWrapper around the DataForSeo API.
Wrapper for DuckDuckGo Search API.
Free and does not require any setup.
Wrapper for Golden.
Docs for using:
Wrapper around Google Books API.
To use, you should have a Google Books API key available. This wrapper will use the Google Books API to conduct searches and fetch books based on a query passed in by the agents. By default, it will return the top-k results.
The response for each book will contain the book title, author name, summary, and a source link.
Wrapper for SerpApi's Google Finance API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the SerpApi.com python package:
https://serpapi.com/integrations/python
To use, you should have the environment variable SERPAPI_API_KEY
set with your API key, or pass serp_api_key as a named parameter
to the constructor.
Example:
.. code-block:: python
from langchain_community.utilities import GoogleFinanceAPIWrapper
google_Finance = GoogleFinanceAPIWrapper()
google_Finance.run('langchain')
Wrapper for SerpApi's Google Scholar API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the SerpApi.com python package:
https://serpapi.com/integrations/python
To use, you should have the environment variable SERPAPI_API_KEY
set with your API key, or pass serp_api_key as a named parameter
to the constructor.
Example:
.. code-block:: python
from langchain_community.utilities import GoogleJobsAPIWrapper
google_Jobs = GoogleJobsAPIWrapper()
google_Jobs.run('langchain')
Wrapper for SerpApi's Google Lens API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the SerpApi.com python package: https://serpapi.com/integrations/python
To use, you should have the environment variable SERPAPI_API_KEY
set with your API key, or pass serp_api_key as a named parameter
to the constructor.
Example: .. code-block:: python
from langchain_community.utilities import GoogleLensAPIWrapper
google_lens = GoogleLensAPIWrapper()
google_lens.run('langchain')
Wrapper for Google Scholar API
You can create serpapi key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the serpapi python package: https://serpapi.com/integrations/python#search-google-scholar
To use, you should have the environment variable SERP_API_KEY
set with your API key, or pass serp_api_key as a named parameter
to the constructor.
Wrapper around the Serper.dev Google Search API.
You can create a free API key at https://serper.dev.
To use, you should have the environment variable SERPER_API_KEY
set with your API key, or pass serper_api_key as a named parameter
to the constructor.
Wrapper for SerpApi's Google Scholar API
You can create SerpApi.com key by signing up at: https://serpapi.com/users/sign_up.
The wrapper uses the SerpApi.com python package: https://serpapi.com/integrations/python
To use, you should have the environment variable SERPAPI_API_KEY
set with your API key, or pass serp_api_key as a named parameter
to the constructor.
Example: .. code-block:: python
from langchain_community.utilities import GoogleTrendsAPIWrapper
google_trends = GoogleTrendsAPIWrapper()
google_trends.run('langchain')
Wrapper around GraphQL API.
To use, you should have the gql python package installed.
This wrapper will use the GraphQL API to conduct queries.
Wrapper for Merriam-Webster.
Docs for using:
Wrapper for Metaphor Search API.
Wrapper for OpenWeatherMap API using PyOWM.
Docs for using:
Wrapper around PubMed API.
This wrapper will use the PubMed API to conduct searches and fetch document summaries. By default, it will return the document summaries of the top-k results of an input search.
Wrapper for Reddit API
To use, set the environment variables REDDIT_CLIENT_ID,
REDDIT_CLIENT_SECRET, REDDIT_USER_AGENT to set the client ID,
client secret, and user agent, respectively, as given by Reddit's API.
Alternatively, all three can be supplied as named parameters in the
constructor: reddit_client_id, reddit_client_secret, and
reddit_user_agent, respectively.
Lightweight wrapper around requests library, with async support.
The main purpose of this wrapper is to always return a text output.
Wrapper around SearchApi API.
To use, you should have the environment variable SEARCHAPI_API_KEY
set with your API key, or pass searchapi_api_key
as a named parameter to the constructor.
Wrapper for Searx API.
To use you need to provide the searx host by passing the named parameter
searx_host or exporting the environment variable SEARX_HOST.
In some situations you might want to disable SSL verification, for example
if you are running searx locally. You can do this by passing the named parameter
unsecure. You can also pass the host url scheme as http to disable SSL.
Wrapper around SerpAPI.
To use, you should have the google-search-results python package installed,
and the environment variable SERPAPI_API_KEY set with your API key, or pass
serpapi_api_key as a named parameter to the constructor.
Wrapper for Stack Exchange API.
Messaging Client using Twilio.
To use, you should have the twilio python package installed,
and the environment variables TWILIO_ACCOUNT_SID, TWILIO_AUTH_TOKEN, and
TWILIO_FROM_NUMBER, or pass account_sid, auth_token, and from_number as
named parameters to the constructor.
Wrapper around WikipediaAPI.
To use, you should have the wikipedia python package installed.
This wrapper will use the Wikipedia API to conduct searches and
fetch page summaries. By default, it will return the page summaries
of the top-k results.
It limits the Document content by doc_content_chars_max.
Wrapper for Wolfram Alpha.
Docs for using:
Tool that queries the Google Cloud Text to Speech API.
In order to set this up, follow instructions at: https://cloud.google.com/text-to-speech/docs/before-you-begin
Tool that queries the Metaphor Search API and gets back json.