solana-agent-kit

connect any ai agents to solana protocols

https://github.com/sendaifun/solana-agent-kit

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (10.9%) to scientific vocabulary

Keywords

ai langchain langchain-js solana solana-langchain web3js

Keywords from Contributors

cryptography elliptic-curves pairings
Last synced: 7 months ago · JSON representation ·

Repository

connect any ai agents to solana protocols

Basic Info
  • Host: GitHub
  • Owner: sendaifun
  • License: apache-2.0
  • Language: TypeScript
  • Default Branch: v2
  • Homepage: https://kit.sendai.fun
  • Size: 20.5 MB
Statistics
  • Stars: 1,477
  • Watchers: 20
  • Forks: 796
  • Open Issues: 9
  • Releases: 18
Topics
ai langchain langchain-js solana solana-langchain web3js
Created over 1 year ago · Last pushed 8 months ago
Metadata Files
Readme Contributing License Citation Security

README.md

# Solana Agent Kit ![SAKCover2](https://github.com/user-attachments/assets/a6072421-8958-4cee-934a-a10ea32ae75e) [![NPM Downloads](https://img.shields.io/npm/dm/solana-agent-kit?style=for-the-badge)](https://www.npmjs.com/package/solana-agent-kit) [![GitHub forks](https://img.shields.io/github/forks/sendaifun/solana-agent-kit?style=for-the-badge)](https://github.com/sendaifun/solana-agent-kit/network/members) [![GitHub License](https://img.shields.io/github/license/sendaifun/solana-agent-kit?style=for-the-badge)](https://github.com/sendaifun/solana-agent-kit/blob/v2/LICENSE)

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

  • Trade tokens
  • Launch new tokens
  • Lend assets
  • Send compressed airdrops
  • Execute blinks
  • Launch tokens on AMMs
  • Bridge tokens across chains
  • And more...

Anyone - whether an SF-based AI researcher or a crypto-native builder - can bring their AI agents trained with any model and seamlessly integrate with Solana.

Run on Repl.it

Replit template created by Arpit Singh

🔧 Core Blockchain Features

  • Token Operations
    • Deploy SPL tokens by Metaplex
    • Transfer assets
    • Balance checks
    • Stake SOL
    • Zk compressed Airdrop by Light Protocol and Helius
    • Bridge tokens across chains using Wormhole
  • NFTs on 3.Land
    • Create your own collection
    • NFT creation and automatic listing on 3.land
    • List your NFT for sale in any SPL token
  • NFT Management via Metaplex

    • Collection deployment
    • NFT minting
    • Metadata management
    • Royalty configuration
  • DeFi Integration

    • Jupiter Exchange swaps
    • Launch on Pump via PumpPortal
    • Raydium pool creation (CPMM, CLMM, AMMv4)
    • Orca Whirlpool integration
    • Manifest market creation, and limit orders
    • Meteora Dynamic AMM, DLMM Pool, and Alpha Vault
    • Openbook market creation
    • Register and Resolve SNS
    • Jito Bundles
    • Pyth Price feeds for fetching Asset Prices
    • Register/resolve Alldomains
    • Perpetuals Trading with Adrena Protocol
    • Drift Vaults, Perps, Lending and Borrowing
    • Cross-chain bridging via deBridge DLN
    • Cross chain bridging via Wormhole
  • Solana Blinks

    • Lending by Lulo (Best APR for USDC)
    • Send Arcade Games
    • JupSOL staking
    • Solayer SOL (sSOL)staking
  • Non-Financial Actions

    • Gib Work for registering bounties
  • Market Data Integration

    • CoinGecko Pro API integration
    • Real-time token price data
    • Trending tokens and pools
    • Top gainers analysis
    • Token information lookup
    • Latest pool tracking

🤖 AI Integration Features

  • LangChain Integration

    • Ready-to-use LangChain tools for blockchain operations
    • Autonomous agent support with React framework
    • Memory management for persistent interactions
    • Streaming responses for real-time feedback
  • Vercel AI SDK Integration

    • Vercel AI SDK for AI agent integration
    • Framework agnostic support
    • Quick and easy toolkit setup
  • Autonomous Modes

    • Interactive chat mode for guided operations
    • Autonomous mode for independent agent actions
    • Configurable action intervals
    • Built-in error handling and recovery
  • AI Tools

    • DALL-E integration for NFT artwork generation
    • Natural language processing for blockchain commands
    • Price feed integration for market analysis
    • Automated decision-making capabilities

