docs.rs failed to build oxi-sdk-0.25.7
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
oxi-sdk-0.22.0
oxi-sdk
Multi-agent SDK for oxi — build isolated, secure, observable AI agent systems in Rust.
Overview
oxi-sdk provides a fluent builder API for constructing single and multi-agent AI systems
on top of oxi-ai and oxi-agent.
Key Concepts
| Component | Purpose |
|---|---|
OxiBuilder |
Configure the engine: providers, models, API keys, built-ins |
AgentBuilder |
Build individual agents with model, prompt, tools, and security |
AgentGroup |
Orchestrate multiple agents (pipeline, parallel, orchestrated) |
MessageBus |
Pub/sub inter-agent communication |
AgentSupervisor |
Lifecycle management: spawn, suspend, resume, restart |
Security |
Capability-based access control with role hierarchy |
Observability |
Tracing, audit logging, cost tracking, event sourcing |
Coordination |
Work queue, shared memory, consensus voting |
Quick Start
use *;
let oxi = new
.with_builtins
.api_key
.build;
let agent = oxi.agent
.workspace
.coding_tools
.system_prompt
.build?;
let = agent.run.await?;
println!;
Architecture
┌─────────────────────────────────────────────┐
│ OxiBuilder → Oxi │ Engine + Registry
├─────────────────────────────────────────────┤
│ AgentBuilder → Agent │ Per-agent config
├─────────────────────────────────────────────┤
│ AgentGroup │ MessageBus │ Supervisor │ Orchestration
├─────────────────────────────────────────────┤
│ Security │ Middleware │ Observability │ Cross-cutting
├─────────────────────────────────────────────┤
│ Coordination (Queue + Memory + Consensus) │ Inter-agent
└─────────────────────────────────────────────┘
Design Principles
- No global state — each
Oxiinstance has its own isolated provider/model registries - Streaming-first — every provider streams tokens
- Capability-based security — deny-by-default with fine-grained permissions
- Composable — agents combine into groups with different orchestration strategies
- Observable — tracing, audit, cost tracking, and event sourcing built in
Features
Security
use *;
let audit = new;
let authorizer = new;
// Define roles
authorizer.define_role;
authorizer.define_role;
// Bind to agents
authorizer.bind_role;
Observability
use *;
// Distributed tracing
let tracer = new;
// Cost tracking
let registry = new;
let cost = new;
Multi-Agent Orchestration
use *;
let group = new
.agent
.agent;
let result = group.run.await?;
println!;
Coordination
use *;
// Work queue with priority-based claiming
let queue = new;
queue.enqueue;
let item = queue.claim;
// Shared memory with optimistic locking
let memory = new;
let key = new;
let v1 = memory.write?;
let v2 = memory.write?; // succeeds
memory.write; // fails: VersionConflict
// Consensus voting
let consensus = new;
consensus.start;
Feature Flags
| Flag | Description |
|---|---|
default |
Core SDK |
native-browser |
Built-in headless browser tools |
Module Index
| Module | Purpose |
|---|---|
builder |
OxiBuilder and Oxi engine |
agent_builder |
AgentBuilder for agent configuration |
agent_group |
AgentGroup for multi-agent orchestration |
security |
Authorizer, Capability, CapabilitySet, SecurityMiddleware |
middleware |
Middleware trait, pipeline, built-in middleware |
observability |
Tracer, AuditLog, CostTracker, EventStore |
lifecycle |
AgentSupervisor, AgentHandle, snapshots |
coordination |
WorkQueue, SharedMemory, Consensus |
message_bus |
MessageBus for inter-agent pub/sub |
routing |
RoutingControl for dynamic model routing |
metrics |
AgentMetrics for execution statistics |
error |
SdkError and SdkResult<T> |
Crate Dependencies
oxi-ai ← oxi-agent ← oxi-sdk
| Crate | Description |
|---|---|
oxi-ai |
LLM API — multi-provider streaming |
oxi-agent |
Agent runtime with tool-calling loop |
oxi-sdk |
SDK entry point (this crate) |