Crate radkit

Crate radkit 

Source
Expand description

§radkit

A Rust SDK for building AI agents that run on native and WASM targets.

§Overview

radkit provides:

  • Agent Runtime: Execute agents with skills and tool calling
  • LLM Integration: Unified interface for multiple LLM providers
  • Tool System: Extensible tool/function calling framework
  • Cross-Platform: Native (tokio) and WASM (single-threaded) support
  • Type Safety: Strong types with comprehensive error handling

§Quick Start

use radkit::agent::Agent;
use radkit::runtime::DefaultRuntime;
use radkit::tools::{FunctionTool, ToolResult};
use serde_json::json;

// Create a simple agent
let agent = Agent::builder()
    .with_id("my-agent")
    .with_name("My Agent")
    .build();

// Define tools
let tool = FunctionTool::new(
    "get_weather",
    "Get weather for a location",
    |args, _ctx| Box::pin(async move {
        ToolResult::success(json!({"temp": 72}))
    })
);

// Create a runtime
let runtime = DefaultRuntime::new();

§Feature Flags

radkit uses feature flags to control optional dependencies:

  • (Features will be documented as they’re added)

§Platform Support

  • Native (Linux, macOS, Windows): Full async runtime with tokio
  • WASM (wasm32-wasi, wasm32-unknown-unknown): Single-threaded execution

§Architecture

  • agent: Agent definitions and builders
  • tools: Tool system for function calling
  • runtime: Runtime services and execution
  • errors: Typed error handling
  • compat: Cross-platform compatibility layer

Re-exports§

pub use crate::compat::MaybeSend;
pub use crate::compat::MaybeSync;

Modules§

agent
Agent definition primitives.
compat
WASI P1 compatibility helpers
errors
macros
Re-exported procedural macros (e.g., radkit::macros::skill!).
models
Data models for the radkit agent SDK.
runtime
tools
Tools and toolsets for agent capabilities.