1 unstable release
Uses new Rust 2024
| 0.1.0 | Jan 26, 2026 |
|---|
#1741 in Authentication
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:
- Quick Start Guide — Build your first tool in 10 minutes
- Tools Concept — How to define tools, capabilities, and streaming
- Credentials — Secure secret management
- API Reference — Complete API documentation
License
Dependencies
~8–20MB
~297K SLoC