solana-agent-kit

Build AI agents that execute Solana blockchain operations via LangChain, Vercel AI SDK, or MCP.

6|20|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/andresdefi/cryptoskills --skill solana-agent-kit-andresdefi
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: solana-agent-kit
Source: https://github.com/andresdefi/cryptoskills/tree/main/skills/solana-agent-kit
Command: npx skills add https://github.com/andresdefi/cryptoskills --skill solana-agent-kit-andresdefi

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI models lack current knowledge of Solana protocols, SDK patterns, and on-chain operations, causing hallucinated tool calls and failed transactions when building blockchain agents. This Skill provides accurate, structured guidance for wiring SendAI's Solana Agent Kit into LangChain, Vercel AI SDK, or Claude via MCP so agents can execute real on-chain actions. ## Core Features & Use Cases - 60+ On-Chain Actions: Deploy SPL tokens, swap via Jupiter, create Raydium/Orca/Meteora pools, mint Metaplex NFTs, stake SOL, and register .sol domains through a plugin-based architecture. - Multi-Framework Integration: Ready-made patterns for LangChain ReAct agents, Vercel AI SDK streaming apps, and a Claude Desktop MCP server configuration. - Autonomous Agent Patterns: Event-driven triggers, DCA and take-profit strategies, safety guardrails with transaction limits, and error recovery loops. - Use Case: A developer wants Claude Desktop to check a wallet balance and swap 0.1 SOL for USDC. The Skill provides the exact MCP server config, environment variables, and security practices to make it work on devnet before mainnet. ## Quick Start Ask the agent to set up a Solana Agent Kit project with the token and DeFi plugins, then have it check your wallet balance and swap a small amount of SOL for USDC on devnet.

Frequently Asked Questions about solana-agent-kit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I build an AI agent that swaps tokens on Solana?

Install solana-agent-kit with the DeFi plugin, initialize it with a KeypairWallet and RPC URL, then expose its actions as tools to LangChain or Vercel AI SDK. The trade action routes swaps through Jupiter with configurable slippage in basis points.

How to connect Claude Desktop to Solana using MCP?

Install the solana-mcp package and add an mcpServers entry to claude_desktop_config.json with your RPC_URL and SOLANA_PRIVATE_KEY environment variables. After restarting Claude Desktop, tools like BALANCE, TRANSFER, TRADE, and DEPLOY_TOKEN become available.

What is the difference between Solana Agent Kit V1 and V2?

V2 replaces direct private key input with embedded wallets like Turnkey and Privy, and splits 100+ tools into modular plugins so you load only what you need. This reduces LLM hallucinations and adds human-in-the-loop confirmation support.

Why does my Solana agent hallucinate non-existent tools?

Tool hallucination happens when too many tools are loaded or descriptions are vague. Load only the plugins you need, list available tool names explicitly in the system prompt, and lower the LLM temperature for more deterministic tool selection.

Can I run a Solana agent autonomously with spending limits?

Yes, wrap agent execution in a guardrail layer that enforces max transaction value, daily spending caps, token whitelists, and blocked actions. The Skill includes patterns for autonomous loops with error recovery and event-driven triggers via account subscriptions.

Why do Solana agent transactions fail with blockhash errors?

Blockhash errors occur when transactions take too long to confirm and the recent blockhash expires. Fetch a fresh blockhash with getLatestBlockhash before sending, and use sendAndConfirmTransaction with retries enabled.