The RunAgent Rust SDK provides a high-performance interface for interacting with your deployed agents. It supports both synchronous and asynchronous operations with built-in streaming capabilities.
use runagent::client::RunAgentClient;use serde_json::json;#[tokio::main]async fn main() -> Result<(), Box<dyn std::error::Error>> { // Connect to specific host and port let client = RunAgentClient::with_address( "your-agent-id", "generic", true, Some("localhost"), Some(8450) ).await?; let response = client.run(&[ ("query", json!("Hello from Rust SDK")) ]).await?; println!("{}", serde_json::to_string_pretty(&response)?); Ok(())}