Polkadot AI Agent Kit

November 18, 2025 ยท View on GitHub

Group 57

License: MIT Status: In Development NPM Package

Polkadot AI Agent Kit is an open-source library for building autonomous AI agents capable of executing complex operations within the Polkadot ecosystem. It provides a modular framework and high-level APIs to abstract the complexity of on-chain interactions.

๐Ÿ“ฆ Monorepo Structure

This project is organized as a monorepo with the following packages:

PackageDescriptionKey Features
packages/common/Shared utilities and type definitionsโ€ข Chain configurations and supported networks
โ€ข TypeScript interfaces and type definitions
โ€ข Utility functions for chain validation and filtering
โ€ข Common constants and enums used across packages
packages/core/Core Polkadot API functionalityโ€ข PolkadotApi implementation with multi-chain support
โ€ข Balance checking and native token transfers
โ€ข Cross-chain (XCM) transaction handling
โ€ข Dynamic chain initialization and management
โ€ข Transaction utilities and signing logic
packages/llm/LangChain integration for AI agentsโ€ข LangChain-compatible tools for blockchain operations
โ€ข AI agent interfaces and abstractions
โ€ข Tool definitions for balance checking, transfers, and XCM
โ€ข Dynamic chain initialization tools for AI agents
packages/sdk/Main SDK interfaceโ€ข PolkadotAgentKit - the primary class for developers
โ€ข High-level API that combines core and LLM functionality
โ€ข Comprehensive examples and documentation
โ€ข Integration tests and usage patterns

๐Ÿ”— Examples

Explore real-world implementations:

Application

๐Ÿš€ How to Run the Monorepo

Prerequisites

  • Node.js 22+
  • pnpm (recommended package manager)

Setup and Development Commands

# 1. Clone the repository
git clone https://github.com/elasticlabs-org/polkadot-agent-kit
cd polkadot-agent-kit

# 2. Install all dependencies
pnpm install

# 3. Build all packages
pnpm run build

# 4. Run unit tests across all packages
pnpm run test

# 5. Run end-to-end tests
pnpm run test:e2e

# 6. Run integration tests for testnet agent (requires Ollama)
pnpm run test:integration:testnet

# 7. Run integration tests for mainnet agent (requires Ollama)
pnpm run test:integration:mainnet

๐Ÿค Contributing

We welcome contributions from the community! Please:

  1. Fork the repository.
  2. Create a new branch for your feature/bug fix.
  3. Submit a Pull Request with a detailed description of your changes.

Acknowledgment

Proudly supported by Web3 Foundation Grants Program.


๐Ÿ“œ License

This project is licensed under the MIT License.