📃 Documentation

You can view the full documentation of the kit at docs.sendai.fun

Why We Built V2 and Why Upgrade?

The Solana Agent Kit V2 is a major upgrade from V1, to learn why check out our migration guide

📦 Core Installation

bash npm install solana-agent-kit

📦 Plugin Installation

You can choose to install any of the plugins listed below or you could choose to install all of them to experience the full power of the Solana Agent Kit.

  1. Token plugin (@solana-agent-kit/plugin-token): Token operations for SPL tokens such as transferring assets, swapping, bridging, and rug checking.
  2. NFT plugin (@solana-agent-kit/plugin-nft): NFT operations for Metaplex NFTs such as minting, listing, and metadata management.
  3. DeFi plugin (@solana-agent-kit/plugin-defi): DeFi operations for Solana protocols such as staking, lending, borrowing, and spot and perpetual trading.
  4. Misc plugin (@solana-agent-kit/plugin-misc): Miscellaneous operations such as airdrops, price feeds, coingecko token information, and domain registration.
  5. Blinks plugin (@solana-agent-kit/plugin-blinks): Blinks operations for Solana protocols such as arcade games and more soon to come.

bash npm install @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

Quick Start

Initializing the wallet interface and agent with plugins:

```typescript import { SolanaAgentKit, createVercelAITools, KeypairWallet } from "solana-agent-kit"; // or import createLangchainTools if using langchain or createOpenAITools for OpenAI agents 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";

const keyPair = Keypair.fromSecretKey(bs58.decode("YOURSECRETKEY")) const wallet = new KeypairWallet(keyPair)

// Initialize with private key and optional RPC URL const agent = new SolanaAgentKit( wallet, "YOURRPCURL", { OPENAIAPIKEY: "YOUROPENAIAPI_KEY", } ) // Add the plugins you would like to use .use(TokenPlugin) .use(NFTPlugin) .use(DefiPlugin) .use(MiscPlugin) .use(BlinksPlugin);

// Create LangChain tools const tools = createVercelAITools(agent, agent.actions); ```

You can also make use of the wallet interface provided by the Solana wallet adapter for embedded wallets.

Usage Examples Using Tools From The Token, Defi, and Other Plugins

Deploy a New Token

```typescript const result = await agent.methods.deployToken( agent, "my ai token", // name "uri", // uri "token", // symbol 9, // decimals { mintAuthority: null, // by default, deployer account freezeAuthority: null, // by default, deployer account updateAuthority: undefined, // by default, deployer account isMutable: false // by default, true }, 1000000 // initial supply );

console.log("Token Mint Address:", result.mint.toString()); ```

Deploy a New Token2022

```typescript const result = await agent.methods.deployToken2022( "my ai token 2022", // name "uri", // uri "token2022", // symbol 9, // decimals { mintAuthority: null, // by default, deployer account freezeAuthority: null, // by default, deployer account updateAuthority: undefined, // by default, deployer account isMutable: false // by default, true }, 1000000 // initial supply );

console.log("Token2022 Mint Address:", result.mint.toString()); ```

Create NFT Collection on 3Land

```typescript const isDevnet = false; // (Optional) if not present TX takes place in Mainnet const priorityFeeParam = 1000000; // (Optional) if not present the default priority fee will be 50000

const collectionOpts: CreateCollectionOptions = { collectionName: "", collectionSymbol: "", collectionDescription: "", mainImageUrl: "" };

const result = await agent.methods.create3LandCollection( collectionOpts, isDevnet, // (Optional) if not present TX takes place in Mainnet priorityFeeParam, //(Optional) ); ```

Create NFT on 3Land

When creating an NFT using 3Land's tool, it automatically goes for sale on 3.land website

