Skip to content

elasticlabs-org/polkadot-agent-kit

Repository files navigation

Polkadot AI Agent Kit

Group 57

License: MIT Status: In Development NPM Package

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.

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

🔗 Examples

Explore real-world implementations:

🚀 How to Run the Monorepo

Prerequisites

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

Setup and Development Commands

# 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

🤝 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.

📜 License

This project is licensed under the MIT License.

About

Agent kit for interacting with Polkadot-SDK based blockchains

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5