graphql-agent-tool
v0.0.2
Published
A LangChain tool for executing GraphQL queries and mutations
Maintainers
Readme
GraphQL Agent Tool
A powerful LangChain tool that enables LLM models and AI agents to autonomously execute GraphQL queries and mutations. This package allows AI agents to intelligently interact with GraphQL APIs, making decisions about when and how to fetch or modify data through GraphQL endpoints without explicit human intervention.
Features
- 🤖 Autonomous GraphQL operation execution by AI agents
- 🔄 Intelligent query/mutation selection based on agent's needs
- 🛠️ Type-safe implementation with TypeScript
- 🔌 Seamless integration with LangChain/Langgraph/LLM Models
- 🎯 Customizable response parsing for agent consumption
- 🔒 Secure configuration options
- 📝 Comprehensive documentation
- 🧪 Test coverage - 100%
Installation
# Using npm
npm install graphql-agent-tool
# Using yarn
yarn add graphql-agent-tool
# Using pnpm
pnpm add graphql-agent-toolPrerequisites
- Node.js >= 20.0.0
- TypeScript >= 5.0.4 (optional but recommended)
Documentation
For detailed documentation and examples, please refer to our guides:
- Getting Started Guide 🧭 - Learn how to integrate the GraphQL Agent Tool with your LLM model
- API Documentation 📚 - Complete API reference
Development
Setup
- Clone the repository
- Install dependencies:
pnpm install
Available Scripts
pnpm build- Build the packagepnpm test- Run testspnpm test:watch- Run tests in watch modepnpm test:coverage- Run tests with coveragepnpm lint- Run linterpnpm format- Format codepnpm typecheck- Type check the codebase
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Sohab Sk - GitHub
