SolAgent SDK: The AI Agent Development Kit for Solana.
- Add dependencies
[dependencies]
# add wallet
solagent-wallet-solana = "0.x.x"
# add core
solagent-core = "0.x.x"
# add tools
solagent-rig-solana = "0.x.x"
- Create SolAgent
use solagent_core::{model::SolAgentModel, SolAgent};
use solagent_rig_solana::get_solana_tools;
use solagent_wallet_solana::SolAgentWallet;
use std::sync::Arc;
#[tokio::main]
async fn main() {
// Step 1: import your wallet
let wallet = SolAgentWallet::new("https://api.mainnet-beta.solana.com");
// Step 2: Create SolAgent
let solagent = Arc::new(SolAgent::new(wallet, None));
// Step 3: Add tools you want to use
let tools = get_solana_tools(solagent.clone());
// Step 4: Select the model you want to use
let model = SolAgentModel::Ollama("llama3.2".to_string());
// Step 5: tell it what you want to do.
let prompt = "Get Tps on solana";
// Wait for the result
let result = solagent
.prompt(
model,
tools,
prompt,
)
.await?;
println!("{:#?}", result);
}
Crate | Package | Version | Downloads |
---|---|---|---|
Core | solagent-core | ||
Wallet | solagent-wallet-solana |
Tools | Description | Package | Version | Downloads |
---|---|---|---|---|
gibwork | Create a task on Gibwork | solagent-rig-gibwork | ||
goplus | Token Security API | solagent-rig-goplus | ||
helius | Webhook operates | solagent-rig-helius | ||
jupiter | Jupiter Exchange | solagent-rig-jupiter | ||
pumpfun | Launch Token on pumpfun | solagent-rig-pumpfun | ||
pyth | Fetch price from Pyth | solagent-rig-pyth | ||
rugcheck | Rug check | solagent-rig-rugcheck | ||
solana | Operations on solana | solagent-rig-solana | ||
solayer | Stake with solayer | solagent-rig-solayer | ||
cookie | Cookie Data Swarm APIs | solagent-rig-cookie | ||
dexscreener | Dexscreener data APIs | solagent-rig-dexscreener | ||
birdeye | Birdeye API | solagent-rig-birdeye |
Plugin | Description | Package | Version | Downloads |
---|---|---|---|---|
gibwork | Create a task on Gibwork | solagent-plugin-gibwork | ||
goplus | Token Security API | solagent-plugin-goplus | ||
helius | Webhook operates | solagent-plugin-helius | ||
jupiter | Jupiter Exchange | solagent-plugin-jupiter | ||
pumpfun | Launch Token on pumpfun | solagent-plugin-pumpfun | ||
pyth | Fetch price from Pyth | solagent-plugin-pyth | ||
rugcheck | Rug check | solagent-plugin-rugcheck | ||
solana | Operations on solana | solagent-plugin-solana | ||
solayer | Stake with solayer | solagent-plugin-solayer | ||
cookie | Cookie Data Swarm APIs | solagent-plugin-cookie | ||
dexscreener | Dexscreener data APIs | solagent-plugin-dexscreener | ||
birdeye | Birdeye API | solagent-plugin-birdeye |
Thank you for your support of solagent.rs! Donation Addresses:
Solana: qsvR7V3DtbbxAEs4TkGiQL9N9Z1GccfV6Q6Vm2oHViS
Ethereum: 0x972b8d20f5847B03Df43d9A595B7e83A7bbCD951
SendAI: solscan.io