graphql-agent-tool
TypeScript icon, indicating that this package has built-in type declarations

0.0.2 • Public • Published

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.

npm version License: MIT TypeScript

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-tool

Prerequisites

  • Node.js >= 20.0.0
  • TypeScript >= 5.0.4 (optional but recommended)

Documentation

For detailed documentation and examples, please refer to our guides:

Development

Setup

  1. Clone the repository
  2. Install dependencies:
    pnpm install

Available Scripts

  • pnpm build - Build the package
  • pnpm test - Run tests
  • pnpm test:watch - Run tests in watch mode
  • pnpm test:coverage - Run tests with coverage
  • pnpm lint - Run linter
  • pnpm format - Format code
  • pnpm 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

Acknowledgments

  • LangChain for the amazing framework
  • Axios for the HTTP client
  • Zod for runtime type checking

/graphql-agent-tool/

    Package Sidebar

    Install

    npm i graphql-agent-tool

    Weekly Downloads

    4

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    18.8 kB

    Total Files

    18

    Last publish

    Collaborators

    • sohabsk