The world's most comprehensive AI SDK — multi-provider, multi-agent, production-ready. Now implemented in Rust per ADR-011.
This workspace contains the AI SDK, a comprehensive Rust SDK/ADK for building AI-powered applications and agents. It provides a unified interface across multiple LLM providers, parallel execution, agent orchestration, memory, RAG, web research, workflows, streaming, observability, analytics, and security — with a real, production-oriented implementation (no mocks, no stubs, no placeholders).
- Product Requirements Document:
PRD-v1.md - Engineering Specification (adapted):
ENGINEERING-SPEC.md - Architecture Decision Records:
ADRs/ - Design verification report (historical):
VERIFICATION_REPORT.md
| Crate | Description |
|---|---|
ai-types | Core domain types: messages, content parts, roles, usage, modalities |
ai-core | Core traits: Model, Provider, Tool, Client, runtime abstractions |
ai-config | Unified configuration: env vars, TOML files, programmatic |
ai-errors | Typed error hierarchy |
ai-models | Model registry, metadata, capabilities, routing |
ai-discovery | Provider-agnostic model/capability discovery with provenance (declared · inferred · probed) |
ai-providers | Real adapters: OpenAI, Anthropic, Google Gemini, OpenRouter, Ollama |
ai-runtime | Parallel execution: concurrency limits, retries, circuit breaker |
ai-stream | Unified streaming events, SSE parsing |
ai-tools | Tool framework, built-in tools, skills registry |
ai-protocols | MCP client/server, A2A client/server |
ai-agents | Agent runtime, sub-agents, patterns, swarms, self-healing |
ai-orchestra | Hierarchical task trees: planner/expander/clarifier, mailboxes, registry, watchdogs |
ai-web | Web subsystem: crawler, extractor, search (self-hosted) |
ai-memory | 4-tier memory with pluggable storage |
ai-rag | RAG: chunking, ingestion, retrieval, hybrid search |
ai-workflows | Workflow engine: sequential/parallel/conditional, checkpoints |
ai-observability | Structured logging, spans, chronological event history |
ai-analytics | Metrics, cost estimation, aggregation |
ai-devtools | Inspector, trace viewer, debugging, doc-truth lint |
ai-security | Redaction, PII, SSRF guards, permissions |
ai-cache | Caching: TTL, semantic cache interface |
ai-storage | Storage backends: KV, document, vector (sqlite adapter) |
ai-edge | Edge/WASM build targets, runtime detection |
ai-voice | Voice: audio types, VAD, STT/TTS traits + adapters |
ai-computer | Real computer control: OmniChrome browser bridge (CDP) + Native Computer Use desktop client |
ai-cli | CLI: doctor, providers, models, config, run, inspect, trace, benchmark |
ai-sidecar | stdio JSON-RPC gateway binary: configure providers, list/discover models, chat generate/stream |
ai-sdk | Facade crate: unified public API |
Status: Implemented across 29 Rust crates — a 580+-test offline suite (unit, proof, property, and integration tests) plus credential-gated live suites. CI runs rustfmt, clippy (
-D warnings), and workspace tests; the live-gateway job runs only when its gateway secrets are configured (gated per-step onenv.AI_SDK_GATEWAY_API_KEY).
# Build the workspace
cargo check --workspace
# Run tests
cargo test --workspace
# Lint (CI enforces this with -D warnings)
cargo clippy --workspace --all-targets --all-features -- -D warningsai-computer drives real engines — nothing is simulated:
- Browser —
OmniChromeClient/BrowserTool: OmniChrome Chrome-extension bridge (http://localhost:8765/rpc). Auth: envOMNICHROME_TOKEN, or the token fileserver/.bridge-token. Navigate, click (xy/selector), type, screenshot, extract Markdown/a11y-tree, evaluate JS, raw CDP. - Desktop —
NativeComputerClient/ComputerTool: Native Computer Use engine (http://localhost:8888/rpc). Auth: envCOMPUTERUSE_TOKEN, or%USERPROFILE%\.computeruse\auth.token. Screenshots, OCR text-finding, Set-of-Marks UI tree, mouse/keyboard/paste, window management.
With an engine running, tools execute for real; engine-down is a typed, actionable error. Offline wire proofs run in CI; live smoke paths are credential-gated and never dial out uninvited.
ai-sidecar exposes the SDK to non-Rust hosts over stdio NDJSON:
cargo run -p ai-sidecar -- [--config path/to/ai-sdk.toml]Methods: initialize, configure, provider.list, model.list,
model.discover, model.info, chat.generate, chat.stream,
stream.cancel. Frames are capped at 16 MiB; oversized frames are
rejected while the loop keeps serving.
Set AI_SDK_DEBUG_WIRE=1 to write a redacted outbound-request record
(length + sha256, masked credentials) to the temp dir; append =full
to include complete bodies.
MIT — see LICENSE.