Skip to content

edgeware-network/agent-dot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

43 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🌐 AgentDOT – Polkadot AI Assistant

AgentDOT Logo

AI-powered blockchain interactions for the Polkadot ecosystem

Version

Node.js Version Next.js TypeScript License pnpm PRs Welcome

πŸš€ Quick Start β€’ πŸ“– Documentation β€’ 🀝 Contributing β€’ πŸ“„ License


πŸ“– Table of Contents


✨ Overview

AgentDOT is a cutting-edge Next.js 15 application that seamlessly integrates AI capabilities with the Polkadot blockchain ecosystem. Built with modern web technologies and a focus on user experience, it delivers intelligent blockchain interactions through an intuitive, responsive interface.

🎯 Key Features

  • πŸ€– AI-Powered Interactions – Intelligent blockchain agent actions and recommendations
  • ⚑ Next.js 15 App Router – Modern server components, streaming, and optimized routing
  • πŸ›  TypeScript – Type-safe, maintainable, and scalable codebase
  • 🌐 Multi-Chain Support – Polkadot, Edgeware, Westend, and more
  • πŸ’° DeFi Functionality – Staking, nomination pools, and yield optimization
  • πŸ”„ XCM Transfers – Seamless cross-chain asset transfers
  • πŸ“± Responsive Design – Mobile-first approach with modern UI/UX
  • πŸ” Wallet Integration – Support for major Polkadot wallets
  • 🎨 Modern UI Components – Built with Tailwind CSS and custom components

πŸ›  Tech Stack

🎨 Frontend & Framework

Technology Version Purpose
Next.js 15.4.6 React framework with App Router
React 19.1.1 UI library with latest features
TypeScript 5.9.2 Type-safe JavaScript
Tailwind CSS 4.1.11 Utility-first CSS framework

⛓️ Blockchain & Polkadot

Technology Version Purpose
polkadot-api 1.15.4 Polkadot JavaScript API
@polkadot/util 13.5.4 Polkadot utilities
@paraspell/sdk 10.11.7 XCM transfer SDK

πŸ€– AI & Intelligence

Technology Version Purpose
Vercel AI SDK 5.0.8 AI integration framework
@ai-sdk/react 2.0.8 React AI components
@ai-sdk/openai 2.0.7 OpenAI integration

πŸ› οΈ Development Tools

Technology Version Purpose
pnpm Workspace Fast package manager
ESLint 9.33.0 Code linting
Prettier 3.6.2 Code formatting
Husky 9.1.7 Git hooks

πŸ“‹ Prerequisites

Before starting, ensure you have:

πŸ’‘ Pro Tip: Use a Node version manager like nvm or fnm to easily switch between Node.js versions.

Node.js Installation

We recommend using a Node version manager:

Using nvm (Node Version Manager):

# Install nvm (if not already installed)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash

# Install and use Node.js v22.15.1
nvm install 22.15.1
nvm use 22.15.1

Using fnm (Fast Node Manager):

# Install fnm (if not already installed)
curl -fsSL https://fnm.vercel.app/install | bash

# Install and use Node.js v22.15.1
fnm install 22.15.1
fnm use 22.15.1

pnpm Installation

# Install pnpm globally
npm install -g pnpm

# Verify installation
pnpm --version

πŸš€ Quick Start

1. Clone the Repository

git clone https://github.com/edgeware-network/agent-dot.git
cd agent-dot

2. Install Dependencies

# Using pnpm (recommended)
pnpm install

# Or using npm
npm install

# Or using yarn
yarn install

3. Set Up Environment Variables

Create a .env.local file in the root directory:

cp .env.example .env.local

Edit .env.local with your configuration:

# OpenAI API Key (required for AI features)
OPENAI_API_KEY=your_openai_api_key_here

# Database URL (if using external database)
DATABASE_URL=your_database_url_here

# Other configuration variables
NEXT_PUBLIC_APP_NAME=AgentDOT

4. Run the Development Server

# Using pnpm
pnpm dev

# Or using npm
npm run dev

# Or using yarn
yarn dev

Open http://localhost:3000 in your browser to see the application.

5. Build for Production

# Build the application
pnpm build

# Start production server
pnpm start

🌐 Supported Networks

AgentDOT supports multiple Polkadot networks and parachains:

Network Type Status Features
Polkadot Mainnet βœ… Active Full functionality
Westend Testnet βœ… Active Testing & development
Paseo Testnet βœ… Active Testing & development

πŸ“š Features

πŸ€– AI-Powered Blockchain Agents

AgentDOT features a comprehensive suite of intelligent agents that handle various blockchain operations:

πŸ”Identity & Account Management

  • Account Discovery – Automatically detect and manage connected wallet accounts
  • Network Switching – Seamlessly switch between Polkadot networks (Polkadot, Edgeware, Westend, Paseo)
  • Balance Monitoring – Real-time balance checking across multiple networks
  • Active Account Management – Set and manage active accounts for transactions

πŸ’° Transfer

  • Token Transfers – Execute native token transfers on any supported network
  • Address Validation – Automatic SS58 address validation for security
  • Transaction Preparation – Prepare and confirm transfers with proper error handling
  • Multi-Token Support – Transfer DOT, WND, PAS, and other network tokens

