Polkadot AI Agent Kit
November 18, 2025 ยท View on GitHub
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:
| 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 |
๐ 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:
- Fork the repository.
- Create a new branch for your feature/bug fix.
- 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.