A comprehensive toolkit of 27 JavaScript tools for Solana development. Built by AI agents, for AI agents and developers.
๐ฆ GitHub Repository | ๐ Documentation | ๐ค For AI Agents
Unlike traditional CLI tools, every function in this toolkit is built to be called programmatically by AI agents. No interactive prompts, no human-in-the-loop requirementsโjust clean, composable JavaScript functions that AI systems can orchestrate autonomously.
27 production-ready tools covering the entire Solana development lifecycle:
- Wallet management and token operations
- Jupiter swaps (v6 + Ultra API)
- NFT creation via Metaplex
- DeFi yield optimization and tracking
- Automated trading strategies
- Price monitoring and alerts
This toolkit was architected, coded, and tested by Blanco, an AI agent running on OpenClaw, with human oversight from Eirik. The tools reflect an AI's perspective on what makes an API truly machine-usable.
Speed โ 400ms average confirmation time enables real-time trading strategies that would be impossible on slower chains.
Cost โ At $0.00025 per transaction, automation is economically viable. A DCA bot making 100 trades costs just $0.025 in fees.
Ecosystem โ Deep integrations with:
- Jupiter โ Best-in-class swap aggregation (v6 + Ultra API 2025)
- Metaplex โ Mature NFT infrastructure with Umi framework
- SPL Token Program โ Standardized token operations
- JLP (Jupiter Liquidity Provider) โ 14%+ APY with auto-compounding
| Integration | API/Tool | Use Case |
|---|---|---|
| Jupiter | Ultra API v1 | Fastest swap execution (2025) |
| Jupiter | Quote API v6 | Route optimization |
| Metaplex | Umi Framework | NFT minting & collections |
| Solana | Web3.js | Core blockchain operations |
| Solana | SPL Token | Token transfers & minting |
For Humans:
git clone https://github.com/ebreen/solana-agent-toolkit.git
cd solana-agent-toolkit
npm installFor LLM Agents (Claude Code, Cursor, etc.):
Clone the Solana Agent Toolkit repository and install dependencies:
git clone https://github.com/ebreen/solana-agent-toolkit.git && cd solana-agent-toolkit && npm install
Then explore the src/ directory to understand the available tools for:
- Wallet operations (src/wallet/)
- Token management (src/tokens/)
- Trading and swaps (src/trading/)
- Yield optimization (src/yield/)
- NFT operations (src/nft/)
- Automation (src/automation/)
- Monitoring (src/monitoring/)
This toolkit enables a Plan-Execute-Iterate workflow for autonomous AI agents:
// Agent analyzes opportunities
const scanner = await import('./src/yield/protocol-scanner.js');
const opportunities = await scanner.scan();
// Agent runs simulations
const simulator = await import('./src/yield/jlp-simulator.js');
const projection = await simulator.run(10000, 14.5, 365);
// Returns: { expectedReturn: 15500, confidence: 0.87 }
// Agent compares options
const bestYield = opportunities
.filter(o => o.tvl > 10000000) // Minimum $10M TVL
.sort((a, b) => b.apy - a.apy)[0];// Agent executes optimal strategy
if (projection.confidence > 0.8) {
// Execute swap via Jupiter Ultra API
const swap = await import('./src/trading/ultra-swap.js');
const result = await swap.execute('USDC', 'JLP', 10000);
// Track the new position
const tracker = await import('./src/yield/position-tracker.js');
await tracker.addPosition('JLP Position', 'JLP', 10000, 'lp');
// Set up monitoring
const monitor = await import('./src/monitoring/price-monitor.js');
await monitor.addAlert('JLP', 'below', 1.80, 'Rebalance trigger');
}// Continuous monitoring loop
const priceMonitor = await import('./src/monitoring/price-monitor.js');
const alerts = await priceMonitor.checkAlerts();
for (const alert of alerts.triggered) {
if (alert.token === 'JLP' && alert.type === 'below') {
// Agent evaluates rebalancing
const current = await tracker.getPosition('JLP Position');
const alternative = await scanner.findBetterYield(current.apy + 2);
if (alternative) {
// Execute rebalancing
await swap.execute('JLP', alternative.token, current.amount);
await tracker.updatePosition('JLP Position', alternative.token, current.amount);
}
}
}| Capability | Toolkit Support |
|---|---|
| State Persistence | JSON-based state files (DCA bot, price alerts, positions) |
| Error Handling | Comprehensive try/catch with actionable error messages |
| Dry Run Mode | Test transactions without execution (--dry-run flag) |
| Composability | Each tool returns structured data for chaining |
| Logging | All operations logged with timestamps and transaction hashes |
27 Tools Across 8 Categories:
๐ src/wallet/ (3) Wallet operations
๐ src/tokens/ (4) SPL token management
๐ src/trading/ (6) Swaps, trading, arbitrage
๐ src/yield/ (7) DeFi, yield tracking, simulation
๐ src/nft/ (2) NFT minting & collections
๐ src/automation/ (2) DCA bots, monitoring
๐ src/monitoring/ (1) Price alerts
๐ src/utils/ (2) Transaction parsing, bounty tracking
| Tool | Purpose | Key Function |
|---|---|---|
create-wallet.js |
Generate new wallets | createWallet() returns keypair |
check-balance.js |
Query SOL balance | checkBalance(publicKey) |
transfer.js |
Send SOL | transfer(recipient, amount) |
| Tool | Purpose | Key Function |
|---|---|---|
create-token-mint.js |
Create SPL tokens | createMint(decimals) |
mint-tokens.js |
Mint to wallet | mint(mintAddress, amount) |
transfer-tokens.js |
Send SPL tokens | transferToken(mint, to, amount) |
token-launch.js |
Launch preparation | prepareLaunch(config) |
| Tool | Purpose | Key Function |
|---|---|---|
swap-tokens.js |
Jupiter v6 swaps | swap(inputMint, outputMint, amount) |
ultra-swap.js |
Jupiter Ultra API | ultraSwap(input, output, amount, slippage) |
arbitrage-scanner.js |
Find arbitrage | scan(minProfitPct) returns opportunities |
check-prices.js |
Real-time prices | getPrice(token) |
portfolio.js |
Track holdings | getPortfolio(wallet) |
dashboard.js |
Trading analytics | CLI dashboard with P&L |
| Tool | Purpose | Key Function |
|---|---|---|
yield-dashboard.js |
Compare yields | getYields() returns all opportunities |
protocol-scanner.js |
Opportunity scanner | scanProtocols() 2026 DeFi landscape |
jlp-monitor.js |
JLP tracking | getJlpInfo() real-time stats |
jlp-simulator.js |
Monte Carlo sim | simulate(principal, apy, days) |
position-tracker.js |
Position management | trackPosition(name, token, amount) |
escrow-tool.js |
Time-locked transfers | createEscrow(recipient, amount, minutes) |
test-transfer.js |
Testing utilities | testTransfer() devnet validation |
| Tool | Purpose | Key Function |
|---|---|---|
create-nft.js |
Single NFT mint | createNFT(name, symbol, uri, royalty) |
create-collection.js |
Batch minting | createCollection(name, symbol, baseUri, count) |
| Tool | Purpose | Key Function |
|---|---|---|
dca-bot.js |
Dollar-cost averaging | startDCA(config) with state persistence |
monitor.js |
Balance monitoring | monitor(wallet, interval) |
| Tool | Purpose | Key Function |
|---|---|---|
price-monitor.js |
Price alerts | addAlert(token, type, price, note) |
| Tool | Purpose | Key Function |
|---|---|---|
tx-parser.js |
Parse transactions | parse(txHash) returns structured data |
bounty-tracker.js |
Bounty management | trackBounty(bounty) including this one! |
- Node.js 18+
- npm or yarn
- Solana wallet (devnet recommended for testing)
# Clone the repository
git clone https://github.com/ebreen/solana-agent-toolkit.git
cd solana-agent-toolkit
# Install dependencies
npm install
# Set up your wallet (for devnet testing)
cp wallet.example.json wallet.json
# Edit wallet.json with your devnet keypair# Check your balance
node src/wallet/check-balance.js
# Get current SOL price
node src/trading/check-prices.js
# View yield opportunities
node src/yield/yield-dashboard.js
# Start monitoring prices
node src/monitoring/price-monitor.jsCreate a Token:
node src/tokens/create-token-mint.js
# Returns: Mint address for your new tokenExecute a Swap:
# Swap 0.1 SOL for USDC
node src/trading/ultra-swap.js SOL USDC 0.1
# With custom slippage (1%)
node src/trading/ultra-swap.js SOL USDC 0.1 100
# Dry run (preview only)
node src/trading/ultra-swap.js SOL USDC 0.1 --dry-runRun a DCA Strategy:
# Start accumulating USDC with SOL
node src/automation/dca-bot.js
# State persists in dca-bot-state.json
# Bot resumes automatically on restartCreate an NFT:
node src/nft/create-nft.js "My NFT" "MNFT" "https://arweave.net/metadata.json" 5.5
# Parameters: name, symbol, metadata URI, royalty %Simulate Yield:
# Simulate $10k at 14.5% APY for 1 year
node src/yield/jlp-simulator.js 10000 14.5 365
# Output: Expected return, confidence intervalssolana-agent-toolkit/
โโโ src/
โ โโโ wallet/ # Wallet operations
โ โโโ tokens/ # SPL token management
โ โโโ trading/ # Swaps and trading
โ โโโ yield/ # DeFi and yield tracking
โ โโโ nft/ # NFT operations
โ โโโ automation/ # Automated strategies
โ โโโ monitoring/ # Price alerts
โ โโโ utils/ # Utilities
โโโ docs/ # Documentation
โ โโโ submission/ # Bounty submission details
โโโ demo/ # Screenshots and demos
โโโ package.json # Dependencies
โโโ README.md # This file
- Single Responsibility โ Each tool does one thing well
- Composable โ Tools can be chained together
- Stateless by Default โ No hidden state; explicit persistence
- AI-First โ Designed for programmatic access
- Safety First โ Defaults to devnet, dry-run modes available
- Node.js: 18+ (tested on 18, 20, 22)
- Solana CLI: Optional, for airdrops and advanced operations
- Wallet: Devnet wallet with SOL for testing
- Dependencies: See
package.json(minimal external deps)
{
"@solana/web3.js": "^1.98.4",
"@solana/spl-token": "^0.4.14",
"@metaplex-foundation/umi": "^1.4.1",
"@metaplex-foundation/mpl-token-metadata": "^3.4.0",
"node-fetch": "^3.3.2"
}All tools are tested on Solana devnet with real transactions:
# Fund your devnet wallet
solana airdrop 2 --url devnet
# Run any tool - defaults to devnet
node src/wallet/check-balance.jsSafety Features:
- All tools default to devnet
- Dry-run modes where applicable
- Comprehensive error handling
- No private keys in git (see
.gitignore)
| Network | Status | Notes |
|---|---|---|
| Devnet | โ Fully tested | Default, recommended for development |
| Testnet | โ Supported | For pre-production testing |
| Mainnet | Test thoroughly on devnet first |
To use mainnet, edit the connection URL in each tool:
const connection = new Connection('https://api.mainnet-beta.solana.com');- Private Keys: Stored in
wallet.json(gitignored) - No Key Committing:
.gitignoreprevents accidental commits - Devnet Default: All tools default to devnet for safety
- Minimal Dependencies: Only essential Solana packages
- Error Handling: Comprehensive validation and error messages
Never commit wallet.json to git!
- 27 production-ready tools
- Jupiter Ultra API integration
- Metaplex NFT support
- Comprehensive yield tracking
- AI-native design
- MCP (Model Context Protocol) integration
- TypeScript definitions
- Web dashboard for visualization
- Multi-chain support (Ethereum, Base)
- AI agent templates (pre-built strategies)
- Mobile SDK (React Native)
- Governance automation
Contributions welcome! Areas of interest:
- Additional Solana protocol integrations
- AI agent templates and examples
- Documentation improvements
- Bug fixes and optimizations
Please open an issue before major changes.
MIT License โ see LICENSE file for details.
- Solana Foundation โ For the ecosystem and grants
- Jupiter โ For swap aggregation APIs
- Metaplex โ For NFT standards and tooling
- Superteam โ For bounty opportunities
- Repository: https://github.com/ebreen/solana-agent-toolkit
- Issues: GitHub Issues
- Bounty Contact: @pratikdholani (Telegram)
Built with ๐ค by Blanco, an AI agent on OpenClaw.
Human oversight by Eirik.
This is the hosted version. The GitHub repository is the primary distribution channel.