Token operations
Manage your Solana tokens with simple commands:Transfer tokens
Transfer tokens
Send SOL or SPL tokens to any address.Natural language examples:
- “Send 1 SOL to [address]”
- “Transfer 100 USDC to [address]”
- “Send tokens to [address]”
- Transfers native SOL or any SPL token
- Validates recipient address format
- Confirms amount before sending
to- Recipient wallet address (required)amount- Amount to send (required)mint- Token mint address (optional, defaults to SOL)
utils/syntoUtils/agent/plugins/plugin-token/solana/actions/transfer.ts:6Check balances
Check balances
View your SOL balance or all token balances.Natural language examples:
- “What’s my balance?”
- “Show my SOL balance”
- “List all my tokens”
- Returns SOL balance in lamports and SOL
- Shows all SPL token balances
- Includes token metadata when available
get_balance- Your SOL balanceget_balance_other- Another wallet’s balanceget_token_balance- Specific token balance
Token data lookup
Token data lookup
Get information about any token on Solana.Natural language examples:
- “Get token data for USDC”
- “Show me info about [token address]”
- “What’s the price of SOL?”
- Fetches token metadata from DexScreener
- Looks up tokens by ticker symbol
- Returns current market data
- DexScreener API for market data
- Jupiter API for price feeds
Close empty accounts
Close empty accounts
Clean up empty token accounts to reclaim rent.What it does:
- Finds token accounts with zero balance
- Closes accounts to reclaim SOL rent
- Returns reclaimed amount
utils/syntoUtils/agent/plugins/plugin-token/solana/actions/closeEmptyTokenAccounts.tsTrading and swaps
Execute token swaps using Jupiter Exchange:- Basic swap
- Advanced options
- Price checking
Swap any token for anotherThe agent uses Jupiter Exchange to find the best price across all Solana DEXs.Natural language:
- “Swap 1 SOL for USDC”
- “Exchange 100 USDC to SOL”
- “Trade tokens”
utils/syntoUtils/agent/plugins/plugin-token/jupiter/actions/trade.ts:6DeFi operations
Access decentralized finance protocols through the agent:Lending with Rainfi
Borrow assets using your crypto as collateral
Loan quotes
Calculate loan terms before borrowing
Repay loans
Pay back borrowed amounts plus interest
Active loans
View all your current loan positions
Rainfi integration
The agent integrates with Rainfi for decentralized lending:Get loan quote
Get loan quote
Calculate how much you can borrow and the terms.Parameters:Source:
amountIn- Collateral amount in lamportscurrencyIn- Collateral token addresscurrencyOut- Token you want to borrowborrower- Your wallet address (auto-filled)
- Loan amount
- Duration (typically 7 days)
- Interest rate
- APR
- Rainfi fees
- Authorization token for borrowing
utils/syntoUtils/agent/plugins/plugin-defi/rainfi/actions/quoteLoanCalculator.ts:5Create loan
Create loan
Execute a loan transaction based on a quote.What it does:
- Takes your quote authorization
- Builds the loan transaction
- Deposits your collateral
- Receives borrowed tokens
- “Borrow USDC with my SOL”
- “Take out a loan”
- “Execute this loan quote”
You must get a loan quote first before creating the loan.
View active loans
View active loans
See all your current loan positions.What it shows:
- Loan amounts
- Collateral locked
- Interest accrued
- Repayment due dates
- Health ratios
- “Show my loans”
- “What loans do I have?”
- “Check my borrowing positions”
Repay loan
Repay loan
Pay back borrowed amounts to reclaim collateral.What it does:
- Calculates total repayment (principal + interest)
- Transfers repayment tokens
- Returns your collateral
- Closes the loan position
- “Repay my loan”
- “Pay back my USDC loan”
- “Close this loan position”
utils/syntoUtils/agent/plugins/plugin-defi/rainfi/actions/RepayLoan.tsBlockchain utilities
Useful Solana blockchain operations:- Network info
- Wallet info
- Request funds
Get Solana network statistics
- Current TPS (transactions per second)
- Network performance metrics
- Cluster information
- “What’s the current TPS?”
- “Show network stats”
- “How fast is Solana?”
utils/syntoUtils/agent/plugins/plugin-token/solana/actions/getTPS.tsStaking operations
Stake tokens to earn rewards:Stake with Jupiter
Stake with Jupiter
JUP token stakingStake JUP tokens to participate in governance and earn rewards.What it does:
- Stakes JUP tokens in Jupiter’s staking program
- Earns staking rewards
- Maintains voting power for governance
- “Stake my JUP tokens”
- “Stake with Jupiter”
utils/syntoUtils/agent/plugins/plugin-token/jupiter/actions/stakeWithJup.tsConfiguration options
The agent supports various configuration options to customize behavior:| Option | Description | Default |
|---|---|---|
JUPITER_REFERRAL_ACCOUNT | Your referral account for Jupiter swaps | None |
JUPITER_FEE_BPS | Fee in basis points for Jupiter | 0 |
PRIORITY_LEVEL | Transaction priority fee level | medium |
signOnly | Only sign transactions, don’t broadcast | false |
Priority levels:
medium, high, veryHigh. Higher priority = faster execution but higher fees.Action validation
All agent actions use Zod schemas for input validation:- Address validation - Ensures valid Solana addresses (32+ characters)
- Amount validation - Requires positive numbers
- Slippage bounds - Limits slippage to 0-10000 bps (0-100%)
- Type safety - Full TypeScript type checking
What’s next
Plugin architecture
Learn how plugins power the agent
Agent overview
Understand the core architecture