solana-agent-kit
Skill này làm gì
Skill này hướng dẫn xây agent AI bằng Solana Agent Kit, cho phép một mô hình AI thực hiện hành động trên blockchain. Nó dành cho nhà phát triển muốn có trợ lý AI làm việc được với Solana.
Khi nào nên dùng
- ✓Khi bạn muốn một agent AI có thể phát hành token, giao dịch hoặc staking trên Solana.
- ✓Khi bạn kết nối các hành động Solana với LangChain, Vercel AI SDK hoặc máy chủ MCP.
- ✓Khi bạn muốn một agent Solana tự động có khả năng phục hồi lỗi.
Liên kết skill
https://github.com/internet-court/internet-court-skill/blob/main/vendored/sendaifun/solana-agent-kit/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Bạn có thể thiết lập một agent AI bằng Solana Agent Kit để kiểm tra số dư và hoán đổi token cho tôi không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent cài bộ công cụ lõi cùng các plugin bạn cần, đặt RPC URL và khóa ví từ biến môi trường, rồi kết nối các hành động với mô hình AI của bạn. Nó có thể chạy tương tác hoặc hoàn toàn tự động.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
Solana Agent Kit Development Guide
Build AI agents that autonomously execute 60+ Solana blockchain operations using SendAI's open-source toolkit. Compatible with LangChain, Vercel AI SDK, and Claude via MCP.
Overview
The Solana Agent Kit enables any AI model to:
- Deploy and manage tokens (SPL & Token-2022)
- Create and trade NFTs via Metaplex
- Execute DeFi operations (Jupiter, Raydium, Orca, Meteora)
- Stake SOL, bridge tokens, register domains
- Run in interactive or fully autonomous modes
Key Features
| Feature | Description |
|---|---|
| 60+ Actions | Token, NFT, DeFi, staking, bridging operations |
| Plugin Architecture | Modular - use only what you need |
| Multi-Framework | LangChain, Vercel AI SDK, MCP, Eliza |
| Model Agnostic | Works with OpenAI, Claude, Llama, Gemini |
| Autonomous Mode | Hands-off execution with error recovery |
Quick Start
Installation
# Core package
npm install solana-agent-kit
# With plugins (recommended)
npm install solana-agent-kit \
@solana-agent-kit/plugin-token \
@solana-agent-kit/plugin-nft \
@solana-agent-kit/plugin-defi \
@solana-agent-kit/plugin-misc \
@solana-agent-kit/plugin-blinks
Environment Setup
# .env file
OPENAI_API_KEY=your_openai_api_key
RPC_URL=https://api.mainnet-beta.solana.com # or devnet
SOLANA_PRIVATE_KEY=your_base58_private_key
# Optional API keys for enhanced features
COINGECKO_API_KEY=your_coingecko_key
HELIUS_API_KEY=your_helius_key
Basic Agent Setup
import {
SolanaAgentKit,
createVercelAITools,
KeypairWallet,
} from "solana-agent-kit";
import { Keypair } from "@solana/web3.js";
import bs58 from "bs58";
// Import plugins
import TokenPlugin from "@solana-agent-kit/plugin-token";
import NFTPlugin from "@solana-agent-kit/plugin-nft";
import DefiPlugin from "@solana-agent-kit/plugin-defi";
import MiscPlugin from "@solana-agent-kit/plugin-misc";
import BlinksPlugin from "@solana-agent-kit/plugin-blinks";
// Create wallet from private key
const privateKey = bs58.decode(process.env.SOLANA_PRIVATE_KEY!);
const keypair = Keypair.fromSecretKey(privateKey);
const wallet = new KeypairWallet(keypair);
// Initialize agent with plugins
const agent = new SolanaAgentKit(
wallet,
process.env.RPC_URL!,
{
OPENAI_API_KEY: process.env.OPENAI_API_KEY!,
}
)
.use(TokenPlugin)
.use(NFTPlugin)
.use(DefiPlugin)
.use(MiscPlugin)
.use(BlinksPlugin);
// Create tools for AI framework
const tools = createVercelAITools(agent, agent.actions);
Plugins & Actions
Token Plugin (@solana-agent-kit/plugin-token)
| Action | Description |
|---|---|
deployToken |
Deploy new SPL token or Token-2022 |
transfer |
Transfer SOL or SPL tokens |
getBalance |
Check token balances |
stake |
Stake SOL via Jupiter/Solayer |
bridge |
Bridge tokens via Wormhole |
rugCheck |
Analyze token safety |
// Deploy a new token
const result = await agent.methods.deployToken({
name: "My Token",
symbol: "MTK",
decimals: 9,
initialSupply: 1000000,
});
// Transfer tokens
await agent.methods.transfer({
to: "recipient_address",
amount: 100,
mint: "token_mint_address", // optional, defaults to SOL
});
// Check balance
const balance = await agent.methods.getBalance({
tokenAddress: "token_mint_address", // optional
});
NFT Plugin (@solana-agent-kit/plugin-nft)
| Action | Description |
|---|---|
createCollection |
Create NFT collection via Metaplex |
mintNFT |
Mint NFT to collection |
listNFT |
List NFT on marketplaces |
updateMetadata |
Update NFT metadata |
// Create collection
const collection = await agent.methods.createCollection({
name: "My Collection",
symbol: "MYCOL",
uri: "https://arweave.net/metadata.json",
});
// Mint NFT to collection
const nft = await agent.methods.mintNFT({
collectionMint: collection.collectionAddress,
name: "NFT #1",
uri: "https://arweave.net/nft1.json",
});
DeFi Plugin (@solana-agent-kit/plugin-defi)
| Action | Description |
|---|---|
trade |
Swap tokens via Jupiter |
createRaydiumPool |
Create Raydium AMM pool |
createOrcaPool |
Create Orca Whirlpool |
createMeteoraPool |
Create Meteora DLMM pool |
limitOrder |
Place limit order via Manifest |
lend |
Lend assets via Lulo |
perpetualTrade |
Trade perps via Adrena/Drift |
Câu hỏi thường gặp
Skill làm việc với những mô hình AI nào?
Skill nói nó hoạt động với OpenAI, Claude, Llama và Gemini.
Tôi có thể chỉ dùng một số hành động không?
Có. Bộ công cụ hoạt động theo plugin, nên bạn chỉ cần cài các plugin mình dùng.
Private key được lưu ở đâu?
Skill nói nên lưu trong biến môi trường, không đặt trong mã.
Chi tiết
Mô tả gốc của tác giả
Comprehensive guide for building AI agents that interact with Solana blockchain using SendAI's Solana Agent Kit. Covers 60+ actions, LangChain/Vercel AI integration, MCP server setup, and autonomous agent patterns.
Độ phổ biến
- Sao GitHub
- 7.0k
- Vị trí xếp hạng
- #13681
- Giấy phép
- —
- Cập nhật
- 26/10/2026
Bình luận
- …
Thêm skill từ kho mã này
internet-court
7.0kGiúp agent của bạn thanh toán, thuê hoặc giao dịch an toàn với một agent AI khác hoặc dịch vụ trả phí, và chỉ đến hướng dẫn chuyên sâu phù hợp.
genlayer-erc7710-connector
7.0kGiúp agent của bạn kết nối kết quả đánh giá AI với hệ thống quyền hạn, để một đánh giá xấu có thể hạn chế hoặc hủy quyền của agent.
genlayer-intelligent-contracts
7.0kGiúp agent của bạn xác định quy tắc, bằng chứng và đầu ra của một AI judge kiểm tra xem agent khác có làm đúng nhiệm vụ được ủy quyền hay không.
x402-erc7710
7.0kGiúp agent của bạn trả tiền cho dịch vụ web theo từng yêu cầu, và thiết lập chi tiêu định kỳ nằm trong ngân sách quyền hạn.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.