Getting Started
Get started with the Lybic core SDK (Rust)
By using the Rust SDK, you can build your own AI agents that can interact with the Lybic platform.
Installation
cargo add lybic-sdk-rs[dependencies]
lybic-sdk-rs = "0.1.0"Quick Start
You can grab your API key and base URL from the Lybic Dashboard.
use lybic_sdk_rs::{Client, types::CreateSandboxDto};
const ORG_ID: &str = "lybic-sdk-rust-example";
#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
// Create a client
let client = Client::new("https://api.lybic.cn");
// Create a sandbox
let sandbox = client
.create_sandbox(
ORG_ID,
&CreateSandboxDto {
max_life_seconds: Some(3600.0),
name: ORG_ID.to_string(),
project_id: None,
shape: "<your-sandbox-shape>".to_string(),
},
)
.await?;
println!("Sandbox created: {:?}", sandbox);
Ok(())
}This SDK is essentially a wrapper around reqwest for making requests. For detailed information, please refer to the core API documentation.