Skip to main content
The TaskForceAI Rust SDK provides a strictly typed, high-performance interface for our platform.

Installation

Add this to your Cargo.toml:
[dependencies]
taskforceai-sdk = "0.1.1"
tokio = { version = "1.0", features = ["full"] }

Quick Start

use taskforceai_sdk::TaskForceAI;

#[tokio::main]
async fn main() {
    let client = TaskForceAI::new("your-api-key");

    let result = client
        .run_task("Analyze this repository")
        .await
        .expect("Task failed");

    println!("Result: {}", result.result);
}

Streaming

use futures_util::StreamExt;

let mut stream = client.run_task_stream("Long running task");

while let Some(status) = stream.next().await {
    match status {
        Ok(update) => println!("Status: {:?}", update.status),
        Err(e) => eprintln!("Error: {}", e),
    }
}