AI Personal Learning
and practical guidance
豆包Marscode1

Solana Agent Kit: an open source toolkit for connecting AI intelligences to the Solana protocol

General Introduction

Solana Agent Kit is an open source toolkit designed to seamlessly connect AI intelligences to the Solana blockchain protocol. Both AI researchers and cryptocurrency developers can use any model-trained intelligent body to perform over 60 Solana operations through the kit, including token trading, asset lending and borrowing, compressed airdrops, NFT creation and management, and more. The toolkit supports LangChain and Vercel AI SDK integrations, providing automation mode and interactive chat mode for easy blockchain operations and AI integration.

Solana Agent Kit:连接AI智能体与Solana协议的开源工具包-1


 

Function List

  • Token operations: deployment of SPL tokens, asset transfers, balance checks, SOL pledges
  • DeFi Integration: Jupiter Exchange Exchange, Raydium Pool Creation, Orca Whirlpool Integration
  • NFT management: creation and automated shelving of NFTs, metadata management, royalty configuration
  • Automation Mode: Independent Intelligent Body Operation, Configurable Operation Interval, Built-in Error Handling and Recovery
  • AI tools: DALL-E integration to generate NFT artwork, natural language processing of blockchain commands, market analysis of price feeds
  • LangChain integration: off-the-shelf tools for blockchain operations, memory management for persistent interactions, streaming responses with real-time feedback

 

Using Help

Installation process

  1. Cloning Warehouse:
   git clone https://github.com/sendaifun/solana-agent-kit.git
  1. Go to the project directory and install the dependencies:
   cd solana-agent-kit
npm install
  1. Configure environment variables:
    • establish.envfile and add the following:
      WALLET_PRIVATE_KEY=你的钱包私钥
      RPC_URL=https://api.mainnet-beta.solana.com
      OPENAI_API_KEY=你的OpenAI API密钥

Guidelines for use

  1. Initialize the Solana Agent Kit:
   import { SolanaAgentKit, createSolanaTools } from "solana-agent-kit";
const agent = new SolanaAgentKit("你的钱包私钥", "https://api.mainnet-beta.solana.com", "你的OpenAI API密钥");
const tools = createSolanaTools(agent);
  1. Execute token transactions:
   await tools.tradeTokens("代币A", "代币B", 数量);
  1. Create and manage NFTs:
   await tools.createNFT("NFT名称", "描述", "图像URL");
await tools.listNFT("NFT ID", "价格");
  1. Blockchain operations using LangChain:
   const response = await agent.execute("创建一个新的SPL代币");
console.log(response);
  1. Automated mode:
    • Configure the operation interval and error handling: javascript
      agent.setActionInterval(60000); // 每60秒执行一次操作
      agent.onError((error) => {
      console.error("操作失败:", error);
      });

Detailed function operation flow

  • token operation: Deploy SPL tokens via Metaplex for asset transfers and balance checks, support SOL pledges and compressed airdrops.
  • DeFi integration: Integration with platforms such as Jupiter, Raydium, Orca, etc. to support exchange swapping, pool creation and dynamic AMM operations.
  • NFT Management: Create NFT collections and automate shelving, manage metadata and royalty configurations, and support NFT trading on the 3.land platform.
  • AI tools: Integrate DALL-E to generate NFT artwork, use natural language processing for blockchain command operations, and provide price feeds for market analysis.
  • LangChain Integration: Provides off-the-shelf blockchain manipulation tools that support memory management for persistent interactions and streaming responses with real-time feedback.
May not be reproduced without permission:Chief AI Sharing Circle " Solana Agent Kit: an open source toolkit for connecting AI intelligences to the Solana protocol
en_USEnglish