SimpleAgents

SimpleAgents Documentation

Welcome to the SimpleAgents documentation! This guide will help you understand, use, and contribute to SimpleAgents.

Table of Contents

Getting Started

SimpleAgents is a Rust framework for building LLM-powered applications with a focus on:

Quick Start

use simple_agents_types::prelude::*;
use simple_agents_providers::openai::OpenAIProvider;

#[tokio::main]
async fn main() -> Result<()> {
    // Create a provider
    let api_key = ApiKey::new("sk-...")?;
    let provider = OpenAIProvider::new(api_key)?;

    // Build a request
    let request = CompletionRequest::builder()
        .model("gpt-4")
        .message(Message::user("Hello, world!"))
        .temperature(0.7)
        .build()?;

    // Execute the request
    let provider_request = provider.transform_request(&request)?;
    let provider_response = provider.execute(provider_request).await?;
    let response = provider.transform_response(provider_response)?;

    println!("{}", response.content().unwrap_or(""));
    Ok(())
}

Documentation Structure

For Users

For Developers

Crate Overview

SimpleAgents is organized into multiple crates:

Features

Support

License

MIT OR Apache-2.0