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

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

📜 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