text: Skip to main contentğŸ¦œï¸�ğŸ”— LangChainDocsUse casesIntegrationsAPILangSmithJS/TS DocsCTRLKIntegrationsCallbacksChat modelsDocument loadersDocument transformersLLMsMemoryRetrieversText embedding modelsAgent toolkitsToolsApifyArXiv API ToolawslambdaShell ToolBing SearchBrave SearchChatGPT PluginsDataForSeo API WrapperDuckDuckGo SearchFile System ToolsGolden QueryGoogle PlacesGoogle SearchGoogle Serper APIGradio ToolsGraphQL toolhuggingface_toolsHuman as a toolIFTTT WebHooksLemon AI NLP Workflow AutomationMetaphor SearchOpenWeatherMap APIPubMed ToolRequestsSceneXplainSearch ToolsSearxNG Search APISerpAPITwilioWikipediaWolfram AlphaYouTubeSearchToolZapier Natural Language Actions APIVector storesGrouped by providerIntegrationsToolsGraphQL toolGraphQL toolThis Jupyter Notebook demonstrates how to use the BaseGraphQLTool component with an Agent.GraphQL is a query language for APIs and a runtime for executing those queries against your data. GraphQL provides a complete and understandable description of the data in your API, gives clients the power to ask for exactly what they need and nothing more, makes it easier to evolve APIs over time, and enables powerful developer tools.By including a BaseGraphQLTool in the list of tools provided to an Agent, you can grant your Agent the ability to query data from GraphQL APIs for any purposes you need.In this example, we'll be using the public Star Wars GraphQL API available at the following endpoint: https://swapi-graphql.netlify.app/.netlify/functions/index.First, you need to install httpx and gql Python packages.pip install httpx gql > /dev/nullNow, let's create a BaseGraphQLTool instance with the specified Star Wars API endpoint and initialize an Agent with the tool.from langchain import OpenAIfrom langchain.agents import load_tools, initialize_agent,