1 unstable release

Uses new Rust 2024

0.1.0 Jan 26, 2026

#1741 in Authentication

Apache-2.0

175KB
2.5K SLoC

operi

Main SDK for building secure, production-grade AI tool modules in Rust.

Quick Example

use operi::{anyhow::Result, schemars::JsonSchema, tool, export_tools, Context};
use serde::{Deserialize, Serialize};

#[derive(Deserialize, JsonSchema)]
struct Input { name: String }

#[derive(Serialize, JsonSchema)]
struct Output { message: String }

/// # Greet (ID: greet)
/// Greets the user by name.
/// ## Capabilities
/// - read
#[tool]
async fn greet(_ctx: Context, input: Input) -> Result<Output> {
    Ok(Output { message: format!("Hello, {}!", input.name) })
}

export_tools!();

Documentation

For comprehensive documentation, see:

License

Apache License 2.0

Dependencies

~8–20MB
~297K SLoC