6 releases
new 0.1.5 | Feb 11, 2025 |
---|---|
0.1.4 | Feb 8, 2025 |
#25 in #agents
673 downloads per month
Used in 20 crates
12KB
175 lines
solagent.rs: Bridging the Gap Between AI and Solana protocols
solagent.rs is an open-source Rust library designed to streamline the integration of AI agents with Solana protocols. Built upon the rig framework, solagent.rs empowers developers to construct portable, modular, and lightweight full-stack AI agents capable of interacting with the Solana blockchain.
This powerful toolkit simplifies agent-to-blockchain communication, offering a comprehensive suite of functions for tasks such as token operations, trading, and more. By leveraging solagent.rs, developers can seamlessly connect their AI agents to the Solana ecosystem, unlocking a world of possibilities for on-chain automation and intelligent decision-making.
Get TPS
use solagent_core::{ConfigBuilder, SolanaAgentKit};
#[tokio::main]
async fn main() {
let wallet = Wallet::from_env("SOLANA_WALLET_VARIABLE");
let rpc_url = "https://api.mainnet-beta.solana.com";
let config = ConfigBuilder::default().openai_api_key("test_api_key".to_string()).build();
let agent = SolanaAgentKit::new(wallet, rpc_url, config);
let tps = solagent_plugin_solana::get_tps(&agent).await;
println!("tps: {}", tps);
}
Dependencies
~70MB
~1.5M SLoC