Token Plugin

The @solana-agent-kit/plugin-token plugin provides a set of tools and actions to interact with, create and transfer tokens on the Solana blockchain.

Installation

Install the plugin alongside the core Solana Agent Kit:

npm install solana-agent-kit @solana-agent-kit/plugin-token

Integration

Add the Token plugin to your agent:

import { SolanaAgentKit } from "solana-agent-kit";
import TokenPlugin from "@solana-agent-kit/plugin-token";

const agent = new SolanaAgentKit(
  wallet,
  "YOUR_RPC_URL",
  {
    OPENAI_API_KEY: "YOUR_OPENAI_API_KEY",
  }
).use(TokenPlugin);

Available Tools

Dexscreener

Tool NameDescription
getTokenDataByAddressGet token data using a token’s mint address
getTokenAddressFromTickerGet a token’s mint address using its ticker symbol

Jupiter

Tool NameDescription
fetchPriceGet the current price of a token in USDC
stakeWithJupStake SOL to receive jupSOL
tradeSwap tokens using Jupiter’s aggregator
getTokenByTickerGet token data using a token’s ticker symbol

Light Protocol

Tool NameDescription
sendCompressedAirdropSend compressed token airdrops to multiple addresses efficiently

Solana

Tool NameDescription
closeEmptyTokenAccountsClose empty token accounts to reclaim rent
getTPSGet current transactions per second on Solana
get_balanceGet SOL or token balance for a wallet
get_balance_otherGet balance for another wallet address
get_token_balanceGet detailed token balances including metadata
request_faucet_fundsRequest tokens from a faucet (devnet/testnet)
transferTransfer SOL or tokens to another address
getWalletAddressGet the wallet address of the current user

Mayan

Tool NameDescription
swapCross-chain token swaps using Mayan DEX

Pumpfun

Tool NameDescription
launchPumpFunTokenLaunch new tokens on pump.fun

Pyth

Tool NameDescription
fetchPythPriceGet real-time price data from Pyth oracles
fetchPythPriceFeedIDGet price feed ID for a token

Rugcheck

Tool NameDescription
fetchTokenDetailedReportGet detailed token security analysis
fetchTokenReportSummaryGet summarized token security report

Solutiofi

Tool NameDescription
burnTokensBurn tokens using Solutiofi
closeAccountsClose token accounts using Solutiofi
mergeTokensMerge multiple tokens into one
spreadTokenSplit tokens across multiple addresses

For more detailed information, please refer to the full documentation at docs.sendai.fun.