typescript const isDevnet = true; // (Optional) if not present TX takes place in Mainnet const withPool = true; // (Optional) only present if NFT will be created with a Liquidity Pool for a specific SPL token const priorityFeeParam = 1000000; // (Optional) if not present the default priority fee will be 50000 const collectionAccount = ""; //hash for the collection const createItemOptions: CreateSingleOptions = { itemName: "", sellerFee: 500, //5% itemAmount: 100, //total items to be created itemSymbol: "", itemDescription: "", traits: [ { trait_type: "", value: "" }, ], price: 0, //100000000 == 0.1 sol, can be set to 0 for a free mint splHash: "", //present if listing is on a specific SPL token, if not present sale will be on $SOL, must be present if "withPool" is true poolName: "", // Only present if "withPool" is true mainImageUrl: "", }; const result = await agent.methods.create3LandSingle( {}, collectionAccount, createItemOptions, isDevnet, // (Optional) if not present TX takes place in Mainnet withPool priorityFeeParam, //(Optional) );

Create NFT Collection

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

Swap Tokens

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.methods.trade( agent, new PublicKey("target-token-mint"), 100, // amount new PublicKey("source-token-mint"), 300 // 3% slippage ); ```

Lend Tokens

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.methods.lendAssets( agent, 100 // amount of USDC to lend ); ```

Stake SOL

typescript const signature = await agent.methods.stakeWithJup( agent, 1 // amount in SOL to stake );

Stake SOL on Solayer

```typescript const signature = await agent.methods.stakeWithSolayer( agent, 1 // amount in SOL to stake );

```

Send an SPL Token Airdrop via ZK Compression

```typescript import { PublicKey } from "@solana/web3.js";

(async () => { console.log( "~Airdrop cost estimate:", getAirdropCostEstimate( 1000, // recipients 30_000 // priority fee in lamports ) );

const signature = await agent.methods.sendCompressedAirdrop( agent, new PublicKey("JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN"), // mint 42, // amount per recipient 9, [ new PublicKey("1nc1nerator11111111111111111111111111111111"), // ... add more recipients ], 30_000 // priority fee in lamports ); })(); ```

Fetch Price Data from Pyth

```typescript

const priceFeedID = await agent.methods.fetchPythPriceFeedID("SOL");

const price = await agent.methods.fetchPythPrice(priceFeedID);

console.log("Price of SOL/USD:", price); ```

Open PERP Trade

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.methods.openPerpTradeLong({ agent: agent, price: 300, // $300 SOL Max price collateralAmount: 10, // 10 jitoSOL in collateralMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL leverage: 50000, // x5 tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL slippage: 0.3, // 0.3% }); ```

Close PERP Trade

```typescript import { PublicKey } from "@solana/web3.js";

const signature = await agent.methods.closePerpTradeLong({ agent: agent, price: 200, // $200 SOL price tradeMint: new PublicKey("J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn"), // jitoSOL }); ```

Close Empty Token Accounts

``` typescript

const { signature } = await agent.methods.closeEmptyTokenAccounts(agent); ```

Create a Drift account

Create a drift account with an initial token deposit.

typescript const result = await agent.methods.createDriftUserAccount( agent, // amount of token to deposit 100, // token symbol to deposit "USDC" )

Create a Drift Vault

Create a drift vault.

typescript const signature = await agent.methods.createDriftVault(agent, { name: "my-drift-vault", marketName: "USDC-SPOT", redeemPeriod: 1, // in days maxTokens: 100000, // in token units e.g 100000 USDC minDepositAmount: 5, // in token units e.g 5 USDC managementFee: 1, // 1% profitShare: 10, // 10% hurdleRate: 5, // 5% permissioned: false, // public vault or whitelist })

Deposit into a Drift Vault

Deposit tokens into a drift vault.

typescript const signature = await agent.methods.depositIntoDriftVault(agent, 100, "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU")

Deposit into your Drift account

Deposit tokens into your drift account.

typescript const {txSig} = await agent.methods.depositToDriftUserAccount(agent, 100, "USDC")

Derive a Drift Vault address

Derive a drift vault address.

typescript const vaultPublicKey = await agent.methods.deriveDriftVaultAddress(agent, "my-drift-vault")

Do you have a Drift account

Check if agent has a drift account.

typescript const {hasAccount, account} = await agent.methods.doesUserHaveDriftAccount(agent)

Get Drift account information

Get drift account information.

typescript const accountInfo = await agent.methods.driftUserAccountInfo(agent)

Request withdrawal from Drift vault

Request withdrawal from drift vault.

typescript const signature = await agent.methods.requestWithdrawalFromDriftVault(agent, 100, "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU")

Carry out a perpetual trade using a Drift vault

Open a perpetual trade using a drift vault that is delegated to you.

typescript const signature = await agent.methods.tradeUsingDelegatedDriftVault(agent, { vault: "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU", amount: 500, symbol: "SOL", action: "long", type: "limit", price: 180 // Please long limit order at $180/SOL })

Carry out a perpetual trade using your Drift account

Open a perpetual trade using your drift account.

typescript const signature = await agent.methods.driftPerpTrade(agent, { amount: 500, symbol: "SOL", action: "long", type: "limit", price: 180 // Please long limit order at $180/SOL })

Update Drift vault parameters

Update drift vault parameters.

typescript const signature = await agent.methods.updateDriftVault(agent, { name: "my-drift-vault", marketName: "USDC-SPOT", redeemPeriod: 1, // in days maxTokens: 100000, // in token units e.g 100000 USDC minDepositAmount: 5, // in token units e.g 5 USDC managementFee: 1, // 1% profitShare: 10, // 10% hurdleRate: 5, // 5% permissioned: false, // public vault or whitelist })

Withdraw from Drift account

Withdraw tokens from your drift account.

typescript const {txSig} = await agent.methods.withdrawFromDriftUserAccount(agent, 100, "USDC")

Borrow from Drift

Borrow tokens from drift.

typescript const {txSig} = await agent.methods.withdrawFromDriftUserAccount(agent, 1, "SOL", true)

Repay Drift loan

Repay a loan from drift.

typescript const {txSig} = await agent.methods.depositToDriftUserAccount(agent, 1, "SOL", true)

Withdraw from Drift vault

Withdraw tokens from a drift vault after the redemption period has elapsed.

typescript const signature = await agent.methods.withdrawFromDriftVault(agent, "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU")

Update the address a Drift vault is delegated to

Update the address a drift vault is delegated to.

typescript const signature = await agent.methods.updateDriftVaultDelegate(agent, "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU", "new-address")

Get Voltr Vault Position Values

Get the current position values and total value of assets in a Voltr vault.

typescript const values = await agent.methods.voltrGetPositionValues(agent, "7opUkqYtxmQRriZvwZkPcg6LqmGjAh1RSEsVrdsGDx5K")

Deposit into Voltr Strategy

Deposit assets into a specific strategy within a Voltr vault.

typescript const signature = await agent.methods.voltrDepositStrategy( agent, new BN("1000000000"), // amount in base units (e.g., 1 USDC = 1000000) "7opUkqYtxmQRriZvwZkPcg6LqmGjAh1RSEsVrdsGDx5K", // vault "9ZQQYvr4x7AMqd6abVa1f5duGjti5wk1MHsX6hogPsLk" // strategy )

Withdraw from Voltr Strategy

Withdraw assets from a specific strategy within a Voltr vault.

typescript const signature = await agent.methods.voltrWithdrawStrategy( agent, new BN("1000000000"), // amount in base units (e.g., 1 USDC = 1000000) "7opUkqYtxmQRriZvwZkPcg6LqmGjAh1RSEsVrdsGDx5K", // vault "9ZQQYvr4x7AMqd6abVa1f5duGjti5wk1MHsX6hogPsLk" // strategy )

Get a Solana asset by its ID

typescript const asset = await agent.methods.getAsset(agent, "41Y8C4oxk4zgJT1KXyQr35UhZcfsp5mP86Z2G7UUzojU")

Get a price inference from Allora

Get the price for a given token and timeframe from Allora's API

typescript const sol5mPrice = await agent.methods.getPriceInference("SOL", "5m"); console.log("5m price inference of SOL/USD:", sol5mPrice);

List all topics from Allora

typescript const topics = await agent.methods.getAllTopics(); console.log("Allora topics:", topics);

Get an inference for an specific topic from Allora

typescript const inference = await agent.methods.getInferenceByTopicId(42); console.log("Allora inference for topic 42:", inference);

Simulate a Switchboard feed

Simulate a given Switchboard feed. Find or create feeds here.

```typescript const value = await agent.methods.simulateSwitchboardFeed( "9wcBMATS8bGLQ2UcRuYjsRAD7TPqB1CMhqfueBx78Uj2", // TRUMP/USD "http://crossbar.switchboard.xyz");; console.log("Simulation resulted in the following value:", value);

Cross-Chain Bridge via deBridge

The Solana Agent Kit supports cross-chain token transfers using deBridge's DLN protocol. Here's how to use it:

  1. Check supported chains: typescript const chains = await agent.methods.getDebridgeSupportedChains(); console.log("Available chains:", chains); // Example output: { chains: [{ chainId: "1", chainName: "Ethereum" }, { chainId: "7565164", chainName: "Solana" }] }

  2. Get available tokens (optional): typescript const tokens = await agent.methods.getDebridgeTokensInfo("1", "USDC"); // Search for USDC on Ethereum console.log("Available tokens:", tokens); // Shows tokens matching 'USDC' on the specified chain

  3. Create bridge order (SOL -> ETH): ```typescript const orderInput = { srcChainId: "7565164", // Solana srcChainTokenIn: "11111111111111111111111111111111", // Native SOL srcChainTokenInAmount: "1000000000", // 1 SOL (9 decimals) dstChainId: "1", // Ethereum dstChainTokenOut: "0x0000000000000000000000000000000000000000", // ETH dstChainTokenOutRecipient: "0x23C279e58ddF1018C3B9D0C224534fA2a83fb1d2" // ETH recipient };

const order = await agent.methods.createDebridgeOrder(orderInput); console.log("Order created:", order); // Contains transaction data and estimated amounts ```

  1. Execute the bridge order: typescript const signature = await agent.methods.executeDebridgeOrder(order.tx.data); console.log("Bridge transaction sent:", signature);

  2. Check bridge status: typescript const status = await agent.methods.checkDebridgeTransactionStatus(signature); console.log("Bridge status:", status); // Shows current status: Created, Fulfilled, etc.

Note: When bridging between chains: - To Solana: Use base58 addresses for recipients and token mints - From Solana: Use EVM addresses for recipients and ERC-20 format for tokens - Always verify addresses and amounts before executing bridge transactions

Get Token Price Data from CoinGecko

typescript const priceData = await agent.methods.getTokenPriceData([ "So11111111111111111111111111111111111111112", // SOL "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" // USDC ]); console.log("Token prices:", priceData);

Get Trending Tokens

typescript const trendingTokens = await agent.methods.getTrendingTokens(); console.log("Trending tokens:", trendingTokens);

Get Latest Pools

typescript const latestPools = await agent.methods.getLatestPools(); console.log("Latest pools:", latestPools);

Get Token Information

typescript const tokenInfo = await agent.methods.getTokenInfo("EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"); console.log("Token info:", tokenInfo);

Get Top Gainers

typescript const topGainers = await agent.methods.getTopGainers("24h", "all"); console.log("Top gainers:", topGainers);

Get Trending Pools

typescript const trendingPools = await agent.methods.getTrendingPools("24h"); console.log("Trending pools:", trendingPools);

Parse Instruction Data

```typescript const parsedData = await agent.methods.parseInstruction( "", "" // base64 )

console.log("parsed data:", parsedData) ```

Parse Instruction Data

```typescript const parsedData = await agent.methods.parseAccount( "", "" // base64 )

console.log("parsed data:", parsedData) ```

Get Sanctum LST Price

```typescript const prices = await agent.methods.getSanctumLSTPrice([ "bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1", "7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn" ])

console.log('prices', prices) ```

Get Sanctum LST APY

```typescript const apys = await agent.methods.getSanctumLSTAPY([ "bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1", "7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn" ])

console.log('apys', apys) ```

Get Sanctum LST TVL

```typescript const tvls = await agent.methods.getSanctumLSTTVL([ "bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1", "7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn" ])

console.log('tvls', tvls) ```

Get Sanctum Owend LST

```typescript const lsts = await agent.methods.getSanctumOwnedLST()

console.log('lsts', lsts) ```

Add Liquidity to Sanctum Infinite Pool

```typescript const txId = await agent.methods.addSanctumLiquidity( "So11111111111111111111111111111111111111112", "1000000000", "1100000000", 5000 )

console.log('txId', txId) ```

Remove Liquidity from Sanctum Infinite Pool

```typescript const txId = await agent.methods.removeSanctumLiquidity( "So11111111111111111111111111111111111111112", "1000000000", "1100000000", 5000 )

console.log('txId', txId) ```

Swap Sanctum LST

```typescript const txId = await agent.methods.swapSanctumLST( "So11111111111111111111111111111111111111112", "1000000000", "1100000000", 5000, "7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn" )

console.log('txId', txId) ```

Get Chain Data

Note: To use OKX DEX integration, you need to set up the following environment variables: Get OKX API keys from the OKX Developer Portal - OKX_API_KEY - OKX_SECRET_KEY - OKX_API_PASSPHRASE - OKX_PROJECT_ID - RPC_URL - SOLANA_PRIVATE_KEY - SOLANA_WALLET_ADDRESS

Examples

LangGraph Multi-Agent System

The repository includes an advanced example of building a multi-agent system using LangGraph and Solana Agent Kit. Located in examples/agent-kit-langgraph, this example demonstrates:

  • Multi-agent architecture using LangGraph's StateGraph
  • Specialized agents for different tasks:
    • General purpose agent for basic queries
    • Transfer/Swap agent for transaction operations
    • Read agent for blockchain data queries
    • Manager agent for routing and orchestration
  • Fully typed TypeScript implementation
  • Environment-based configuration

Check out the LangGraph example for a complete implementation of an advanced Solana agent system.

Dependencies

The toolkit relies on several key Solana and Metaplex libraries:

  • @solana/web3.js
  • @solana/spl-token
  • @metaplex-foundation/digital-asset-standard-api
  • @metaplex-foundation/mpl-token-metadata
  • @metaplex-foundation/mpl-core
  • @metaplex-foundation/umi
  • @lightprotocol/compressed-token
  • @lightprotocol/stateless.js
  • @coingecko/sdk

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. Refer to CONTRIBUTING.md for detailed guidelines on how to contribute to this project.

Contributors

Star History

Star History Chart

License

Apache-2 License

Funding

If you wanna give back any tokens or donations to the OSS community -- The Public Solana Agent Kit Treasury Address:

Solana Network : EKHTbXpsm6YDgJzMkFxNU1LNXeWcUW7Ezf8mjUNQQ4Pa

Security

This toolkit handles transaction generation, signing and sending, using provided wallets. Always ensure you're using it in a secure environment and never share your private keys.

Attributions

System prompt logic adapted from Coinbase AgentKit (Apache 2.0)

Owner

  • Name: sendaifun
  • Login: sendaifun
  • Kind: organization

Citation (CITATION.cff)

cff-version: 1.2.0
title: Solana Agent Kit
message: >-
  If you use this software, please cite it using the
  metadata from this file.
type: software
authors:
  - name: SendAI
repository-code: 'https://github.com/sendaifun/solana-agent-kit'
url: 'https://github.com/sendaifun/solana-agent-kit'
abstract: >-
  Connect any AI Agents to Solana Protocols
keywords:
  - solana
  - blockchain
  - web3
  - agent
  - toolkit
license: Apache-2.0
version: 1.2.0
preferred-citation:
  type: software
  title: Solana Agent Kit
  abstract: Connect any AI Agents to Solana Protocols
  version: 1.2.0
  date-released: '2024-12-21'
  license: Apache-2.0
  url: 'https://github.com/sendaifun/solana-agent-kit'
  repository-code: 'https://github.com/sendaifun/solana-agent-kit'
  authors:
  - name: SendAI

Committers

Last synced: 11 months ago

All Time
  • Total Commits: 906
  • Total Committers: 76
  • Avg Commits per committer: 11.921
  • Development Distribution Score (DDS): 0.794
Past Year
  • Commits: 906
  • Committers: 76
  • Avg Commits per committer: 11.921
  • Development Distribution Score (DDS): 0.794
Top Committers
Name Email Commits
aryan a****9@g****m 187
michaelessiet e****2@g****m 182
Arihant Bansal 1****l 47
Damjan d****1@g****m 31
resister-boy h****7@g****m 31
adpthegreat a****t@g****m 27
Scriptscrypt t****a@g****m 26
A91y a****4@g****m 26
Deepak d****a@g****m 22
quangkeu95 q****5@g****m 20
bussyjd s****2@g****m 19
shivaji43 s****t@g****m 19
caizer0x c****v@g****m 18
calintje c****n@o****o 15
Yong Kang c****g@h****m 14
ngundotra n****h@g****g 13
DonDuala j****n@d****e 13
UjjwalGupta49 u****6@g****m 11
biccsdev b****v@g****m 11
Arpit Singh Bhatia 8****5 10
Fahri Bilici 2****i 9
julian.martinez j****8@o****m 9
thrishank t****u@g****m 9
0xCipherCoder c****x@g****m 8
uratmangun p****r@g****m 8
Jovian Dsouza d****3@g****m 7
AdwitM a****l@g****m 6
edgar sarkisian g****i@g****m 6
Swenschaeferjohann s****e@s****l 5
krishna agrawal a****2@g****m 5
and 46 more...
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 7 months ago

All Time
  • Total issues: 88
  • Total pull requests: 542
  • Average time to close issues: 24 days
  • Average time to close pull requests: 8 days
  • Total issue authors: 40
  • Total pull request authors: 118
  • Average comments per issue: 1.94
  • Average comments per pull request: 1.26
  • Merged pull requests: 306
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 88
  • Pull requests: 542
  • Average time to close issues: 24 days
  • Average time to close pull requests: 8 days
  • Issue authors: 40
  • Pull request authors: 118
  • Average comments per issue: 1.94
  • Average comments per pull request: 1.26
  • Merged pull requests: 306
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • brownhog0216-ctrl (18)
  • metasal1 (17)
  • thearyanag (8)
  • The-x-35 (7)
  • ngundotra (4)
  • JupiterMentaLisT (3)
  • ferrell-code (3)
  • crypmancer (2)
  • Juiiceee (2)
  • A91y (2)
  • dimitrov-d (2)
  • 7flash (2)
  • 0xobedient (1)
  • avikonduru (1)
  • arre-ankit (1)
Pull Request Authors
  • michaelessiet (103)
  • scriptscrypt (46)
  • arihantbansal (25)
  • thearyanag (23)
  • caizer0x (18)
  • dimitrov-d (15)
  • The-x-35 (13)
  • Resister-boy (11)
  • DogukanGun (11)
  • ngundotra (10)
  • thrishank (10)
  • quangkeu95 (9)
  • deepak-likes-code (8)
  • 0xaiwhisperer (8)
  • 0xNoushad (7)
Top Labels
Issue Labels
bug (24) bounty (11) enhancement (6) good first issue (4)
Pull Request Labels

Packages

  • Total packages: 15
  • Total downloads:
    • npm 7,203 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 155
  • Total maintainers: 19
proxy.golang.org: github.com/sendaifun/solana-agent-kit
  • Versions: 16
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.7%
Average: 5.8%
Dependent repos count: 6.0%
Last synced: 7 months ago
npmjs.org: @big-whale-labs/solana-agent-kit-plugin-token

This plugin provides a set of tools and actions to interact with, create and transfer tokens on the Solana blockchain.

  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 13 Last month
Rankings
Forks count: 1.1%
Stargazers count: 1.8%
Average: 15.6%
Dependent repos count: 24.3%
Dependent packages count: 35.1%
Last synced: 7 months ago
npmjs.org: evm-agent-kit-v92

connect any ai agents to Binance Smart Chain protocols

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 1.3%
Stargazers count: 1.9%
Average: 16.0%
Dependent repos count: 24.9%
Dependent packages count: 36.0%
Maintainers (1)
Last synced: 7 months ago
npmjs.org: evm-901

connect any ai agents to Binance Smart Chain protocols

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 1.3%
Stargazers count: 1.9%
Average: 16.0%
Dependent repos count: 24.9%
Dependent packages count: 36.0%
Maintainers (1)
Last synced: 7 months ago
npmjs.org: @wardenprotocol/solana-agent-kit-core

connect any ai agents to solana protocols

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 119 Last month
Rankings
Dependent repos count: 24.0%
Average: 29.3%
Dependent packages count: 34.6%
Last synced: 7 months ago
npmjs.org: @wardenprotocol/plugin-defi

This plugin provides a comprehensive suite of tools and actions to interact with various DeFi protocols on the Solana blockchain. It enables users to perform a wide range of DeFi operations, including trading, lending, borrowing, and cross-chain bridging.

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 104 Last month
Rankings
Dependent repos count: 24.0%
Average: 29.3%
Dependent packages count: 34.6%
Last synced: 7 months ago
npmjs.org: @solana-agent-kit/adapter-mcp

Create MCP servers with the Solana Agent Kit

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 87 Last month
Rankings
Dependent repos count: 24.8%
Average: 30.4%
Dependent packages count: 35.9%
Maintainers (2)
Last synced: 7 months ago
npmjs.org: evm-900

connect any ai agents to Binance Smart Chain protocols

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 24.9%
Average: 30.4%
Dependent packages count: 36.0%
Maintainers (1)
Last synced: 7 months ago
npmjs.org: @uratmangun/solana-agent-kit-para

connect any ai agents to solana protocols

  • Versions: 2
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 47 Last month
Rankings
Dependent repos count: 24.9%
Average: 30.5%
Dependent packages count: 36.1%
Maintainers (1)
Last synced: 7 months ago
npmjs.org: @solana-agent-kit/plugin-blinks

This plugin provides a set of tools and actions for quick, fun interactions on Solana using Solana blinks.

  • Versions: 12
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 356 Last month
Rankings
Dependent repos count: 25.0%
Average: 30.6%
Dependent packages count: 36.2%
Maintainers (2)
Last synced: 7 months ago
npmjs.org: @solana-agent-kit/plugin-misc

This plugin provides a set of miscellaneous tools and actions for interacting with various services and protocols on the Solana blockchain. It includes functionalities for domain registration, webhook creation, and more.

  • Versions: 13
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 659 Last month
Rankings
Dependent repos count: 25.0%
Average: 30.6%
Dependent packages count: 36.2%
Maintainers (2)
Last synced: 7 months ago
npmjs.org: @solana-agent-kit/plugin-defi

This plugin provides a comprehensive suite of tools and actions to interact with various DeFi protocols on the Solana blockchain. It enables users to perform a wide range of DeFi operations, including trading, lending, borrowing, and cross-chain bridging.

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 471 Last month
Rankings
Dependent repos count: 25.0%
Average: 30.6%
Dependent packages count: 36.2%
Maintainers (2)
Last synced: 7 months ago
npmjs.org: @solana-agent-kit/plugin-token

This plugin provides a set of tools and actions to interact with, create and transfer tokens on the Solana blockchain.

  • Versions: 15
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 1,022 Last month
Rankings
Dependent repos count: 25.0%
Average: 30.6%
Dependent packages count: 36.2%
Maintainers (2)
Last synced: 7 months ago
npmjs.org: @solana-agent-kit/plugin-nft

This plugin provides a set of tools and actions to interact with NFTs on the Solana blockchain.

  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 287 Last month
Rankings
Dependent repos count: 25.0%
Average: 30.6%
Dependent packages count: 36.2%
Maintainers (2)
Last synced: 7 months ago
npmjs.org: solana-agent-kit

connect any ai agents to solana protocols

  • Versions: 44
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 4,038 Last month
Rankings
Dependent repos count: 25.5%
Average: 31.3%
Dependent packages count: 37.0%
Maintainers (2)
Last synced: 7 months ago

Dependencies

package.json npm
  • @types/node ^22.9.0 development
  • @bonfida/spl-name-service ^3.0.7
  • @metaplex-foundation/js ^0.20.1
  • @metaplex-foundation/mpl-core ^1.1.1
  • @metaplex-foundation/mpl-token-metadata ^3.3.0
  • @metaplex-foundation/umi ^0.9.2
  • @metaplex-foundation/umi-bundle-defaults ^0.9.2
  • @metaplex-foundation/umi-web3js-adapters ^0.9.2
  • @solana/spl-token ^0.4.9
  • @solana/web3.js ^1.95.4
  • bs58 ^6.0.0
  • typedoc ^0.26.11
pnpm-lock.yaml npm
  • 141 dependencies