Polkadot AI Agent Kit is an open-source library designed to build AI Agents that interact with the Polkadot ecosystem. The library provides tools for wallet management, cross-chain transactions, NFT interactions, DeFi integrations, and interactions with Asset Hub and parachains such as People Chain and Kusama Chain. The project will be archived under the OpenGuild organization upon completion.
This project is organized as a monorepo with the following packages:
Package | Description | Key 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 |
packages/mcp/ |
Model Context Protocol server | • MCP server for AI assistant integration • Direct tool access for Claude Desktop, Cursor, and custom clients • Complete Polkadot ecosystem toolset (balance, transfer, staking, DeFi) • Cross-chain operations and XCM transfers • Nomination pool management and token swaps |
Explore real-world implementations:
- Node.js 18+
- pnpm (recommended package manager)
# 1. Clone the repository
git clone https://github.com/openguild-labs/polkadot-agent-kit.git
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 (requires Ollama)
pnpm run test:integration
We welcome contributions from the community! Please:
- Fork the repository.
- Create a new branch for your feature/bug fix.
- Submit a Pull Request with a detailed description of your changes.
This project is licensed under the MIT License.