⚑ Staking

  • Bonding Operations – Bond tokens for staking with configurable reward destinations
  • Validator Nomination – Nominate trusted validators for optimal staking rewards
  • Unbonding Management – Manage unbonding periods and withdrawal schedules
  • Multi-Network Support – Staking operations across Polkadot, Westend, and Paseo
  • Reward Configuration – Configure where staking rewards are sent (re-bond, stash, controller, or specific account)

🏊 Nomination Pools

  • Pool Participation – Join existing nomination pools with minimal token requirements
  • Additional Bonding – Add more tokens to increase staking rewards
  • Reward Restaking – Automatically re-stake accumulated rewards
  • Pool Management – Unbond from pools when needed
  • Minimum Bond Requirements – Network-specific minimum bond amounts enforced

🌐 XCM (Cross-Chain)

  • Cross-Chain Transfers – Teleport tokens between different Polkadot networks
  • Asset Hub Integration – Seamless transfers to and from Asset Hub parachains
  • Network Discovery – Automatically detect available system and relay chains
  • Asset Support Validation – Verify asset compatibility before transfers
  • Multi-Token XCM – Support for DOT, WND, and PAS cross-chain transfers

πŸ” Wallet Integration

  • Multi-Wallet Support – Talisman, Polkadot.js, SubWallet, and more
  • Account Management – Easy account switching and management
  • Security Features – Secure transaction signing and validation
  • SS58 Address Validation – Built-in address format verification

πŸ“– Documentation

Available Scripts

Command Description
pnpm dev Start development server with Turbopack
pnpm build Build the application for production
pnpm start Start production server
pnpm lint Run ESLint for code quality
pnpm format Check code formatting with Prettier
pnpm format:fix Fix code formatting issues
pnpm tsc Run TypeScript type checking

Database Commands

Command Description
pnpm db:generate Generate new database migrations
pnpm db:migrate Run database migrations
pnpm db:push Push schema changes to database
pnpm db:pull Pull database schema

πŸ—οΈ Architecture

agent-dot/
β”œβ”€β”€ app/                    # Next.js 15 App Router
β”‚   β”œβ”€β”€ (chat)/           # Chat interface routes
β”‚   β”œβ”€β”€ api/              # API routes
β”‚   └── globals.css       # Global styles
β”œβ”€β”€ agents/               # AI agent implementations
β”‚   β”œβ”€β”€ tools/            # Agent tools and utilities
β”‚   └── index.ts          # Agent exports
β”œβ”€β”€ components/           # Reusable UI components
β”‚   β”œβ”€β”€ ui/              # Base UI components
β”‚   └── account/         # Account-related components
β”œβ”€β”€ hooks/               # Custom React hooks
β”œβ”€β”€ lib/                 # Utility libraries
β”œβ”€β”€ providers/           # React context providers
└── types/               # TypeScript type definitions

🀝 Contributing

We welcome contributions from the community! Here's how you can help:

πŸ› Reporting Issues

  • Use the GitHub issue tracker
  • Include detailed reproduction steps
  • Attach relevant logs and screenshots

πŸ’‘ Suggesting Features

  • Open a feature request issue
  • Describe the use case and expected behavior
  • Consider contributing the implementation

πŸ’» Code Style

  • Follow TypeScript best practices
  • Use Prettier for code formatting
  • Follow ESLint rules
  • Write meaningful commit messages

βœ… Commit Convention

We use Conventional Commits:

type(scope): message

Examples:


feat(ui): add new feature
fix(ui): bug fix
docs(readme): documentation changes
style(lint): formatting changes
refactor(hooks): code refactoring
test(app): adding tests
chore(deps): maintenance tasks


πŸ”§ Contributing Code

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and commit: git commit -m 'Add amazing feature'
  4. Push to the branch: git push origin feature/amazing-feature
  5. Open a Pull Request

πŸ“‹ Development Guidelines

  • Follow the existing code style and conventions
  • Add tests for new functionality
  • Update documentation as needed
  • Ensure all tests pass before submitting

πŸ› Troubleshooting

Common Issues

πŸ”΄ Build Errors

# Clear Next.js cache
rm -rf .next
pnpm install
pnpm dev

πŸ”΄ Dependency Issues

# Clear pnpm cache
pnpm store prune
pnpm install

πŸ”΄ Database Connection Issues

  • Verify your .env.local configuration
  • Ensure the database is running and accessible
  • Check network connectivity

πŸ”΄ AI Features Not Working

  • Verify your OpenAI API key is valid
  • Check API rate limits and quotas
  • Ensure proper environment variable configuration

Getting Help


πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

  • Polkadot Community – For the amazing blockchain ecosystem
  • Next.js Team – For the incredible React framework
  • OpenAI – For powering our AI features
  • Contributors – Everyone who has contributed to this project

Made with ❀️ by the EdgetributorSubDAO Team

🌐 Website β€’ 🐦 Twitter β€’ πŸ’¬ Discord

About

AgentDot is AI-Powered Interaction Layer for the Polkadot ecosystem.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •