Solana Agent Kit

An open-source toolkit for connecting AI agents to Solana protocols. Now, any agent, using any model can autonomously perform 15+ Solana actions.

Quick Start

npm install solana-agent-kit
import { SolanaAgentKit, createSolanaTools } from "solana-agent-kit";

// Initialize with private key and optional RPC URL
const agent = new SolanaAgentKit(
  "your-wallet-private-key-as-base58",
  "https://api.mainnet-beta.solana.com",
  "your-openai-api-key"
);

// Create LangChain tools
const tools = createSolanaTools(agent);

Core Features

Blockchain Operations

  • Token Operations

    • Deploy SPL tokens

    • Transfer assets

    • Balance checks

    • Stake SOL

    • ZK compressed airdrops

  • NFT Management

    • Collection deployment

    • NFT minting

    • Metadata management

    • Royalty configuration

  • DeFi Integration

    • Jupiter Exchange swaps

    • Launch on Pump

    • Raydium pool creation

    • Orca whirlpool integration

    • Meteora Dynamic AMM

    • Openbook market creation

    • SNS operations

    • Jito Bundles

  • Solana Blinks

    • Lending operations

    • Arcade Games

    • JupSOL staking

AI Integration Features

  • LangChain Integration

    • Ready-to-use LangChain tools

    • Autonomous agent support with React

    • Memory management

    • Streaming responses

  • Autonomous Modes

    • Interactive chat mode

    • Autonomous mode

    • Configurable intervals

    • Error handling and recovery

  • AI Tools

    • DALL-E integration for NFTs

    • Natural language processing

    • Price feed integration

    • Automated decision-making

Example Usage

Deploy a Token

import { deploy_token } from "solana-agent-kit";

const result = await deploy_token(
  agent,
  9, // decimals
  1000000 // initial supply
);

Create NFT Collection

import { deploy_collection } from "solana-agent-kit";

const collection = await deploy_collection(agent, {
  name: "My NFT Collection",
  uri: "https://arweave.net/metadata.json",
  royaltyBasisPoints: 500, // 5%
  creators: [
    {
      address: "creator-wallet-address",
      percentage: 100,
    },
  ],
});

Send Compressed Airdrop

import { sendCompressedAirdrop } from "solana-agent-kit";
import { PublicKey } from "@solana/web3.js";

const signature = await sendCompressedAirdrop(
  agent,
  new PublicKey("token-mint-address"),
  42, // amount per recipient
  [
    new PublicKey("recipient-1"),
    // ... more recipients
  ],
  30_000 // priority fee
);

Next Steps

Check out our API Reference for detailed documentation of all available functions and features.

For more examples and detailed usage instructions, visit our Quickstart Guide.