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.
This Jupyter Notebook demonstrates how to use the GraphQLAPIWrapper component with an Agent.
In this example, we’ll be using the public Star Wars GraphQL API available at the following endpoint: swapi-graphql.netlify.app/graphql .
First, you need to install httpx and gql Python packages.
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.